17 types derived from InvalidOperationException
dotnet-svcutil.xmlserializer (2)
Microsoft\Tools\ServiceModel\SvcUtil\ToolMode.cs (1)
20internal class InvalidToolModeException : InvalidOperationException { }
Microsoft\Tools\ServiceModel\SvcUtil\TypeResolver.cs (1)
79internal class Exception : InvalidOperationException
dotnet-svcutil-lib (1)
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\WsdlImporter.cs (1)
1914private class AlreadyFaultedException : 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
Microsoft.CodeAnalysis.EditorFeatures (1)
EditAndContinue\EditAndContinueLanguageService.cs (1)
39private sealed class NoSessionException : InvalidOperationException
Microsoft.Maui.Essentials (1)
Types\Shared\Exceptions.shared.cs (1)
81 public class FeatureNotEnabledException : InvalidOperationException
PresentationFramework (1)
System\Windows\ResourceReferenceKeyNotFoundException.cs (1)
17public 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)
13public partial class ChannelClosedException : InvalidOperationException
UIAutomationTypes (1)
System\Windows\Automation\ElementNotEnabledException.cs (1)
20public class ElementNotEnabledException : InvalidOperationException
11594 instantiations of InvalidOperationException
Analyzer.Utilities.UnitTests (1)
Options\SymbolNamesWithValueOptionTests.cs (1)
410throw new InvalidOperationException("Cannot find symbol name: " + symbolName);
AnalyzerRunner (1)
IncrementalAnalyzerRunner.cs (1)
49throw new InvalidOperationException("Benchmark is not configured to use persistent storage.");
aspire (21)
Backchannel\AppHostBackchannel.cs (1)
128throw new InvalidOperationException(ErrorStrings.AlreadyConnectedToBackchannel);
Backchannel\ExtensionBackchannel.cs (2)
50?? throw new InvalidOperationException(ErrorStrings.ExtensionTokenMustBeSet); 150throw new InvalidOperationException($"Already connected to {Name} backchannel.");
Commands\AddCommand.cs (2)
127_ => throw new InvalidOperationException(AddCommandStrings.UnexpectedNumberOfPackagesFound) 205_ => throw new InvalidOperationException(AddCommandStrings.UnexpectedNumberOfPackagesFound)
Commands\ExecCommand.cs (2)
99if (!appHostCompatibilityCheck?.IsCompatibleAppHost ?? throw new InvalidOperationException(RunCommandStrings.IsCompatibleAppHostIsNull)) 260appHostCompatibilityCheck?.AspireHostingVersion ?? throw new InvalidOperationException(ErrorStrings.AspireHostingVersionNull)
Commands\PublishCommandBase.cs (7)
106if (!appHostCompatibilityCheck?.IsCompatibleAppHost ?? throw new InvalidOperationException("IsCompatibleAppHost is null")) 216appHostCompatibilityCheck?.AspireHostingVersion ?? throw new InvalidOperationException(ErrorStrings.AspireHostingVersionNull) 272throw new InvalidOperationException($"Step activity with ID '{currentStepProgress.Step?.Id}' is not complete. Expected it to be complete before processing tasks."); 323throw new InvalidOperationException($"Step activity with ID '{activity.Data.Id}' is not complete. Expected it to be complete before processing tasks."); 337throw new InvalidOperationException($"Task activity with ID '{activity.Data.Id}' is not associated with the current step '{currentStepProgress.Step?.Id}'."); 363throw new InvalidOperationException($"Task with ID '{activity.Data.Id}' does not have an associated ProgressTask."); 421throw new InvalidOperationException("Prompt provided without input data.");
Commands\RunCommand.cs (2)
124if (!appHostCompatibilityCheck?.IsCompatibleAppHost ?? throw new InvalidOperationException(RunCommandStrings.IsCompatibleAppHostIsNull)) 259appHostCompatibilityCheck?.AspireHostingVersion ?? throw new InvalidOperationException(ErrorStrings.AspireHostingVersionNull)
DotNetCliRunner.cs (2)
195var ex = new InvalidOperationException(ErrorStrings.CantUseBothWatchAndNoBuild); 327throw new InvalidOperationException(ErrorStrings.FailedToParseTemplateVersionFromStdout);
src\Shared\CircularBuffer.cs (1)
172throw new InvalidOperationException($"Cannot access index {index}. Buffer size is {Count}");
Templating\DotNetTemplateFactory.cs (1)
105_ => throw new InvalidOperationException(TemplatingStrings.UseRedisCache_UnexpectedChoice)
Utils\VersionHelper.cs (1)
19return informationalVersion ?? throw new InvalidOperationException(ErrorStrings.UnableToRetrieveAssemblyVersion);
Aspire.Azure.AI.Inference (1)
AspireAzureAIInferenceExtensions.cs (1)
113throw new InvalidOperationException($"A ChatCompletionsClient could not be configured. Ensure valid connection information was provided in 'ConnectionStrings:{connectionName}' or specify a '{nameof(ChatCompletionsClientSettings.Endpoint)}' and optionally a '{nameof(ChatCompletionsClientSettings.Key)}' in the '{configurationSectionName}' configuration section.");
Aspire.Azure.AI.OpenAI (2)
AspireAzureOpenAIExtensions.cs (1)
97throw new InvalidOperationException($"An OpenAIClient could not be configured. Ensure valid connection information was provided in 'ConnectionStrings:{connectionName}' or specify a '{nameof(AzureOpenAISettings.Endpoint)}' or '{nameof(AzureOpenAISettings.Key)}' in the '{configurationSectionName}' configuration section.");
AspireConfigurableOpenAIExtensions.cs (1)
96throw new InvalidOperationException($"An OpenAIClient could not be configured. Ensure valid connection information was provided in 'ConnectionStrings:{connectionName}'.");
Aspire.Azure.Data.Tables (1)
AspireTablesExtensions.cs (1)
79throw new InvalidOperationException($"A TableServiceClient could not be configured. Ensure valid connection information was provided in 'ConnectionStrings:{connectionName}' or specify a 'ConnectionString' or 'ServiceUri' in the '{configurationSectionName}' configuration section.");
Aspire.Azure.Messaging.EventHubs (7)
EventHubsComponent.cs (4)
111throw new InvalidOperationException( 126throw new InvalidOperationException( 143throw new InvalidOperationException( 154throw new InvalidOperationException(
EventProcessorClientComponent.cs (2)
84throw new InvalidOperationException( 120throw new InvalidOperationException(
PartitionReceiverClientComponent.cs (1)
40throw new InvalidOperationException(
Aspire.Azure.Messaging.EventHubs.Tests (2)
AspireEventHubsExtensionsTests.cs (1)
482_ => throw new InvalidOperationException()
tests\Aspire.Azure.Security.KeyVault.Tests\MockTransport.cs (1)
53throw new InvalidOperationException("the request is not compatible with the transport");
Aspire.Azure.Messaging.ServiceBus (1)
AspireServiceBusExtensions.cs (1)
78throw new InvalidOperationException($"A ServiceBusClient could not be configured. Ensure valid connection information was provided in 'ConnectionStrings:{connectionName}' or specify a 'ConnectionString' or 'Namespace' in the '{configurationSectionName}' configuration section.");
Aspire.Azure.Messaging.WebPubSub (2)
AspireWebPubSubExtensions.cs (2)
110throw new InvalidOperationException($"A WebPubSubServiceClient could not be configured. Ensure valid connection information was provided in 'ConnectionStrings:{connectionName}' or specify a 'ConnectionString' or 'Endpoint' in the '{configurationSectionName}' configuration section."); 117throw new InvalidOperationException(
Aspire.Azure.Npgsql.EntityFrameworkCore.PostgreSQL (3)
src\Components\Common\EntityFrameworkUtils.cs (3)
54throw new InvalidOperationException($"DbContext<{typeof(TContext).Name}> was not registered. Ensure you have registered the DbContext in DI before calling {memberName}."); 82throw new InvalidOperationException($"DbContext<{typeof(TContext).Name}> was not configured. Ensure you have registered the DbContext in DI before calling {memberName}."); 110throw new InvalidOperationException($"DbContext<{typeof(TContext).Name}> is already registered. Please ensure 'services.AddDbContext<{typeof(TContext).Name}>()' is not used when calling '{callerMemberName}()' or use the corresponding 'Enrich' method.");
Aspire.Azure.Npgsql.EntityFrameworkCore.PostgreSQL.Tests (1)
tests\Aspire.Npgsql.Tests\PostgreSQLContainerFixture.cs (1)
17throw new InvalidOperationException("The test container was not initialized.");
Aspire.Azure.Npgsql.Tests (1)
PostgreSQLContainerFixture.cs (1)
17throw new InvalidOperationException("The test container was not initialized.");
Aspire.Azure.Search.Documents (1)
AspireAzureSearchExtensions.cs (1)
81throw new InvalidOperationException($"A SearchIndexClient could not be configured. Ensure valid connection information was provided in 'ConnectionStrings:{connectionName}' or specify an '{nameof(AzureSearchSettings.Endpoint)}' in the '{configurationSectionName}' configuration section.");
Aspire.Azure.Security.KeyVault (2)
AbstractAzureKeyVaultComponent.cs (1)
32throw new InvalidOperationException($"VaultUri is missing. It should be provided in 'ConnectionStrings:{connectionName}' or under the 'VaultUri' key in the '{configurationSectionName}' configuration section.");
AspireKeyVaultExtensions.cs (1)
204throw new InvalidOperationException($"VaultUri is missing. It should be provided in 'ConnectionStrings:{connectionName}' or under the 'VaultUri' key in the '{DefaultConfigSectionName}' configuration section.");
Aspire.Azure.Security.KeyVault.Tests (1)
MockTransport.cs (1)
53throw new InvalidOperationException("the request is not compatible with the transport");
Aspire.Azure.Storage.Blobs (3)
AspireBlobStorageExtensions.BlobStorageComponent.cs (1)
30throw new InvalidOperationException($"A BlobServiceClient could not be configured. Ensure valid connection information was provided in 'ConnectionStrings:{connectionName}' or specify a 'ConnectionString' or 'ServiceUri' in the '{configurationSectionName}' configuration section.");
AspireBlobStorageExtensions.BlobStorageContainerComponent.cs (2)
29throw new InvalidOperationException($"The connection string '{connectionName}' does not exist or is missing the container name."); 35throw new InvalidOperationException($"A BlobServiceClient could not be configured. Ensure valid connection information was provided in 'ConnectionStrings:{connectionName}' or specify a 'ConnectionString' or 'ServiceUri' in the '{configurationSectionName}' configuration section.");
Aspire.Azure.Storage.Queues (1)
AspireQueueStorageExtensions.cs (1)
80throw new InvalidOperationException($"A QueueServiceClient could not be configured. Ensure valid connection information was provided in 'ConnectionStrings:{connectionName}' or specify a 'ConnectionString' or 'ServiceUri' in the '{configurationSectionName}' configuration section.");
Aspire.Cli.Tests (9)
Commands\AddCommandTests.cs (3)
261throw new InvalidOperationException("Should not have been prompted for integration packages."); 337throw new InvalidOperationException("Should not have been prompted for integration packages."); 343throw new InvalidOperationException("Should not have been prompted for integration version.");
Commands\NewCommandTests.cs (4)
287throw new InvalidOperationException("This should not be called"); 341throw new InvalidOperationException("This should not be called"); 395throw new InvalidOperationException("This should not be called"); 449throw new InvalidOperationException("This should not be called");
Commands\PublishCommandTests.cs (1)
145backchannelCompletionSource?.SetException(new InvalidOperationException("AppHost process has exited unexpectedly. Use --debug to see more details."));
Utils\TemporaryRepo.cs (1)
42throw new InvalidOperationException($"Failed to initialize git repository: {error}");
Aspire.Confluent.Kafka (3)
KafkaConsumerSettings.cs (2)
67throw new InvalidOperationException("No bootstrap servers configured."); 72throw new InvalidOperationException("No group id configured.");
KafkaProducerSettings.cs (1)
67throw new InvalidOperationException("No bootstrap servers configured.");
Aspire.Confluent.Kafka.Tests (10)
ConfluentKafkaPublicApiTests.cs (8)
35_ => throw new InvalidOperationException() 71_ => throw new InvalidOperationException() 103_ => throw new InvalidOperationException() 139_ => throw new InvalidOperationException() 171_ => throw new InvalidOperationException() 207_ => throw new InvalidOperationException() 239_ => throw new InvalidOperationException() 275_ => throw new InvalidOperationException()
ConsumerConfigurationTests.cs (1)
177_ => throw new InvalidOperationException()
ProducerConfigurationTests.cs (1)
167_ => throw new InvalidOperationException()
Aspire.Dashboard (43)
Components\Controls\Chart\ChartBase.cs (2)
213throw new InvalidOperationException("Unexpected metric type: " + metric.GetType()); 255throw new InvalidOperationException("Histogram values changed size");
Components\Pages\TraceDetail.razor.cs (1)
153throw new InvalidOperationException($"Unsupported span kind when resolving icon: {span.Kind}");
Configuration\DashboardOptions.cs (1)
36internal byte[] GetApiKeyBytes() => _apiKeyBytes ?? throw new InvalidOperationException($"{nameof(ApiKey)} is not available.");
DashboardWebApplication.cs (5)
63throw new InvalidOperationException("WebApplication not started yet."); 76throw new InvalidOperationException("WebApplication not started yet."); 80throw new InvalidOperationException("Multiple frontend endpoints."); 89get => _otlpServiceGrpcEndPointAccessor ?? throw new InvalidOperationException("WebApplication not started yet."); 94get => _otlpServiceHttpEndPointAccessor ?? throw new InvalidOperationException("WebApplication not started yet.");
Extensions\TimeProviderExtensions.cs (1)
31throw new InvalidOperationException("Unable to convert unspecified DateTime to local time.");
Model\ConsoleLogsManager.cs (1)
37throw new InvalidOperationException($"{nameof(ConsoleLogsManager)} not initialized.");
Model\DashboardCommandExecutor.cs (1)
196_ => throw new InvalidOperationException()
Model\ResourceIconHelpers.cs (1)
29throw new InvalidOperationException($"Couldn't resolve resource icon for {resource.Name}.");
Model\ResourceTypeDetails.cs (1)
28throw new InvalidOperationException($"Can't get ApplicationKey from resource type details '{ToString()}' because {nameof(ReplicaSetName)} is null.");
Model\ThemeManager.cs (1)
95throw new InvalidOperationException("Theme manager not initialized.");
Otlp\Model\MetricValues\DimensionScope.cs (1)
110throw new InvalidOperationException("Histogram data point has bucket counts without any explicit bounds.");
Otlp\Model\OtlpApplication.cs (1)
70throw new InvalidOperationException("Instrument name is required.");
Otlp\Model\OtlpHelpers.cs (1)
135_ => throw new InvalidOperationException($"Unexpected AnyValue type: {value.ValueCase}"),
Otlp\Model\OtlpTrace.cs (3)
58throw new InvalidOperationException($"Duplicate span id '{span.SpanId}' detected."); 79throw new InvalidOperationException($"Circular loop detected for span '{span.SpanId}' with parent '{span.ParentSpanId}'."); 144throw new InvalidOperationException($"Trace {TraceId} spans not in order at index {i}.");
Otlp\Storage\TelemetryRepository.cs (4)
141throw new InvalidOperationException($"{nameof(ApplicationKey)} must have an instance ID."); 1125throw new InvalidOperationException($"Traces not in order at index {i}."); 1148throw new InvalidOperationException($"Couldn't find expected link from span {span.SpanId} to span {link.SpanId}."); 1164throw new InvalidOperationException(sb.ToString());
ServiceClient\DashboardClient.cs (3)
136_ => throw new InvalidOperationException("Unable to load ResourceServiceClient client certificate.") 206throw new InvalidOperationException($"Unable to load client certificate with subject \"{subject}\" from key store."); 235throw new InvalidOperationException($"{nameof(DashboardClient)} is disabled. Check the {nameof(IsEnabled)} property before calling this.");
ServiceClient\Partials.cs (5)
48throw new InvalidOperationException($@"Error converting resource ""{Name}"" to {nameof(ResourceViewModel)}.", ex); 63_ => throw new InvalidOperationException("Unknown health status: " + healthStatus), 120_ => throw new InvalidOperationException("Unknown state: " + state), 130_ => throw new InvalidOperationException("Unknown icon variant: " + iconVariant), 166throw new InvalidOperationException($"Message field '{expression}' on resource with name '{Name}' cannot be null.");
src\Shared\CircularBuffer.cs (1)
172throw new InvalidOperationException($"Cannot access index {index}. Buffer size is {Count}");
src\Shared\ConsoleLogs\LogEntries.cs (1)
104throw new InvalidOperationException("Log entries out of order.");
src\Shared\IConfigurationExtensions.cs (4)
121throw new InvalidOperationException($"Error parsing URIs from configuration value '{key}'.", ex); 158throw new InvalidOperationException($"Error parsing URIs from configuration value '{key}'.", ex); 188throw new InvalidOperationException($"Unknown {typeof(T).Name} value \"{value}\". Valid values are {string.Join(", ", Enum.GetNames(typeof(T)))}."); 208throw new InvalidOperationException($"Missing required configuration for {key}. Valid values are {string.Join(", ", Enum.GetNames(typeof(T)))}.");
src\Shared\LoggingHelpers.cs (1)
15throw new InvalidOperationException("Token must be provided.");
Telemetry\DashboardTelemetryService.cs (1)
361throw new InvalidOperationException("Response was null.");
Telemetry\OperationContextProperty.cs (2)
19throw new InvalidOperationException("Value has not been set."); 28throw new InvalidOperationException("Value has already been set.");
Aspire.Dashboard.Components.Tests (14)
Layout\MainLayoutTests.cs (3)
51throw new InvalidOperationException("Unexpected key."); 64throw new InvalidOperationException("Unexpected key."); 108throw new InvalidOperationException("Unexpected key.");
Pages\ConsoleLogsTests.cs (2)
268consoleLogsChannel.Writer.Complete(new InvalidOperationException("Error!")); 319consoleLogsChannel.Writer.Complete(new InvalidOperationException("Error!"));
Pages\MetricsTests.cs (1)
118throw new InvalidOperationException("Unexpected key: " + key);
Shared\TestDashboardClient.cs (5)
52throw new InvalidOperationException("No resource command channel set."); 62throw new InvalidOperationException("No channel provider set."); 82throw new InvalidOperationException("No channel provider set."); 102throw new InvalidOperationException("No channel provider set."); 122throw new InvalidOperationException("No resource command channel set.");
Shared\TestDialogService.cs (2)
70return _onShowDialog?.Invoke(data, parameters) ?? throw new InvalidOperationException("No dialog callback specified."); 75return _onShowDialog?.Invoke(data, parameters) ?? throw new InvalidOperationException("No dialog callback specified.");
tests\Shared\AsyncTestHelpers.cs (1)
221throw new InvalidOperationException($"Assert failed after {retries} retries: {message}");
Aspire.Dashboard.Tests (8)
CircularBufferTests.cs (1)
49throw new InvalidOperationException($"Traces not in order at index {i}. {value} shouldn't be smaller than {current}.");
Integration\ServerRetryHelper.cs (1)
99throw new InvalidOperationException($"Couldn't find a free port after {startingPort}.");
Telemetry\DashboardTelemetrySenderTests.cs (2)
82return Task.FromException<HttpResponseMessage>(new InvalidOperationException()); 90return Task.FromException<HttpResponseMessage>(new InvalidOperationException());
Telemetry\TelemetryLoggerProviderTests.cs (1)
44circuitHostLogger.Log(LogLevel.Error, TelemetryLoggerProvider.CircuitUnhandledExceptionEventId, new InvalidOperationException("Exception message"), "Test message");
TelemetryRepositoryTests\TraceTests.cs (1)
924throw new InvalidOperationException($"Error adding trace number {i}.", ex);
tests\Shared\AsyncTestHelpers.cs (1)
221throw new InvalidOperationException($"Assert failed after {retries} retries: {message}");
tests\Shared\TestCertificateLoader.cs (1)
31throw new InvalidOperationException("Cannot acquire the global certificate mutex.");
Aspire.EndToEnd.Tests (12)
IntegrationServicesFixture.cs (4)
26public Dictionary<string, ProjectInfo> Projects => Project?.InfoTable ?? throw new InvalidOperationException("Project is not initialized"); 35public AspireProject Project => _project ?? throw new InvalidOperationException("Project is not initialized"); 54throw new InvalidOperationException("These tests should be run from inside the repo when using `TestsRunningOutsideOfRepo=false`"); 124throw new InvalidOperationException($"The required resource '{ename}' was skipped for the app run for TestScenario: {TestScenario}. Make sure that the TEST_SCENARIO environment variable matches the intended scenario for the test. Resources that were skipped: {string.Join(",", _resourcesToSkip)}. TestScenario: {TestScenario} ");
tests\Shared\TemplatesTesting\AspireProject.cs (6)
165throw new InvalidOperationException("Project is already running"); 309throw new InvalidOperationException(exceptionMessage); 354throw new InvalidOperationException("Dashboard URL is not available"); 393throw new InvalidOperationException("Dashboard URL is not available"); 412throw new InvalidOperationException("Tried to stop the app host process but it is not running."); 489throw new InvalidOperationException("The app host process is not running.");
tests\Shared\TemplatesTesting\BuildEnvironment.cs (1)
266throw new InvalidOperationException($"Error deleting '{TestRootPath}'.", ex);
tests\Shared\TemplatesTesting\TemplateCustomHive.cs (1)
20: throw new InvalidOperationException($"TemplatesCustomHive has not been installed yet in {_customHiveDirectory}");
Aspire.Hosting (85)
ApplicationModel\ContainerFileSystemCallbackAnnotation.cs (2)
94_ => throw new InvalidOperationException($"Unknown file system item type: {node.Value.GetType().Name}"), 199throw new InvalidOperationException($"The specified path '{fullPath}' does not exist.");
ApplicationModel\EndpointReference.cs (6)
18internal EndpointAnnotation EndpointAnnotation => GetEndpointAnnotation() ?? throw new InvalidOperationException($"The endpoint `{EndpointName}` is not defined for the resource `{Resource.Name}`."); 59_ => throw new InvalidOperationException($"The property '{property}' is not supported for the endpoint '{EndpointName}'.") 93public string ContainerHost => AllocatedEndpoint.ContainerHostAddress ?? throw new InvalidOperationException($"The endpoint \"{EndpointName}\" has no associated container host name."); 107?? throw new InvalidOperationException($"The endpoint `{EndpointName}` is not allocated for the resource `{Resource.Name}`."); 182_ => throw new InvalidOperationException($"The property '{Property}' is not supported for the endpoint '{Endpoint.EndpointName}'.") 197?? throw new InvalidOperationException("The endpoint does not have an associated TargetPortExpression from the orchestrator.");
ApplicationModel\EnvironmentCallbackContext.cs (1)
54public IResource Resource => _resource ?? throw new InvalidOperationException($"{nameof(Resource)} is not set. This callback context is not associated with a resource.");
ApplicationModel\InteractionService.cs (2)
168throw new InvalidOperationException($"An interaction with ID {interactionUpdate.InteractionId} already exists. Interaction IDs must be unique."); 299throw new InvalidOperationException($"InteractionService is not available because the dashboard is not enabled. Use the {nameof(IsAvailable)} property to determine whether the service is available.");
ApplicationModel\ResourceExtensions.cs (3)
614throw new InvalidOperationException($"Resource '{resource.Name}' has multiple compute environments - '{computeEnvironmentNames}'. Please specify a single compute environment using 'WithComputeEnvironment'."); 692throw new InvalidOperationException($"Resource '{resource.Name}' has no resolved names."); 696throw new InvalidOperationException($"Resource '{resource.Name}' has multiple resolved names: {string.Join(", ", names)}.");
ApplicationModel\ResourceLoggerService.cs (1)
621throw new InvalidOperationException($"Getting all logs requires the {nameof(ResourceLoggerService)} instance created by DI.");
ApplicationModel\ResourceNotificationService.cs (1)
526throw new InvalidOperationException($"Resource instance doesn't match resource previously registered with specified resource id '{resourceId}'.");
Backchannel\AppHostRpcTarget.cs (3)
130throw new InvalidOperationException("Dashboard URL requested but dashboard is disabled."); 145throw new InvalidOperationException("Dashboard options not found."); 151throw new InvalidOperationException("Dashboard URL could not be parsed from dashboard options.");
ContainerResourceBuilderExtensions.cs (6)
261throw new InvalidOperationException("Ambiguous tags - a tag was provided on both the 'tag' and 'image' parameters"); 424throw new InvalidOperationException($"The resource '{builder.Resource.Name}' does not have a container image specified. Use WithImage to specify the container image and tag."); 599throw new InvalidOperationException("The resource does not have a Dockerfile build annotation. Call WithDockerfile before calling WithBuildArg."); 648throw new InvalidOperationException("Cannot add secret parameter as a build argument. Use WithSecretBuildArg instead."); 697throw new InvalidOperationException("The resource does not have a Dockerfile build annotation. Call WithDockerfile before calling WithSecretBuildArg."); 863throw new InvalidOperationException($"The source path '{sourceFullPath}' does not exist. Ensure the path is correct and accessible.");
Dashboard\DashboardLifecycleHook.cs (1)
291throw new InvalidOperationException($"Unexpected DEBUG_SESSION_PORT value. Expected localhost:port, got '{sessionPort}'.");
Dashboard\DashboardService.cs (1)
204_ => throw new InvalidOperationException($"Unexpected input type: {inputType}"),
Dashboard\DashboardServiceHost.cs (1)
211_resourceServiceUri.SetException(new InvalidOperationException("Could not obtain IServerAddressesFeature. Resource service URI is not available."));
Dashboard\proto\Partials.cs (3)
114_ => throw new InvalidOperationException("Unknown health status: " + healthStatus), 126_ => throw new InvalidOperationException("Unexpected icon variant: " + iconVariant) 137_ => throw new InvalidOperationException("Unexpected state: " + state)
Dashboard\ResourceServiceOptions.cs (1)
38return _apiKeyBytes ?? throw new InvalidOperationException($"AppHost:ResourceService:ApiKey is not specified in configuration.");
Dcp\AppResource.cs (2)
33get { throw new InvalidOperationException("Service resources do not produce any services"); } 37get { throw new InvalidOperationException("Service resources do not consume any services"); }
Dcp\DcpExecutor.cs (16)
422_ => throw new InvalidOperationException($"Unknown resource type {resource.GetType().Name}") 754throw new InvalidOperationException($"Service '{svc.Metadata.Name}' needs to specify a port for endpoint '{sp.EndpointAnnotation.Name}' since it isn't using a proxy."); 861throw new InvalidOperationException("A project resource is missing required metadata"); // Should never happen. 1043throw new InvalidOperationException($"Expected an Executable resource, but got {er.DcpResource.Kind} instead"); 1142throw new InvalidOperationException(); 1164_ => throw new InvalidOperationException($"Unknown pull policy '{Enum.GetName(typeof(ImagePullPolicy), pullPolicy)}' for container '{container.Name}'") 1368_ => throw new InvalidOperationException("Build secret can only be a parameter or a file.") 1422throw new InvalidOperationException($"The endpoint '{ea.Name}' for container resource '{modelResourceName}' must specify the {nameof(EndpointAnnotation.TargetPort)} value"); 1429throw new InvalidOperationException($"Resource '{modelResourceName}' uses multiple replicas and a proxy-less endpoint '{ea.Name}'. These features do not work together."); 1434throw new InvalidOperationException($"The endpoint '{ea.Name}' for resource '{modelResourceName}' is not using a proxy, and it has a value of {nameof(EndpointAnnotation.Port)} property that is different from the value of {nameof(EndpointAnnotation.TargetPort)} property. For proxy-less endpoints they must match."); 1443throw new InvalidOperationException( 1449throw new InvalidOperationException( 1610throw new InvalidOperationException($"Unexpected resource type: {appResource.DcpResource.GetType().FullName}"); 1616throw new InvalidOperationException($"Failed to stop resource '{resourceReference.DcpResourceName}'."); 1627throw new InvalidOperationException($"Resource '{resourceName}' not found."); 1663throw new InvalidOperationException($"Unexpected resource type: {appResource.DcpResource.GetType().FullName}");
Dcp\DcpExecutorEvents.cs (1)
25throw new InvalidOperationException($"Failed to add subscription for event type {typeof(T)} because a subscription already exists.");
Dcp\DcpOptions.cs (1)
179throw new InvalidOperationException($"Invalid value \"{dcpPublisherConfiguration[nameof(options.DependencyCheckTimeout)]}\" for \"--dcp-dependency-check-timeout\". Expected an integer value.");
Dcp\KubernetesService.cs (1)
439throw new InvalidOperationException($"Unknown custom resource type: {typeof(T).Name}");
Dcp\Process\ProcessUtil.cs (1)
103processLifetimeTcs.TrySetException(new InvalidOperationException(
DistributedApplicationBuilder.cs (1)
268throw new InvalidOperationException($"Could not determine an appropriate location for local storage. Set the {AspireStore.AspireStorePathKeyName} setting to a folder where the App Host content should be stored.");
DistributedApplicationBuilderExtensions.cs (2)
67throw new InvalidOperationException($"Resource '{name}' was not found."); 72throw new InvalidOperationException($"Resource '{name}' of type '{resource.GetType()}' is not assignable to requested type '{typeof(T).Name}'.");
DistributedApplicationExecutionContext.cs (2)
67throw new InvalidOperationException("IServiceProvider is not available because execution context was not constructed with DistributedApplicationExecutionContextOptions."); 72throw new InvalidOperationException("IServiceProvider is not available because the container has not yet been built.");
DistributedApplicationOptions.cs (1)
110throw new InvalidOperationException($"Failed to load AppHost assembly '{AssemblyName}' specified in {nameof(DistributedApplicationOptions)}.", ex);
Exec\ExecResourceManager.cs (3)
153throw new InvalidOperationException($"Target resource {_execOptions.ResourceName} not found in the model resources"); 175_ => throw new InvalidOperationException($"Target resource {targetExecResource.Name} does not support exec mode.") 182var projectDir = Path.GetDirectoryName(projectMetadata.ProjectPath) ?? throw new InvalidOperationException("Project path is invalid.");
Orchestrator\RelationshipEvaluator.cs (1)
77throw new InvalidOperationException($"Circular dependency detected: {string.Join(" -> ", visited)} -> {parent}");
ProjectResourceBuilderExtensions.cs (1)
694var projectDirectoryPath = Path.GetDirectoryName(projectFilePath) ?? throw new InvalidOperationException($"Unable to get directory name for {projectFilePath}");
Publishing\PublishingActivityProgressReporter.cs (9)
62throw new InvalidOperationException($"Step with ID '{step.Id}' does not exist."); 69throw new InvalidOperationException($"Cannot create task for step '{step.Id}' because the step is already complete."); 101throw new InvalidOperationException($"Cannot complete step '{step.Id}' with state '{step.CompletionState}'. Only 'InProgress' steps can be completed."); 127throw new InvalidOperationException($"Parent step with ID '{task.StepId}' does not exist."); 134throw new InvalidOperationException($"Cannot update task '{task.Id}' because its parent step '{task.StepId}' is already complete."); 159throw new InvalidOperationException($"Parent step with ID '{task.StepId}' does not exist."); 164throw new InvalidOperationException($"Cannot complete task '{task.Id}' with state '{task.CompletionState}'. Only 'InProgress' tasks can be completed."); 171throw new InvalidOperationException($"Cannot complete task '{task.Id}' because its parent step '{task.StepId}' is already complete."); 279interaction.CompletionTcs.TrySetException(new InvalidOperationException("Cannot prompt interaction while steps are in progress."));
Publishing\PublishingStep.cs (2)
102throw new InvalidOperationException("Cannot create task: Reporter is not set."); 118throw new InvalidOperationException("Cannot complete step: Reporter is not set.");
ResourceBuilderExtensions.cs (2)
497throw new InvalidOperationException("The uri for service reference must be absolute."); 502throw new InvalidOperationException("The uri absolute path must be \"/\".");
src\Shared\CircularBuffer.cs (1)
172throw new InvalidOperationException($"Cannot access index {index}. Buffer size is {Count}");
src\Shared\ConsoleLogs\LogEntries.cs (1)
104throw new InvalidOperationException("Log entries out of order.");
src\Shared\IConfigurationExtensions.cs (4)
121throw new InvalidOperationException($"Error parsing URIs from configuration value '{key}'.", ex); 158throw new InvalidOperationException($"Error parsing URIs from configuration value '{key}'.", ex); 188throw new InvalidOperationException($"Unknown {typeof(T).Name} value \"{value}\". Valid values are {string.Join(", ", Enum.GetNames(typeof(T)))}."); 208throw new InvalidOperationException($"Missing required configuration for {key}. Valid values are {string.Join(", ", Enum.GetNames(typeof(T)))}.");
src\Shared\LoggingHelpers.cs (1)
15throw new InvalidOperationException("Token must be provided.");
Aspire.Hosting.Analyzers (1)
Infrastructure\WellKnownTypes.cs (1)
75?? throw new InvalidOperationException($"Failed to resolve well-known type '{WellKnownTypeData.WellKnownTypeNames[index]}'.");
Aspire.Hosting.Azure (16)
AzureBicepResource.cs (6)
89throw new InvalidOperationException("Multiple template sources are specified."); 116?? throw new InvalidOperationException($"Could not find resource {TemplateResourceName} in assembly {GetType().Assembly}"); 139?? throw new InvalidOperationException($"Could not find resource {TemplateResourceName} in assembly {GetType().Assembly}"); 147throw new InvalidOperationException("No template source specified."); 343throw new InvalidOperationException($"No secret output for {Name}"); 400throw new InvalidOperationException($"No output for {Name}");
AzureResourcePreparer.cs (2)
94throw new InvalidOperationException("The application model does not support role assignments. Ensure you are using an environment that supports role assignments, for example AddAzureContainerAppEnvironment."); 99throw new InvalidOperationException("The application model does not support using explicit managed identities. Ensure you are using an environment that supports managed identities, for example AddAzureContainerAppEnvironment.");
Provisioning\Internal\BicepCompiler.cs (1)
49throw new InvalidOperationException($"Failed to compile bicep file: {bicepFilePath}");
Provisioning\Internal\DefaultArmClientProvider.cs (1)
41throw new InvalidOperationException($"Could not find tenant id {subscriptionResource.TenantId} for subscription {subscriptionResource.DisplayName}.");
Provisioning\Internal\DefaultUserSecretsManager.cs (1)
54throw new InvalidOperationException("User secrets path could not be determined.");
Provisioning\Provisioners\AzureProvisioner.cs (1)
261resource.AzureResource.ProvisioningTaskCompletionSource?.TrySetException(new InvalidOperationException($"Unable to resolve references from {resource.AzureResource.Name}"));
Provisioning\Provisioners\BicepProvisioner.cs (2)
205throw new InvalidOperationException($"Deployment of {resource.Name} to {resourceGroup.Name} failed with {deployment.Data.Properties.ProvisioningState}"); 281var vaultUri = resource.Outputs[kvr.VaultUriOutputReference.Name] as string ?? throw new InvalidOperationException($"{kvr.VaultUriOutputReference.Name} not found in outputs.");
Provisioning\UserSecretsPathHelper.cs (1)
57throw new InvalidOperationException($"Missing user secrets location {userSecretsFallbackDir}");
src\Aspire.Hosting\Dcp\Process\ProcessUtil.cs (1)
103processLifetimeTcs.TrySetException(new InvalidOperationException(
Aspire.Hosting.Azure.AppContainers (3)
AzureContainerAppsInfrastructure.cs (1)
67throw new InvalidOperationException($"Resource '{r.Name}' is configured to publish as an Azure Container App, but there are no '{nameof(AzureContainerAppEnvironmentResource)}' resources. Ensure you have added one by calling '{nameof(AzureContainerAppExtensions.AddAzureContainerAppEnvironment)}'.");
ContainerAppContext.cs (1)
46public AzureResourceInfrastructure Infra => _infrastructure ?? throw new InvalidOperationException("Infra is not set");
ContainerAppEnvironmentContext.cs (1)
27throw new InvalidOperationException($"Container app context not found for resource {resource.Name}.");
Aspire.Hosting.Azure.AppService (3)
AzureAppServiceEnvironmentContext.cs (1)
27throw new InvalidOperationException($"App Service context not found for resource {resource.Name}.");
AzureAppServiceInfrastructure.cs (1)
66throw new InvalidOperationException($"Resource '{r.Name}' is configured to publish as an Azure AppService Website, but there are no '{nameof(AzureAppServiceEnvironmentResource)}' resources. Ensure you have added one by calling '{nameof(AzureAppServiceEnvironmentExtensions.AddAzureAppServiceEnvironment)}'.");
AzureAppServiceWebsiteContext.cs (1)
31public AzureResourceInfrastructure Infra => _infrastructure ?? throw new InvalidOperationException("Infra is not set");
Aspire.Hosting.Azure.CosmosDB (2)
AzureCosmosDBExtensions.cs (2)
106throw new InvalidOperationException("CosmosClient is not initialized."); 126sp => cosmosClient ?? throw new InvalidOperationException("CosmosClient is not initialized."),
Aspire.Hosting.Azure.EventHubs (2)
AzureEventHubsExtensions.cs (2)
214throw new InvalidOperationException("The Azure Event Hubs resource is already configured to run as an emulator."); 291throw new InvalidOperationException("The configuration file mount could not be parsed.");
Aspire.Hosting.Azure.KeyVault (1)
AzureKeyVaultSecretReference.cs (1)
34throw new InvalidOperationException($"Secret '{secretName}' not found in Key Vault '{azureKeyVaultResource.Name}'.");
Aspire.Hosting.Azure.PostgreSQL (1)
AzurePostgresExtensions.cs (1)
242throw new InvalidOperationException($"Could not find a {nameof(AzurePostgresFlexibleServerDatabaseResource)} with name {database.Key}.");
Aspire.Hosting.Azure.ServiceBus (2)
AzureServiceBusExtensions.cs (2)
342throw new InvalidOperationException("The Azure Service Bus resource is already configured to run as an emulator."); 428throw new InvalidOperationException("The configuration file mount could not be parsed.");
Aspire.Hosting.Azure.Sql (1)
AzureSqlExtensions.cs (1)
192throw new InvalidOperationException($"Could not find a {nameof(AzureSqlDatabaseResource)} with name {database.Key}.");
Aspire.Hosting.Azure.Storage (5)
AzureStorageExtensions.cs (4)
152throw new InvalidOperationException("BlobServiceClient is not initialized."); 166return blobServiceClient ?? throw new InvalidOperationException("BlobServiceClient is not initialized."); 304return blobServiceClient ??= CreateBlobServiceClient(connectionString ?? throw new InvalidOperationException("Connection string is not initialized.")); 343sp => blobServiceClient ??= CreateBlobServiceClient(connectionString ?? throw new InvalidOperationException("Connection string is not initialized.")),
AzureStorageResource.cs (1)
59: throw new InvalidOperationException("The Azure Storage resource is not running in the local emulator.");
Aspire.Hosting.Azure.Tests (6)
PublicApiTests\ApplicationInsightsPublicApiTests.cs (2)
24_ => throw new InvalidOperationException() 46_ => throw new InvalidOperationException()
PublicApiTests\SignalRPublicApiTests.cs (2)
35_ => throw new InvalidOperationException() 57_ => throw new InvalidOperationException()
PublicApiTests\WebPubSubPublicApiTests.cs (2)
82_ => throw new InvalidOperationException() 105_ => throw new InvalidOperationException()
Aspire.Hosting.Docker (10)
DockerComposeEnvironmentContext.cs (1)
96throw new InvalidOperationException("Volume source and target must be set");
DockerComposeEnvironmentExtensions.cs (1)
118configure(builder.Resource.Dashboard ?? throw new InvalidOperationException("Dashboard resource is not initialized"));
DockerComposeInfrastructure.cs (1)
76throw new InvalidOperationException($"Resource '{r.Name}' is configured to publish as a Docker Compose service, but there are no '{nameof(DockerComposeEnvironmentResource)}' resources. Ensure you have added one by calling '{nameof(DockerComposeEnvironmentExtensions.AddDockerComposeEnvironment)}'.");
DockerComposeServiceResourceExtensions.cs (1)
72args[index++] = val ?? throw new InvalidOperationException("Value is null");
EnvVarEscaper.cs (4)
47throw new InvalidOperationException("Maximum recursion depth exceeded while processing environment variables"); 115throw new InvalidOperationException("Maximum recursion depth exceeded while processing environment variables"); 160throw new InvalidOperationException("Maximum recursion depth exceeded while processing environment variables"); 268throw new InvalidOperationException("Maximum recursion depth exceeded while processing environment variables");
UnixFileModeTypeConverter.cs (2)
21throw new InvalidOperationException(parser.Current?.ToString()); 34throw new InvalidOperationException($"Expected {nameof(UnixFileMode)} but got {value?.GetType()}");
Aspire.Hosting.Garnet (1)
GarnetBuilderExtensions.cs (1)
123builder.Services.AddHealthChecks().AddRedis(sp => connectionString ?? throw new InvalidOperationException("Connection string is unavailable"), name: healthCheckKey);
Aspire.Hosting.Kafka (1)
KafkaBuilderExtensions.cs (1)
65options.Configuration.BootstrapServers = connectionString ?? throw new InvalidOperationException("Connection string is unavailable");
Aspire.Hosting.Kafka.Tests (1)
tests\Shared\AsyncTestHelpers.cs (1)
221throw new InvalidOperationException($"Assert failed after {retries} retries: {message}");
Aspire.Hosting.Kubernetes (9)
Extensions\ResourceExtensions.cs (1)
209throw new InvalidOperationException($"Unsupported storage type: {context.Parent.DefaultStorageType}");
KubernetesInfrastructure.cs (1)
60throw new InvalidOperationException($"Resource '{r.Name}' is configured to publish as a Kubernetes service, but there are no '{nameof(KubernetesEnvironmentResource)}' resources. Ensure you have added one by calling '{nameof(KubernetesEnvironmentExtensions.AddKubernetesEnvironment)}'.");
KubernetesResource.cs (3)
168var port = endpoint.TargetPort ?? throw new InvalidOperationException($"Unable to resolve port {endpoint.TargetPort} for endpoint {endpoint.Name} on resource {resource.Name}"); 200throw new InvalidOperationException("Volume source and target must be set"); 205throw new InvalidOperationException("Bind mounts are not supported by the Kubernetes publisher");
KubernetesServiceResourceExtensions.cs (1)
78args[index++] = val ?? throw new InvalidOperationException("Value is null");
Yaml\ByteArrayStringYamlConverter.cs (1)
32throw new InvalidOperationException(parser.Current?.ToString());
Yaml\IntOrStringConverter.cs (2)
39throw new InvalidOperationException(parser.Current?.ToString()); 60throw new InvalidOperationException($"Expected {nameof(Int32OrStringV1)} but got {value?.GetType()}");
Aspire.Hosting.MongoDB (2)
MongoDBBuilderExtensions.cs (2)
77sp => client ??= new MongoClient(connectionString ?? throw new InvalidOperationException("Connection string is unavailable")), 129new MongoClient(connectionString ?? throw new InvalidOperationException("Connection string is unavailable"))
Aspire.Hosting.MySql (3)
MySqlBuilderExtensions.cs (3)
65throw new InvalidOperationException($"Could not open connection to '{resource.Name}'"); 75builder.Services.AddHealthChecks().AddMySql(sp => connectionString ?? throw new InvalidOperationException("Connection string is unavailable"), name: healthCheckKey); 120builder.ApplicationBuilder.Services.AddHealthChecks().AddMySql(sp => connectionString ?? throw new InvalidOperationException("Connection string is unavailable"), name: healthCheckKey);
Aspire.Hosting.MySql.Tests (1)
tests\Shared\AsyncTestHelpers.cs (1)
221throw new InvalidOperationException($"Assert failed after {retries} retries: {message}");
Aspire.Hosting.NodeJs.Tests (2)
NodeAppFixture.cs (1)
22public DistributedApplication App => _app ?? throw new InvalidOperationException("DistributedApplication is not initialized.");
tests\Shared\AsyncTestHelpers.cs (1)
221throw new InvalidOperationException($"Assert failed after {retries} retries: {message}");
Aspire.Hosting.Oracle (1)
OracleDatabaseBuilderExtensions.cs (1)
55.AddOracle(sp => connectionString ?? throw new InvalidOperationException("Connection string is unavailable"), name: healthCheckKey);
Aspire.Hosting.Orleans (1)
OrleansServiceExtensions.cs (1)
370throw new InvalidOperationException("Clustering has not been configured for this service.");
Aspire.Hosting.PostgreSQL (3)
PostgresBuilderExtensions.cs (3)
80throw new InvalidOperationException($"Could not open connection to '{postgresServer.Name}'"); 93builder.Services.AddHealthChecks().AddNpgSql(sp => connectionString ?? throw new InvalidOperationException("Connection string is unavailable"), name: healthCheckKey, configure: (connection) => 163builder.ApplicationBuilder.Services.AddHealthChecks().AddNpgSql(sp => connectionString ?? throw new InvalidOperationException("Connection string is unavailable"), name: healthCheckKey);
Aspire.Hosting.PostgreSQL.Tests (1)
tests\Shared\AsyncTestHelpers.cs (1)
221throw new InvalidOperationException($"Assert failed after {retries} retries: {message}");
Aspire.Hosting.Python.Tests (2)
AddPythonAppTests.cs (2)
309throw new InvalidOperationException("Failed to create virtual environment."); 337throw new InvalidOperationException("Failed to install requirements.");
Aspire.Hosting.Qdrant (3)
QdrantBuilderExtensions.cs (3)
64sp => new QdrantHealthCheck(qdrantClient ?? throw new InvalidOperationException("Qdrant Client is unavailable")), 158throw new InvalidOperationException("Connection string is unavailable"); 188throw new InvalidOperationException("Endpoint is unavailable");
Aspire.Hosting.RabbitMQ.Tests (1)
tests\Shared\AsyncTestHelpers.cs (1)
221throw new InvalidOperationException($"Assert failed after {retries} retries: {message}");
Aspire.Hosting.Redis (1)
RedisBuilderExtensions.cs (1)
85builder.Services.AddHealthChecks().AddRedis(sp => connectionString ?? throw new InvalidOperationException("Connection string is unavailable"), name: healthCheckKey);
Aspire.Hosting.SqlServer (3)
SqlServerBuilderExtensions.cs (3)
49builder.Services.AddHealthChecks().AddSqlServer(sp => connectionString ?? throw new InvalidOperationException("Connection string is unavailable"), name: healthCheckKey); 82throw new InvalidOperationException($"Could not open connection to '{sqlServer.Name}'"); 114builder.ApplicationBuilder.Services.AddHealthChecks().AddSqlServer(sp => connectionString ?? throw new InvalidOperationException("Connection string is unavailable"), name: healthCheckKey);
Aspire.Hosting.Testing (9)
DistributedApplicationEntryPointInvoker.cs (1)
101_appTcs.TrySetException(new InvalidOperationException($"The entry point exited without building a {nameof(DistributedApplication)}."));
DistributedApplicationFactory.cs (6)
289throw new InvalidOperationException($"The configured launch profile, '{launchProfileName}', was not found in the launch settings file."); 396throw new InvalidOperationException($"Assembly of specified type {entryPoint.Name} does not have an entry point."); 410throw new InvalidOperationException( 429?? throw new InvalidOperationException($"Application did not register an implementation of {typeof(IHostApplicationLifetime)}."); 472throw new InvalidOperationException("The application has not been initialized."); 567_ => throw new InvalidOperationException($"Registered service descriptor for {typeof(IHost)} does not conform to any known pattern.")
DistributedApplicationHostingTestingExtensions.cs (1)
122throw new InvalidOperationException(Resources.ApplicationNotStartedExceptionMessage);
DistributedApplicationTestingBuilder.cs (1)
365throw new InvalidOperationException("No application host assembly was found. Ensure that you have a project that references the 'Aspire.Hosting.AppHost' package and imports the 'Aspire.AppHost.Sdk' SDK.");
Aspire.Hosting.Testing.Tests (2)
TestingBuilderTests.cs (2)
42throw new InvalidOperationException($"Found unexpected AppHost files in {AppContext.BaseDirectory}: {string.Join(", ", unexpectedAppHostFiles)}"); 54?? throw new InvalidOperationException("Generated AppHost type not found.");
Aspire.Hosting.Tests (29)
Dashboard\DashboardLifecycleHookTests.cs (1)
249Exception = new InvalidOperationException("Error!").ToString(),
Dashboard\DashboardServiceTests.cs (2)
373reader.Complete(new InvalidOperationException("Error!")); 409writer.Complete(new InvalidOperationException("Error!"));
Dcp\DcpExecutorTests.cs (2)
674throw new InvalidOperationException("Unexpected type: " + logStreamType); 754throw new InvalidOperationException("Unexpected type: " + item.Type);
Health\ResourceHealthCheckServiceTests.cs (3)
104services => throw new InvalidOperationException("An error!"), 370throw new InvalidOperationException("Random failure instead of result!"); 646tcs.SetException(new InvalidOperationException("ResourceReadyEvent failed"));
Helpers\JsonDocumentManifestPublisher.cs (3)
35return _manifestDocument ?? throw new InvalidOperationException("JsonDocument not available."); 45return publisher ?? throw new InvalidOperationException($"Manifest publisher was not {nameof(JsonDocumentManifestPublisher)}"); 51return publisher ?? throw new InvalidOperationException($"Manifest publisher was not {nameof(JsonDocumentManifestPublisher)}");
Helpers\KubernetesHelper.cs (2)
25throw new InvalidOperationException($"Resource {resourceName}, not ready"); 40throw new InvalidOperationException($"Pattern {resourceNamePattern} did not match name of any resource that reached ready state");
Orchestrator\ParameterProcessorTests.cs (1)
340return new ParameterResource(name, _ => throw new InvalidOperationException($"Generic error for parameter '{name}'"), secret: false);
PublishingTests.cs (1)
251.WithAnnotation(new DeployingCallbackAnnotation(_ => throw new InvalidOperationException("Deploy failed!")));
ResourceLoggerServiceTests.cs (1)
279string n => throw new InvalidOperationException($"Unexpected {n}")
TestProgramFixture.cs (2)
19public TestProgram TestProgram => _testProgram ?? throw new InvalidOperationException("TestProgram is not initialized."); 21public DistributedApplication App => _app ?? throw new InvalidOperationException("DistributedApplication is not initialized.");
tests\Shared\AsyncTestHelpers.cs (1)
221throw new InvalidOperationException($"Assert failed after {retries} retries: {message}");
Utils\DockerUtils.cs (3)
43throw new InvalidOperationException($"Failed to inspect the deleted volume named '{volumeName}', the inspect process did not exit."); 47throw new InvalidOperationException($"Failed to delete docker volume named '{volumeName}'. Attempted to inspect the volume and it still exists."); 52throw new InvalidOperationException($"Failed to inspect the deleted volume named '{volumeName}', the inspect process did not start.");
Utils\Grpc\TestAsyncStreamReader.cs (1)
26throw new InvalidOperationException("Unable to write message.");
Utils\Grpc\TestServerCallContext.cs (1)
48throw new InvalidOperationException("Response headers have already been written.");
Utils\Grpc\TestServerStreamWriter.cs (2)
41throw new InvalidOperationException("Unable to read message."); 54throw new InvalidOperationException("Unable to write message.");
Utils\TestConsoleLogsService.cs (1)
23throw new InvalidOperationException("No console logs writer.");
WaitForTests.cs (2)
22.WithEnvironment(ctx => throw new InvalidOperationException("BOOM!")); 565resourceReadyTcs.SetException(new InvalidOperationException("The resource ready event failed!"));
Aspire.Hosting.Valkey (1)
ValkeyBuilderExtensions.cs (1)
137.AddRedis(sp => connectionString ?? throw new InvalidOperationException("Connection string is unavailable"), name: healthCheckKey);
Aspire.Hosting.Valkey.Tests (1)
tests\Shared\AsyncTestHelpers.cs (1)
221throw new InvalidOperationException($"Assert failed after {retries} retries: {message}");
Aspire.Hosting.Yarp (1)
ConfigurationBuilder\YarpCluster.cs (1)
99throw new InvalidOperationException("External service must have either a URI or a URL parameter defined.");
Aspire.Microsoft.Azure.Cosmos (6)
AspireMicrosoftAzureCosmosExtensions.cs (3)
71throw new InvalidOperationException($"The connection string '{connectionName}' does not exist or is missing the container name or database name."); 135throw new InvalidOperationException($"The connection string '{name}' does not exist or is missing the container name or database name."); 280throw new InvalidOperationException(
CosmosDatabaseBuilder.cs (3)
28throw new InvalidOperationException( 44throw new InvalidOperationException( 71throw new InvalidOperationException(
Aspire.Microsoft.Data.SqlClient (1)
src\Components\Common\ConnectionStringValidation.cs (1)
16throw new InvalidOperationException(errorMessage);
Aspire.Microsoft.Data.SqlClient.Tests (1)
SqlServerContainerFixture.cs (1)
16throw new InvalidOperationException("The test container was not initialized.");
Aspire.Microsoft.EntityFrameworkCore.Cosmos (6)
AspireAzureEFCoreCosmosExtensions.cs (3)
55throw new InvalidOperationException( 143throw new InvalidOperationException( 227throw new InvalidOperationException($"Conflicting values for 'RequestTimeout' were found in {nameof(EntityFrameworkCoreCosmosSettings)} and set in DbContextOptions<{typeof(TContext).Name}>.");
src\Components\Common\EntityFrameworkUtils.cs (3)
54throw new InvalidOperationException($"DbContext<{typeof(TContext).Name}> was not registered. Ensure you have registered the DbContext in DI before calling {memberName}."); 82throw new InvalidOperationException($"DbContext<{typeof(TContext).Name}> was not configured. Ensure you have registered the DbContext in DI before calling {memberName}."); 110throw new InvalidOperationException($"DbContext<{typeof(TContext).Name}> is already registered. Please ensure 'services.AddDbContext<{typeof(TContext).Name}>()' is not used when calling '{callerMemberName}()' or use the corresponding 'Enrich' method.");
Aspire.Microsoft.EntityFrameworkCore.SqlServer (6)
AspireSqlServerEFCoreSqlClientExtensions.cs (2)
146throw new InvalidOperationException($"{nameof(MicrosoftEntityFrameworkCoreSqlServerSettings)}.{nameof(MicrosoftEntityFrameworkCoreSqlServerSettings.DisableRetry)} needs to be set when a custom Execution Strategy is configured."); 165throw new InvalidOperationException($"Conflicting values for 'CommandTimeout' were found in {nameof(MicrosoftEntityFrameworkCoreSqlServerSettings)} and set in DbContextOptions<{typeof(TContext).Name}>.");
src\Components\Common\ConnectionStringValidation.cs (1)
16throw new InvalidOperationException(errorMessage);
src\Components\Common\EntityFrameworkUtils.cs (3)
54throw new InvalidOperationException($"DbContext<{typeof(TContext).Name}> was not registered. Ensure you have registered the DbContext in DI before calling {memberName}."); 82throw new InvalidOperationException($"DbContext<{typeof(TContext).Name}> was not configured. Ensure you have registered the DbContext in DI before calling {memberName}."); 110throw new InvalidOperationException($"DbContext<{typeof(TContext).Name}> is already registered. Please ensure 'services.AddDbContext<{typeof(TContext).Name}>()' is not used when calling '{callerMemberName}()' or use the corresponding 'Enrich' method.");
Aspire.Microsoft.EntityFrameworkCore.SqlServer.Tests (1)
tests\Aspire.Microsoft.Data.SqlClient.Tests\SqlServerContainerFixture.cs (1)
16throw new InvalidOperationException("The test container was not initialized.");
Aspire.Milvus.Client (1)
AspireMilvusExtensions.cs (1)
108throw new InvalidOperationException(
Aspire.Milvus.Client.Tests (1)
MilvusContainerFixture.cs (1)
17throw new InvalidOperationException("The test container was not initialized.");
Aspire.MongoDB.Driver (1)
src\Components\Common\ConnectionStringValidation.cs (1)
16throw new InvalidOperationException(errorMessage);
Aspire.MongoDB.Driver.Tests (1)
MongoDbContainerFixture.cs (1)
17throw new InvalidOperationException("The test container was not initialized.");
Aspire.MongoDB.Driver.v3.Tests (1)
tests\Aspire.MongoDB.Driver.Tests\MongoDbContainerFixture.cs (1)
17throw new InvalidOperationException("The test container was not initialized.");
Aspire.MySqlConnector (1)
src\Components\Common\ConnectionStringValidation.cs (1)
16throw new InvalidOperationException(errorMessage);
Aspire.MySqlConnector.Tests (1)
MySqlContainerFixture.cs (1)
17throw new InvalidOperationException("The test container was not initialized.");
Aspire.NATS.Net (1)
AspireNatsClientExtensions.cs (1)
149throw new InvalidOperationException($"NATS connection string not found: {connectionName}");
Aspire.NATS.Net.Tests (6)
NatsClientPublicApiTests.cs (5)
37_ => throw new InvalidOperationException() 73_ => throw new InvalidOperationException() 105_ => throw new InvalidOperationException() 141_ => throw new InvalidOperationException() 201_ => throw new InvalidOperationException()
NatsContainerFixture.cs (1)
17throw new InvalidOperationException("The test container was not initialized.");
Aspire.Npgsql (1)
src\Components\Common\ConnectionStringValidation.cs (1)
16throw new InvalidOperationException(errorMessage);
Aspire.Npgsql.EntityFrameworkCore.PostgreSQL (6)
AspireEFPostgreSqlExtensions.cs (2)
161throw new InvalidOperationException($"{nameof(NpgsqlEntityFrameworkCorePostgreSQLSettings)}.{nameof(NpgsqlEntityFrameworkCorePostgreSQLSettings.DisableRetry)} needs to be set when a custom Execution Strategy is configured."); 180throw new InvalidOperationException($"Conflicting values for 'CommandTimeout' were found in {nameof(NpgsqlEntityFrameworkCorePostgreSQLSettings)} and set in DbContextOptions<{typeof(TContext).Name}>.");
src\Components\Common\ConnectionStringValidation.cs (1)
16throw new InvalidOperationException(errorMessage);
src\Components\Common\EntityFrameworkUtils.cs (3)
54throw new InvalidOperationException($"DbContext<{typeof(TContext).Name}> was not registered. Ensure you have registered the DbContext in DI before calling {memberName}."); 82throw new InvalidOperationException($"DbContext<{typeof(TContext).Name}> was not configured. Ensure you have registered the DbContext in DI before calling {memberName}."); 110throw new InvalidOperationException($"DbContext<{typeof(TContext).Name}> is already registered. Please ensure 'services.AddDbContext<{typeof(TContext).Name}>()' is not used when calling '{callerMemberName}()' or use the corresponding 'Enrich' method.");
Aspire.Npgsql.EntityFrameworkCore.PostgreSQL.Tests (1)
tests\Aspire.Npgsql.Tests\PostgreSQLContainerFixture.cs (1)
17throw new InvalidOperationException("The test container was not initialized.");
Aspire.Npgsql.Tests (1)
PostgreSQLContainerFixture.cs (1)
17throw new InvalidOperationException("The test container was not initialized.");
Aspire.OpenAI (3)
AspireOpenAIClientBuilder.cs (2)
67throw new InvalidOperationException( 82throw new InvalidOperationException($"The deployment could not be determined. Ensure a '{DeploymentKey}' or '{ModelKey}' value is provided in 'ConnectionStrings:{ConnectionName}', or specify a '{DeploymentKey}' in the '{ConfigurationSectionName}' configuration section, or specify a '{nameof(deploymentName)}' in the call.");
AspireOpenAIExtensions.cs (1)
132throw new InvalidOperationException(
Aspire.Oracle.EntityFrameworkCore (6)
AspireOracleEFCoreExtensions.cs (2)
148throw new InvalidOperationException($"{nameof(OracleEntityFrameworkCoreSettings)}.{nameof(OracleEntityFrameworkCoreSettings.DisableRetry)} needs to be set when a custom Execution Strategy is configured."); 167throw new InvalidOperationException($"Conflicting values for 'CommandTimeout' were found in {nameof(OracleEntityFrameworkCoreSettings)} and set in DbContextOptions<{typeof(TContext).Name}>.");
src\Components\Common\ConnectionStringValidation.cs (1)
16throw new InvalidOperationException(errorMessage);
src\Components\Common\EntityFrameworkUtils.cs (3)
54throw new InvalidOperationException($"DbContext<{typeof(TContext).Name}> was not registered. Ensure you have registered the DbContext in DI before calling {memberName}."); 82throw new InvalidOperationException($"DbContext<{typeof(TContext).Name}> was not configured. Ensure you have registered the DbContext in DI before calling {memberName}."); 110throw new InvalidOperationException($"DbContext<{typeof(TContext).Name}> is already registered. Please ensure 'services.AddDbContext<{typeof(TContext).Name}>()' is not used when calling '{callerMemberName}()' or use the corresponding 'Enrich' method.");
Aspire.Oracle.EntityFrameworkCore.Tests (1)
OracleContainerFixture.cs (1)
20throw new InvalidOperationException("The test container was not initialized.");
Aspire.Playground.Tests (1)
tests\Shared\AsyncTestHelpers.cs (1)
221throw new InvalidOperationException($"Assert failed after {retries} retries: {message}");
Aspire.Pomelo.EntityFrameworkCore.MySql (7)
AspireEFMySqlExtensions.cs (3)
181throw new InvalidOperationException($"A DbContextOptions<{typeof(TContext).Name}> was not found. Please ensure 'ServerVersion' was configured."); 204throw new InvalidOperationException($"{nameof(PomeloEntityFrameworkCoreMySqlSettings)}.{nameof(PomeloEntityFrameworkCoreMySqlSettings.DisableRetry)} needs to be set when a custom Execution Strategy is configured."); 223throw new InvalidOperationException($"Conflicting values for 'CommandTimeout' were found in {nameof(PomeloEntityFrameworkCoreMySqlSettings)} and set in DbContextOptions<{typeof(TContext).Name}>.");
src\Components\Common\ConnectionStringValidation.cs (1)
16throw new InvalidOperationException(errorMessage);
src\Components\Common\EntityFrameworkUtils.cs (3)
54throw new InvalidOperationException($"DbContext<{typeof(TContext).Name}> was not registered. Ensure you have registered the DbContext in DI before calling {memberName}."); 82throw new InvalidOperationException($"DbContext<{typeof(TContext).Name}> was not configured. Ensure you have registered the DbContext in DI before calling {memberName}."); 110throw new InvalidOperationException($"DbContext<{typeof(TContext).Name}> is already registered. Please ensure 'services.AddDbContext<{typeof(TContext).Name}>()' is not used when calling '{callerMemberName}()' or use the corresponding 'Enrich' method.");
Aspire.Pomelo.EntityFrameworkCore.MySql.Tests (1)
tests\Aspire.MySqlConnector.Tests\MySqlContainerFixture.cs (1)
17throw new InvalidOperationException("The test container was not initialized.");
Aspire.Qdrant.Client (1)
AspireQdrantExtensions.cs (1)
109throw new InvalidOperationException(
Aspire.Qdrant.Client.Tests (1)
QdrantContainerFixture.cs (1)
23throw new InvalidOperationException("The test container was not initialized.");
Aspire.RabbitMQ.Client.Tests (4)
AspireRabbitMQLoggingTests.cs (3)
122throw new InvalidOperationException(exceptionMessage); 165InvalidOperationException innerException = new("Inner exception"); 168throw new InvalidOperationException(exceptionMessage, innerException);
RabbitMQContainerFixture.cs (1)
17throw new InvalidOperationException("The test container was not initialized.");
Aspire.RabbitMQ.Client.v7.Tests (4)
tests\Aspire.RabbitMQ.Client.Tests\AspireRabbitMQLoggingTests.cs (3)
122throw new InvalidOperationException(exceptionMessage); 165InvalidOperationException innerException = new("Inner exception"); 168throw new InvalidOperationException(exceptionMessage, innerException);
tests\Aspire.RabbitMQ.Client.Tests\RabbitMQContainerFixture.cs (1)
17throw new InvalidOperationException("The test container was not initialized.");
Aspire.RuntimeIdentifier.Tool (1)
Program.cs (1)
47string rgp = parseResult.GetValue(runtimeGraphPathOption) ?? throw new InvalidOperationException("The --runtimeGraphPath argument is required.");
Aspire.Seq (1)
AspireSeqExtensions.cs (1)
92throw new InvalidOperationException(
Aspire.StackExchange.Redis (1)
AspireRedisExtensions.cs (1)
162throw new InvalidOperationException($"No endpoints specified. Ensure a valid connection string was provided in 'ConnectionStrings:{connectionName}' or for the '{configurationSectionName}:ConnectionString' configuration key.");
Aspire.StackExchange.Redis.Tests (1)
RedisContainerFixture.cs (1)
17throw new InvalidOperationException("The test container was not initialized.");
Aspire.Templates.Tests (11)
TemplateAppFixture.cs (1)
62throw new InvalidOperationException($"The app host process is not running. {Project.AppHostProcess?.HasExited}, {Project.AppExited?.Task.IsCompleted}");
TemplateTestsBase.cs (2)
149: throw new InvalidOperationException("Playwright is not available"); 195throw new InvalidOperationException($"Failed to load dashboard page after {numAttempts} attempts");
tests\Shared\TemplatesTesting\AspireProject.cs (6)
165throw new InvalidOperationException("Project is already running"); 309throw new InvalidOperationException(exceptionMessage); 354throw new InvalidOperationException("Dashboard URL is not available"); 393throw new InvalidOperationException("Dashboard URL is not available"); 412throw new InvalidOperationException("Tried to stop the app host process but it is not running."); 489throw new InvalidOperationException("The app host process is not running.");
tests\Shared\TemplatesTesting\BuildEnvironment.cs (1)
266throw new InvalidOperationException($"Error deleting '{TestRootPath}'.", ex);
tests\Shared\TemplatesTesting\TemplateCustomHive.cs (1)
20: throw new InvalidOperationException($"TemplatesCustomHive has not been installed yet in {_customHiveDirectory}");
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(
BoundTreeGenerator (2)
BoundNodeClassWriter.cs (2)
830throw new InvalidOperationException($"Field {fieldName} not found in type {node.Name}"); 1699_ => throw new InvalidOperationException($"Unknown target language {_targetLang}")
BuildActionTelemetryTable (3)
src\Dependencies\Contracts\Contract.cs (1)
161throw new InvalidOperationException($"{message} - file {fileName} line {lineNumber}");
src\Dependencies\Contracts\ExceptionUtilities.cs (2)
27return new InvalidOperationException(output); 31=> new InvalidOperationException($"This program location is thought to be unreachable. File='{path}' Line={line}");
BuildBoss (1)
ProjectUtil.cs (1)
77throw new InvalidOperationException($"Project {Key.FilePath} does not have a TargetFramework(s) element.");
BuildValidator (4)
CompilationDiff.cs (1)
195throw new InvalidOperationException();
Program.cs (1)
374?? throw new InvalidOperationException("Failed to deserialize source links.");
RebuildArtifactResolver.cs (1)
30throw new InvalidOperationException($"Could not resolve reference: {metadataReferenceInfo.FileName}");
Util.cs (1)
81throw 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)));
CodeStyleConfigFileGenerator (4)
Program.cs (1)
81=> throw e.Exception ?? new InvalidOperationException(e.Message);
src\Dependencies\Contracts\Contract.cs (1)
161throw new InvalidOperationException($"{message} - file {fileName} line {lineNumber}");
src\Dependencies\Contracts\ExceptionUtilities.cs (2)
27return new InvalidOperationException(output); 31=> new InvalidOperationException($"This program location is thought to be unreachable. File='{path}' Line={line}");
ConfigurationSchemaGenerator (12)
ConfigSchemaEmitter.cs (3)
82throw new InvalidOperationException("Ensure Types and ConfigurationPaths are the same length."); 215throw new InvalidOperationException($"Unknown type {type}"); 675_ => throw new InvalidOperationException($"Unknown parsable type {parsable.DisplayString}")
ConfigSchemaGenerator.cs (2)
67throw new InvalidOperationException("ConfigurationSchemaAttribute should only be used with 3 ctor arguments."); 90throw new InvalidOperationException("LoggingCategoriesAttribute should only be used with 1 ctor argument.");
DiagnosticDescriptors.cs (1)
80_ => throw new InvalidOperationException()
RuntimeSource\Configuration.Binder\Parser\ConfigurationBinder.cs (2)
78_ => throw new InvalidOperationException() 130throw new InvalidOperationException();
RuntimeSource\Configuration.Binder\Specs\TypeIndex.cs (3)
20_ => throw new InvalidOperationException(), 28_ => throw new InvalidOperationException(), 37_ => throw new InvalidOperationException(),
RuntimeSource\Roslyn\GetBestTypeByMetadataName.cs (1)
184_ => throw new InvalidOperationException("Unreachable"),
csc (5)
src\Compilers\Shared\BuildProtocol.cs (1)
356throw new InvalidOperationException("Received invalid response type from server.");
src\Compilers\Shared\BuildServerConnection.cs (3)
695throw new InvalidOperationException("Unable to acquire guard"); 764throw new InvalidOperationException("Lock already held"); 876throw new InvalidOperationException("Lock already held");
src\Compilers\Shared\ConsoleUtil.cs (1)
47throw new InvalidOperationException("Utf8Output is only supported when writing to Console.Out");
CSharpSyntaxGenerator (6)
AbstractFileWriter.cs (3)
58throw new InvalidOperationException("Cannot unindent from base level"); 116_ => throw new InvalidOperationException("Join must be passed strings or collections of strings") 384_ => throw new InvalidOperationException("Unexpected node type.")
Grammar\GrammarGenerator.cs (1)
317_ => throw new InvalidOperationException(),
SourceWriter.cs (1)
911throw new InvalidOperationException("field cannot be a random SyntaxNodeOrTokenList");
TreeFlattening.cs (1)
52throw new InvalidOperationException("Unknown child type.");
DemoConsole (9)
DesignSurfaceExtended.cs (6)
106throw new InvalidOperationException($"the BeginLoad() failed! Some error during {typeof(TControl).FullName} loding"); 143throw new InvalidOperationException($"Undefined Host Type: {hostType}"); 150throw new InvalidOperationException($"{Name}::CreateRootComponent() - Exception: (see Inner Exception)", ex); 186throw new InvalidOperationException($"{Name}::CreateControl() - Exception: (see Inner Exception)", ex); 223throw new InvalidOperationException($"{Name}::{nameof(CreateComponent)} - Exception: (see Inner Exception)", ex); 373throw new InvalidOperationException($"{Name}::DoAction() - Exception: error in performing the action: {command}(see Inner Exception)", ex);
TabOrderHooker.cs (3)
19throw new InvalidOperationException($"{Name}::HookTabOrder() - Exception: the TabOrder must be invoked after the DesignSurface has been loaded! "); 37throw new InvalidOperationException($"{Name}::HookTabOrder() - Exception: (see Inner Exception)", ex); 58throw new InvalidOperationException($"{Name}::DisposeTabOrder() - Exception: (see Inner Exception)", ex);
Diagnostics.EFCore.FunctionalTests (1)
DatabaseErrorPageMiddlewareTest.cs (1)
93throw new InvalidOperationException("Exception requested from TestMiddleware");
dotnet-dev-certs (11)
src\Shared\CertificateGeneration\CertificateManager.cs (5)
369throw new InvalidOperationException($"The directory '{exportDir}' does not exist. Choose permissions carefully when creating it."); 605throw new InvalidOperationException("Unknown format."); 791throw new InvalidOperationException($"'{nameof(RemoveLocations.Undefined)}' is not a valid location."); 803throw new InvalidOperationException("Invalid location."); 833throw new InvalidOperationException($"Failed to create a key with a size of {minimumKeySize} bits");
src\Shared\CertificateGeneration\MacOSCertificateManager.cs (4)
110throw new InvalidOperationException("There was an error trusting the certificate."); 265throw new InvalidOperationException($@"There was an error removing the certificate with thumbprint '{certificate.Thumbprint}'. 282throw new InvalidOperationException($"Can't determine the subject for the certificate with subject '{certificate.Subject}'."); 366throw 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)
447throw new InvalidOperationException($@"There was an error removing the certificate with thumbprint '{certificate.Thumbprint}'.");
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-svcutil-lib (1102)
CodeDomFixup\MethodCreationHelper.cs (5)
211throw new InvalidOperationException(string.Format(CultureInfo.CurrentCulture, SR.ErrBindingTypeNotSupportedFormat, binding.GetType().FullName)); 1084throw new InvalidOperationException(string.Format(CultureInfo.CurrentCulture, SR.ErrBindingElementNotSupportedFormat, bindingElement.GetType().FullName)); 1632throw new InvalidOperationException(string.Format(CultureInfo.CurrentCulture, SR.ErrEncodingNotSupportedFormat, encoding.WebName)); 1658throw new InvalidOperationException(string.Format(CultureInfo.CurrentCulture, SR.ErrMessageVersionNotSupportedFormat, messageVersion)); 1676throw new InvalidOperationException(string.Format(CultureInfo.CurrentCulture, SR.ErrMessageVersionNotSupportedFormat, messagingVersion));
FrameworkFork\Microsoft.CodeDom\Compiler\CodeGenerator.cs (6)
452throw new InvalidOperationException(SRCodeDom.CodeGenOutputWriter); 481throw new InvalidOperationException(SRCodeDom.CodeGenOutputWriter); 510throw new InvalidOperationException(SRCodeDom.CodeGenOutputWriter); 546throw new InvalidOperationException(SRCodeDom.CodeGenOutputWriter); 575throw new InvalidOperationException(SRCodeDom.CodeGenOutputWriter); 602throw new InvalidOperationException(SRCodeDom.CodeGenReentrance);
FrameworkFork\Microsoft.CodeDom\Compiler\CompilerInfo.cs (1)
100throw new InvalidOperationException(string.Format(SRCodeDom.Provider_does_not_support_options, CodeDomProviderType.ToString()));
FrameworkFork\Microsoft.CodeDom\Microsoft\CSharpCodeProvider.cs (6)
866throw new InvalidOperationException(SRCodeDom.CodeGenReentrance); 4291throw new InvalidOperationException(SRCodeDom.CodeGenOutputWriter); 4320throw new InvalidOperationException(SRCodeDom.CodeGenOutputWriter); 4349throw new InvalidOperationException(SRCodeDom.CodeGenOutputWriter); 4385throw new InvalidOperationException(SRCodeDom.CodeGenOutputWriter); 4414throw new InvalidOperationException(SRCodeDom.CodeGenOutputWriter);
FrameworkFork\Microsoft.Xml\Xml\Core\HtmlEncodedRawTextWriter.cs (3)
425throw new InvalidOperationException(ResXml.Xml_InvalidOperation); 430throw new InvalidOperationException(ResXml.Xml_InvalidOperation); 435throw new InvalidOperationException(ResXml.Xml_InvalidOperation);
FrameworkFork\Microsoft.Xml\Xml\Core\HtmlUtf8RawTextWriter.cs (3)
424throw new InvalidOperationException(ResXml.Xml_InvalidOperation); 429throw new InvalidOperationException(ResXml.Xml_InvalidOperation); 434throw new InvalidOperationException(ResXml.Xml_InvalidOperation);
FrameworkFork\Microsoft.Xml\Xml\Core\ReadContentAsBinaryHelper.cs (4)
108throw new InvalidOperationException(ResXml.Xml_MixingBinaryContentMethods); 164throw new InvalidOperationException(ResXml.Xml_MixingBinaryContentMethods); 212throw new InvalidOperationException(ResXml.Xml_MixingBinaryContentMethods); 268throw new InvalidOperationException(ResXml.Xml_MixingBinaryContentMethods);
FrameworkFork\Microsoft.Xml\Xml\Core\ReadContentAsBinaryHelperAsync.cs (4)
58throw new InvalidOperationException(ResXml.Xml_MixingBinaryContentMethods); 114throw new InvalidOperationException(ResXml.Xml_MixingBinaryContentMethods); 162throw new InvalidOperationException(ResXml.Xml_MixingBinaryContentMethods); 218throw new InvalidOperationException(ResXml.Xml_MixingBinaryContentMethods);
FrameworkFork\Microsoft.Xml\Xml\Core\XmlAsyncCheckReader.cs (1)
69throw new InvalidOperationException(ResXml.Xml_AsyncIsRunningException);
FrameworkFork\Microsoft.Xml\Xml\Core\XmlRawWriter.cs (15)
62throw new InvalidOperationException(ResXml.Xml_InvalidOperation); 67throw new InvalidOperationException(ResXml.Xml_InvalidOperation); 72throw new InvalidOperationException(ResXml.Xml_InvalidOperation); 82throw new InvalidOperationException(ResXml.Xml_InvalidOperation); 88throw new InvalidOperationException(ResXml.Xml_InvalidOperation); 105throw new InvalidOperationException(ResXml.Xml_InvalidOperation); 113throw new InvalidOperationException(ResXml.Xml_InvalidOperation); 120get { throw new InvalidOperationException(ResXml.Xml_InvalidOperation); } 126get { throw new InvalidOperationException(ResXml.Xml_InvalidOperation); } 132throw new InvalidOperationException(ResXml.Xml_InvalidOperation); 138throw new InvalidOperationException(ResXml.Xml_InvalidOperation); 144throw new InvalidOperationException(ResXml.Xml_InvalidOperation); 215throw new InvalidOperationException(ResXml.Xml_InvalidOperation); 220throw new InvalidOperationException(ResXml.Xml_InvalidOperation); 225throw new InvalidOperationException(ResXml.Xml_InvalidOperation);
FrameworkFork\Microsoft.Xml\Xml\Core\XmlReader.cs (4)
793throw new InvalidOperationException(ResXml.Xml_InvalidOperation); 1395throw new InvalidOperationException(ResXml.Xml_ReadSubtreeNotOnElement); 1583return new InvalidOperationException(AddLineInfo(string.Format(ResXml.Xml_InvalidReadContentAs, new string[] { methodName, nodeType.ToString() }), lineInfo)); 1588return new InvalidOperationException(AddLineInfo(string.Format(ResXml.Xml_InvalidReadElementContentAs, new string[] { methodName, nodeType.ToString() }), lineInfo));
FrameworkFork\Microsoft.Xml\Xml\Core\XmlReaderSettings.cs (2)
670throw new InvalidOperationException(string.Format(ResXml.Xml_IncompatibleConformanceLevel, _conformanceLevel.ToString())); 728throw new InvalidOperationException(string.Format(ResXml.Xml_IncompatibleConformanceLevel, _conformanceLevel.ToString()));
FrameworkFork\Microsoft.Xml\Xml\Core\XmlSubtreeReader.cs (7)
890throw new InvalidOperationException(ResXml.Xml_MixingBinaryContentMethods); 947throw new InvalidOperationException(ResXml.Xml_MixingBinaryContentMethods); 1026throw new InvalidOperationException(ResXml.Xml_MixingBinaryContentMethods); 1082throw new InvalidOperationException(ResXml.Xml_MixingBinaryContentMethods); 1141throw new InvalidOperationException(ResXml.Xml_MixingReadValueChunkWithBinary); 1512throw new InvalidOperationException(ResXml.Xml_ClosedOrErrorReader); 1530throw new InvalidOperationException(ResXml.Xml_MixingReadValueChunkWithBinary);
FrameworkFork\Microsoft.Xml\Xml\Core\XmlSubtreeReaderAsync.cs (5)
307throw new InvalidOperationException(ResXml.Xml_MixingBinaryContentMethods); 364throw new InvalidOperationException(ResXml.Xml_MixingBinaryContentMethods); 443throw new InvalidOperationException(ResXml.Xml_MixingBinaryContentMethods); 499throw new InvalidOperationException(ResXml.Xml_MixingBinaryContentMethods); 550throw new InvalidOperationException(ResXml.Xml_MixingReadValueChunkWithBinary);
FrameworkFork\Microsoft.Xml\Xml\Core\XmlTextReaderImpl.cs (13)
1502throw new InvalidOperationException(ResXml.Xml_InvalidOperation); 1578throw new InvalidOperationException(ResXml.Xml_InvalidOperation); 1638throw new InvalidOperationException(ResXml.Xml_MixingBinaryContentMethods); 1698throw new InvalidOperationException(ResXml.Xml_MixingBinaryContentMethods); 1757throw new InvalidOperationException(ResXml.Xml_MixingBinaryContentMethods); 1817throw new InvalidOperationException(ResXml.Xml_MixingBinaryContentMethods); 1851throw new InvalidOperationException(string.Format(ResXml.Xml_InvalidReadValueChunk, _curNode.type)); 2037throw new InvalidOperationException(ResXml.Xml_InvalidOperation); 2079throw new InvalidOperationException(ResXml.Xml_InvalidOperation); 2112throw new InvalidOperationException(ResXml.Xml_InvalidOperation); 2189Throw(new InvalidOperationException(ResXml.Xml_InvalidResetStateCall)); 9020throw new InvalidOperationException(ResXml.Xml_MixingReadValueChunkWithBinary); 9024throw new InvalidOperationException(ResXml.Xml_MixingV1StreamingWithV2Binary);
FrameworkFork\Microsoft.Xml\Xml\Core\XmlTextWriter.cs (7)
325throw new InvalidOperationException(ResXml.Xml_NotInWriteState); 1137throw new InvalidOperationException(ResXml.Xml_NotTheFirst); 1171throw new InvalidOperationException(ResXml.Xml_Closed); 1175throw new InvalidOperationException(string.Format(ResXml.Xml_WrongToken, s_tokenName[(int)token], s_stateName[(int)State.Error])); 1181throw new InvalidOperationException(string.Format(ResXml.Xml_WrongToken, s_tokenName[(int)token], s_stateName[(int)_currentState])); 1284throw new InvalidOperationException(ResXml.Xml_InvalidOperation); 1308throw new InvalidOperationException(ResXml.Xml_NoStartTag);
FrameworkFork\Microsoft.Xml\Xml\Core\XmlValidatingReaderImpl.cs (3)
759throw new InvalidOperationException(ResXml.Xml_InvalidOperation); 889throw new InvalidOperationException(ResXml.Xml_InvalidOperation); 970throw new InvalidOperationException(ResXml.Xml_InvalidOperation);
FrameworkFork\Microsoft.Xml\Xml\Core\XmlWellformedWriter.cs (8)
387throw new InvalidOperationException(ResXml.Xml_DtdNotAllowedInFragment); 394throw new InvalidOperationException(ResXml.Xml_DtdAlreadyWritten); 1574throw new InvalidOperationException(ResXml.Xml_ClosedOrError); 1655throw new InvalidOperationException(ResXml.Xml_CannotStartDocumentOnFragment); 1948throw new InvalidOperationException(ResXml.Xml_ClosedOrError); 1952throw new InvalidOperationException(string.Format(ResXml.Xml_WrongToken, tokenName[(int)token], GetStateName(_currentState))); 2203throw new InvalidOperationException(wrongTokenMessage + ' ' + ResXml.Xml_ConformanceLevelFragment); 2207throw new InvalidOperationException(wrongTokenMessage);
FrameworkFork\Microsoft.Xml\Xml\Core\XsdCachingReader.cs (1)
597throw new InvalidOperationException();
FrameworkFork\Microsoft.Xml\Xml\Core\XsdValidatingReader.cs (2)
1498throw new InvalidOperationException(); 1932throw new InvalidOperationException();
FrameworkFork\Microsoft.Xml\Xml\Core\XsdValidatingReaderAsync.cs (1)
506throw new InvalidOperationException();
FrameworkFork\Microsoft.Xml\Xml\Dom\DocumentSchemaValidator.cs (4)
160throw new InvalidOperationException(string.Format(ResXml.XmlDocument_ValidateInvalidNodeType, null)); 289throw new InvalidOperationException(string.Format(ResXml.Xml_InvalidXmlDocument, string.Format(ResXml.Xdom_NoRootEle))); 333throw new InvalidOperationException(string.Format(ResXml.Xml_UnexpectedNodeType, new string[] { _currentNode.NodeType.ToString() })); 780throw new InvalidOperationException(string.Format(ResXml.Xml_UnexpectedNodeType, new string[] { _currentNode.NodeType.ToString() }));
FrameworkFork\Microsoft.Xml\Xml\Dom\DocumentXmlWriter.cs (12)
178throw new InvalidOperationException(); 194throw new InvalidOperationException(); 224throw new InvalidOperationException(); 271throw new InvalidOperationException(); 376throw new InvalidOperationException(ResXml.Xpn_MissingParent); 387throw new InvalidOperationException(ResXml.Xpn_MissingParent); 412throw new InvalidOperationException(ResXml.Xpn_NoContent); 453throw new InvalidOperationException(ResXml.Xpn_MissingParent); 459throw new InvalidOperationException(ResXml.Xpn_BadPosition); 463throw new InvalidOperationException(ResXml.Xdom_Node_Modify_ReadOnly); 507throw new InvalidOperationException(); 611throw new InvalidOperationException(ResXml.Xml_ClosedOrError);
FrameworkFork\Microsoft.Xml\Xml\Dom\DocumentXPathNavigator.cs (17)
74throw new InvalidOperationException(ResXml.Xdom_Node_Modify_ReadOnly); 85throw new InvalidOperationException(ResXml.Xpn_BadPosition); 1285throw new InvalidOperationException(ResXml.XmlDocument_NoSchemaInfo); 1524throw new InvalidOperationException(ResXml.Xpn_BadPosition); 1541throw new InvalidOperationException(ResXml.Xpn_BadPosition); 1558throw new InvalidOperationException(ResXml.Xpn_BadPosition); 1581throw new InvalidOperationException(ResXml.Xpn_BadPosition); 1602throw new InvalidOperationException(ResXml.Xpn_BadPosition); 1638throw new InvalidOperationException(ResXml.Xpn_BadPosition); 1657throw new InvalidOperationException(ResXml.Xpn_BadPosition); 1723throw new InvalidOperationException(ResXml.Xpn_BadPosition); 1734throw new InvalidOperationException(ResXml.Xpn_BadPosition); 1785throw new InvalidOperationException(ResXml.Xpn_BadPosition); 1796throw new InvalidOperationException(ResXml.Xpn_MissingParent); 1800throw new InvalidOperationException(ResXml.Xdom_Node_Modify_ReadOnly); 1811throw new InvalidOperationException(ResXml.Xpn_MissingParent); 1816throw new InvalidOperationException(ResXml.Xdom_Node_Modify_ReadOnly);
FrameworkFork\Microsoft.Xml\Xml\Dom\XmlChildEnumerator.cs (1)
63throw new InvalidOperationException(ResXml.Xml_InvalidOperation);
FrameworkFork\Microsoft.Xml\Xml\Dom\XmlDocument.cs (9)
407throw new InvalidOperationException(ResXml.Xdom_DualDocumentTypeNode); 412throw new InvalidOperationException(ResXml.Xdom_DualDocumentElementNode); 417throw new InvalidOperationException(ResXml.Xdom_DualDeclarationNode); 898throw new InvalidOperationException(ResXml.Xdom_Import_NullNode); 958throw new InvalidOperationException(String.Format(CultureInfo.InvariantCulture, ResXml.Xdom_Import, node.NodeType.ToString())); 1312throw new InvalidOperationException(ResXml.Xdom_Document_Innertext); 1435throw new InvalidOperationException(ResXml.XmlDocument_NoSchemaInfo); 1726throw new InvalidOperationException(ResXml.Xdom_Node_Insert_TypeConflict); 1729throw new InvalidOperationException(ResXml.Xdom_Node_Insert_Location);
FrameworkFork\Microsoft.Xml\Xml\Dom\XmlElement.cs (1)
312throw new InvalidOperationException(ResXml.Xdom_Attr_InUse);
FrameworkFork\Microsoft.Xml\Xml\Dom\XmlElementList.cs (1)
306throw new InvalidOperationException(ResXml.Xdom_Enum_ElementList);
FrameworkFork\Microsoft.Xml\Xml\Dom\XmlEntity.cs (3)
36throw new InvalidOperationException(ResXml.Xdom_Node_Cloning); 72throw new InvalidOperationException(ResXml.Xdom_Ent_Innertext); 143set { throw new InvalidOperationException(ResXml.Xdom_Set_InnerXml); }
FrameworkFork\Microsoft.Xml\Xml\Dom\XmlEntityReference.cs (1)
74throw new InvalidOperationException(ResXml.Xdom_EntRef_SetVal);
FrameworkFork\Microsoft.Xml\Xml\Dom\XmlLoader.cs (1)
1007return new InvalidOperationException(string.Format(CultureInfo.InvariantCulture, ResXml.Xml_UnexpectedNodeType, nodetype.ToString()));
FrameworkFork\Microsoft.Xml\Xml\Dom\XmlNamedNodeMap.SmallXmlNodeList.cs (1)
159throw new InvalidOperationException();
FrameworkFork\Microsoft.Xml\Xml\Dom\XmlNode.cs (13)
101set { throw new InvalidOperationException(string.Format(ResXml.Xdom_Node_SetVal, NodeType)); } 242throw new InvalidOperationException(ResXml.Xdom_Node_Insert_Contain); 256throw new InvalidOperationException(ResXml.Xdom_Node_Insert_Location); 277throw new InvalidOperationException(ResXml.Xdom_Node_Insert_TypeConflict); 356throw new InvalidOperationException(ResXml.Xdom_Node_Insert_Contain); 370throw new InvalidOperationException(ResXml.Xdom_Node_Insert_Location); 393throw new InvalidOperationException(ResXml.Xdom_Node_Insert_TypeConflict); 477throw new InvalidOperationException(ResXml.Xdom_Node_Remove_Contain); 574throw new InvalidOperationException(ResXml.Xdom_Node_Insert_Contain); 602throw new InvalidOperationException(ResXml.Xdom_Node_Insert_TypeConflict); 606throw new InvalidOperationException(ResXml.Xdom_Node_Insert_Location); 988throw new InvalidOperationException(ResXml.Xdom_Set_InnerXml); 1300throw new InvalidOperationException(ResXml.Xdom_Node_Modify_ReadOnly);
FrameworkFork\Microsoft.Xml\Xml\Dom\XmlNodeReader.cs (2)
1740throw new InvalidOperationException(ResXml.Xml_InvalidOperation); 1787throw new InvalidOperationException(ResXml.Xnr_ResolveEntity);
FrameworkFork\Microsoft.Xml\Xml\Dom\XmlNotation.cs (2)
45throw new InvalidOperationException(ResXml.Xdom_Node_Cloning); 83set { throw new InvalidOperationException(ResXml.Xdom_Set_InnerXml); }
FrameworkFork\Microsoft.Xml\Xml\Dom\XmlText.cs (1)
113throw new InvalidOperationException(ResXml.Xdom_TextNode_SplitText);
FrameworkFork\Microsoft.Xml\Xml\EmptyEnumerator.cs (1)
28throw new InvalidOperationException(ResXml.Xml_InvalidOperation);
FrameworkFork\Microsoft.Xml\Xml\schema\ContentValidator.cs (6)
388throw new InvalidOperationException(); 431throw new InvalidOperationException(); 437get { throw new InvalidOperationException(); } 1142throw new InvalidOperationException(); 1148throw new InvalidOperationException(); 1154throw new InvalidOperationException();
FrameworkFork\Microsoft.Xml\Xml\schema\NamespaceList.cs (1)
101throw new InvalidOperationException();
FrameworkFork\Microsoft.Xml\Xml\schema\XdrBuilder.cs (1)
573throw new InvalidOperationException(ResXml.Xml_InvalidOperation); // should never be called
FrameworkFork\Microsoft.Xml\Xml\schema\XmlSchemaObjectTable.cs (8)
317throw new InvalidOperationException(string.Format(ResXml.Sch_EnumNotStarted, string.Empty)); 321throw new InvalidOperationException(string.Format(ResXml.Sch_EnumFinished, string.Empty)); 376throw new InvalidOperationException(string.Format(ResXml.Sch_EnumNotStarted, string.Empty)); 380throw new InvalidOperationException(string.Format(ResXml.Sch_EnumFinished, string.Empty)); 392throw new InvalidOperationException(string.Format(ResXml.Sch_EnumNotStarted, string.Empty)); 396throw new InvalidOperationException(string.Format(ResXml.Sch_EnumFinished, string.Empty)); 408throw new InvalidOperationException(string.Format(ResXml.Sch_EnumNotStarted, string.Empty)); 412throw new InvalidOperationException(string.Format(ResXml.Sch_EnumFinished, string.Empty));
FrameworkFork\Microsoft.Xml\Xml\schema\XmlSchemaValidator.cs (9)
383throw new InvalidOperationException(string.Format(ResXml.Sch_InvalidStateTransition, new string[] { s_methodNames[(int)_currentState], s_methodNames[(int)ValidatorState.Start] })); 393throw new InvalidOperationException(string.Format(ResXml.Sch_InvalidStateTransition, new string[] { s_methodNames[(int)_currentState], s_methodNames[(int)ValidatorState.Start] })); 931throw new InvalidOperationException(ResXml.Sch_InvalidEndElementCall); 940throw new InvalidOperationException(string.Format(ResXml.Sch_InvalidEndElementMultiple, s_methodNames[(int)ValidatorState.SkipToEndElement])); 972throw new InvalidOperationException(ResXml.Sch_InvalidEndValidation); 1201throw new InvalidOperationException(string.Format(ResXml.Sch_InvalidEndElementMultiple, s_methodNames[(int)ValidatorState.EndElement])); 1251throw new InvalidOperationException(ResXml.Sch_InvalidEndElementCallTyped); 2111throw new InvalidOperationException(string.Format(ResXml.Sch_InvalidStartTransition, new string[] { methodName, s_methodNames[(int)ValidatorState.Start] })); 2113throw new InvalidOperationException(string.Format(ResXml.Sch_InvalidStateTransition, new string[] { s_methodNames[(int)_currentState], methodName }));
FrameworkFork\Microsoft.Xml\Xml\Serialization\Advanced\SchemaImporterExtension.cs (2)
121throw new InvalidOperationException(string.Format(ResXml.XmlConfigurationDuplicateExtension, name)); 209throw new InvalidOperationException(string.Format(ResXml.XmlExtensionDuplicateDefinition, _extension.GetType().FullName, _clrType));
FrameworkFork\Microsoft.Xml\Xml\Serialization\CodeExporter.cs (1)
167throw new InvalidOperationException(ResXml.XmlMappingsScopeMismatch);
FrameworkFork\Microsoft.Xml\Xml\Serialization\CodeGenerator.cs (2)
1531throw new InvalidOperationException("ArrayTypeIsNotSupported"); //.Serialization.DiagnosticUtility.ExceptionUtility.ThrowHelperError(XmlObjectSerializer.CreateSerializationException(string.Format(SR.ArrayTypeIsNotSupported, DataContract.GetClrTypeFullName(arrayElementType)))); 1610throw new InvalidOperationException("ArrayTypeIsNotSupported"); //.Serialization.DiagnosticUtility.ExceptionUtility.ThrowHelperError(XmlObjectSerializer.CreateSerializationException(string.Format(SR.ArrayTypeIsNotSupported, DataContract.GetClrTypeFullName(arrayElementType))));
FrameworkFork\Microsoft.Xml\Xml\Serialization\Compilation.cs (8)
114throw new InvalidOperationException(string.Format(ResXml.XmlSerializerExpired, assembly.FullName, /*assembly.CodeBase*/ null), missingMethod); 123if (type == null) throw new InvalidOperationException(string.Format(ResXml.XmlMissingType, typeName, assembly.FullName)); 148throw new InvalidOperationException(string.Format(ResXml.XmlInvalidEncoding3, encodingStyle, Soap.Encoding, Soap12.Encoding)); 153throw new InvalidOperationException(string.Format(ResXml.XmlInvalidEncodingNotEncoded1, encodingStyle)); 183throw new InvalidOperationException(string.Format(ResXml.XmlNotSerializable, mapping.Accessor.Name)); 191throw new InvalidOperationException(ResXml.XmlNoPartialTrust, e); 217throw new InvalidOperationException(string.Format(ResXml.XmlNotSerializable, mapping.Accessor.Name)); 225throw new InvalidOperationException(ResXml.XmlNoPartialTrust, e);
FrameworkFork\Microsoft.Xml\Xml\Serialization\Mappings.cs (15)
236throw new InvalidOperationException(string.Format(ResXml.Xml_InvalidNameChars, Name)); 610throw new InvalidOperationException(string.Format(ResXml.XmlHiddenMember, parent, member.Name, member.TypeDesc.FullName, this.TypeName, _members[i].Name, _members[i].TypeDesc.FullName)); 613throw new InvalidOperationException(string.Format(ResXml.XmlInvalidXmlOverride, parent, member.Name, this.TypeName, _members[i].Name)); 638throw new InvalidOperationException(string.Format(ResXml.XmlIllegalSimpleContentExtension, TypeDesc.FullName, BaseMapping.TypeDesc.FullName)); 651throw new InvalidOperationException(string.Format(ResXml.XmlIllegalTypedTextAttribute, TypeDesc.FullName, text.Name, text.Mapping.TypeDesc.FullName)); 1152throw new InvalidOperationException(string.Format(ResXml.XmlCircularDerivation, TypeDesc.FullName)); 1276throw new InvalidOperationException(string.Format(ResXml.XmlSerializableSchemaError, typeof(IXmlSerializable).Name, args.Message)); 1309throw new InvalidOperationException(string.Format(ResXml.XmlSerializableRootDupName, _getSchemaMethod.DeclaringType.FullName, e.Name, elementNs)); 1363throw new InvalidOperationException(string.Format(ResXml.XmlGetSchemaEmptyTypeName, _type.FullName, _getSchemaMethod.Name)); 1368throw new InvalidOperationException(string.Format(ResXml.XmlGetSchemaMethodReturnType, _type.Name, _getSchemaMethod.Name, typeof(XmlSchemaProviderAttribute).Name, typeof(XmlQualifiedName).FullName)); 1391throw new InvalidOperationException(string.Format(ResXml.XmlMissingSchema, _xsiType.Namespace)); 1395throw new InvalidOperationException(string.Format(ResXml.XmlGetSchemaInclude, _xsiType.Namespace, _getSchemaMethod.DeclaringType.FullName, _getSchemaMethod.Name)); 1400throw new InvalidOperationException(string.Format(ResXml.XmlMissingSchema, _xsiType.Namespace)); 1405throw new InvalidOperationException(string.Format(ResXml.XmlGetSchemaTypeMissing, _getSchemaMethod.DeclaringType.FullName, _getSchemaMethod.Name, _xsiType.Name, _xsiType.Namespace)); 1418if (_schema.Id == null || _schema.Id.Length == 0) throw new InvalidOperationException(string.Format(ResXml.XmlSerializableNameMissing1, _type.FullName));
FrameworkFork\Microsoft.Xml\Xml\Serialization\Models.cs (3)
195throw new InvalidOperationException(string.Format(ResXml.XmlSerializerUnsupportedMember, member.DeclaringType.FullName + "." + member.Name, type.FullName), typeDesc.Exception); 290throw new InvalidOperationException(string.Format(ResXml.XmlInvalidSpecifiedType, specifiedField.Name, specifiedField.FieldType.FullName, typeof(bool).FullName)); 307throw new InvalidOperationException(string.Format(ResXml.XmlInvalidSpecifiedType, specifiedProperty.Name, specifiedProperty.PropertyType.FullName, typeof(bool).FullName));
FrameworkFork\Microsoft.Xml\Xml\Serialization\SchemaImporter.cs (2)
168throw new InvalidOperationException(string.Format(ResXml.XmlInvalidBaseType, structMapping.TypeDesc.FullName, baseType.FullName, typeDescToChange.BaseTypeDesc.FullName)); 218throw new InvalidOperationException(string.Format(error, name.Name, name.Namespace));
FrameworkFork\Microsoft.Xml\Xml\Serialization\SoapAttributeOverrides.cs (1)
45throw new InvalidOperationException(string.Format(ResXml.XmlMultipleAttributeOverrides, type.FullName, member));
FrameworkFork\Microsoft.Xml\Xml\Serialization\SoapReflectionImporter.cs (21)
174return new InvalidOperationException(string.Format(ResXml.XmlReflectionError, context), e); 202throw new InvalidOperationException(string.Format(ResXml.XmlInvalidDataTypeUsage, dataType, "SoapElementAttribute.DataType")); 207throw new InvalidOperationException(string.Format(ResXml.XmlInvalidXsdDataType, dataType, "SoapElementAttribute.DataType", new XmlQualifiedName(dataType, XmlSchema.Namespace).ToString())); 211throw new InvalidOperationException(string.Format(ResXml.XmlDataTypeMismatch, dataType, "SoapElementAttribute.DataType", model.TypeDesc.FullName)); 218throw new InvalidOperationException(string.Format(ResXml.XmlInvalidTypeAttributes, model.Type.FullName)); 284throw new InvalidOperationException(string.Format(ResXml.XmlTypesDuplicate, typeDesc.FullName, mapping.TypeDesc.FullName, typeName, ns)); 306throw new InvalidOperationException(string.Format(ResXml.XmlTypesDuplicate, typeDesc.FullName, existingMapping.TypeDesc.FullName, typeDesc.Name, existingMapping.Namespace)); 311throw new InvalidOperationException(string.Format(ResXml.XmlTypesDuplicate, typeDesc.FullName, existingMapping.TypeDesc.FullName, typeDesc.Name, existingMapping.Namespace)); 369throw new InvalidOperationException(string.Format(ResXml.XmlInternalErrorDetails, "DeferredWorkItems.Count have changed")); 371throw new InvalidOperationException(string.Format(ResXml.XmlInternalErrorDetails, "DeferredWorkItems.Top have changed")); 531throw new InvalidOperationException(string.Format(ResXml.XmlInvalidSoapArray, mapping.TypeDesc.FullName)); 571throw new InvalidOperationException(string.Format(ResXml.XmlUdeclaredXsdType, dataType)); 612throw new InvalidOperationException(string.Format(ResXml.XmlNoSerializableMembers, model.TypeDesc.FullName)); 624throw new InvalidOperationException(ResXml.XmlInvalidEnumAttribute); 648if (i > 0) throw new InvalidOperationException(ResXml.XmlInvalidReturnPosition); 716throw new InvalidOperationException(ResXml.XmlInvalidVoid); 723throw new InvalidOperationException(string.Format(ResXml.XmlIllegalSoapAttribute, accessorName, accessor.TypeDesc.FullName)); 726throw new InvalidOperationException(ResXml.XmlInvalidElementAttribute); 740throw new InvalidOperationException(ResXml.XmlInvalidElementAttribute); 776throw new InvalidOperationException(string.Format(ResXml.XmlInvalidDefaultEnumValue, a.SoapDefaultValue.GetType().FullName, fieldTypeDesc.FullName)); 780throw new InvalidOperationException(string.Format(ResXml.XmlInvalidDefaultValue, strValue, a.SoapDefaultValue.GetType().FullName));
FrameworkFork\Microsoft.Xml\Xml\Serialization\SoapSchemaExporter.cs (5)
85throw new InvalidOperationException(ResXml.XmlMappingsScopeMismatch); 107throw new InvalidOperationException(string.Format(ResXml.XmlDuplicateTypeName, newTypeName, newNamespace)); 138if (schema == null) throw new InvalidOperationException(string.Format(ResXml.XmlMissingSchema, referencingNs)); 323if (!mapping.IncludeInSchema) throw new InvalidOperationException(string.Format(ResXml.XmlSoapCannotIncludeInSchema, mapping.TypeDesc.Name)); 389throw new InvalidOperationException(string.Format(ResXml.XmlInvalidContent, type.ContentModel.Content.GetType().Name));
FrameworkFork\Microsoft.Xml\Xml\Serialization\SoapSchemaImporter.cs (19)
65throw new InvalidOperationException(string.Format(ResXml.XmlPrimitiveBaseType, name.Name, name.Namespace, baseType.FullName)); 169throw new InvalidOperationException(string.Format(ResXml.RefSyntaxNotSupportedForElements0, element.RefName.Name, element.RefName.Namespace)); 175throw new InvalidOperationException(string.Format(ResXml.XmlElementHasNoName, parentType.Name, parentType.Namespace)); 202throw new InvalidOperationException(string.Format(ResXml.XmlInvalidSchemaElementType, parentType.Name, parentType.Namespace, element.Name)); 207throw new InvalidOperationException(string.Format(ResXml.XmlInvalidSchemaElementType, parentType.Name, parentType.Namespace, element.Name)); 213throw new InvalidOperationException(string.Format(ResXml.XmlInvalidSubstitutionGroupUse, parentType.Name, parentType.Namespace)); 218throw new InvalidOperationException(string.Format(ResXml.XmlElementMissingType, parentType.Name, parentType.Namespace, element.Name)); 261throw new InvalidOperationException(ResXml.XmlInternalError); 301throw new InvalidOperationException(string.Format(ResXml.XmlInvalidSchemaElementType, parentType.Name, parentType.Namespace, element.Name)); 347throw new InvalidOperationException(string.Format(ResXml.XmlInvalidAnyAttributeUse, type.Name, type.QualifiedName.Namespace)); 356throw new InvalidOperationException(string.Format(ResXml.XmlSoapInvalidAttributeUse, type.Name, type.QualifiedName.Namespace)); 361if (attr.Use != XmlSchemaUse.Prohibited) throw new InvalidOperationException(string.Format(ResXml.XmlSoapInvalidAttributeUse, type.Name, type.QualifiedName.Namespace)); 395throw new InvalidOperationException(string.Format(ResXml.XmlSoapInvalidChoice, parentType.Name, parentType.Namespace)); 406throw new InvalidOperationException(string.Format(ResXml.XmlSoapUnsupportedGroupRef, parentType.Name, parentType.Namespace)); 412throw new InvalidOperationException(string.Format(ResXml.XmlSoapUnsupportedGroupRepeat, parentType.Name, parentType.Namespace)); 417throw new InvalidOperationException(string.Format(ResXml.XmlSoapUnsupportedGroupNested, parentType.Name, parentType.Namespace)); 421throw new InvalidOperationException(string.Format(ResXml.XmlSoapUnsupportedGroupAny, parentType.Name, parentType.Namespace)); 638throw new InvalidOperationException(string.Format(ResXml.XmlInvalidEnumContent, dataType.Content.GetType().Name, identifier)); 721throw new InvalidOperationException(string.Format(ResXml.XmlMissingDataType, name.ToString()));
FrameworkFork\Microsoft.Xml\Xml\Serialization\Types.cs (9)
402_exception = new InvalidOperationException(string.Format(ResXml.XmlConstructorInaccessible, FullName)); 729throw new InvalidOperationException(string.Format(ResXml.XmlUnsupportedOpenGenericType, type.ToString())); 797exception = new InvalidOperationException(string.Format(ResXml.XmlTypeInaccessible, type.FullName)); 802exception = new InvalidOperationException(string.Format(ResXml.XmlTypeStatic, type.FullName)); 1126throw new InvalidOperationException(string.Format(ResXml.XmlReadOnlyPropertyError, propertyInfo.DeclaringType, propertyInfo.Name)); 1330throw new InvalidOperationException(string.Format(ResXml.XmlNoAddMethod, type.FullName, currentType, "IEnumerable")); 1381throw new InvalidOperationException(string.Format(ResXml.XmlNoDefaultAccessors, type.FullName)); 1386throw new InvalidOperationException(string.Format(ResXml.XmlNoAddMethod, type.FullName, indexer.PropertyType, "ICollection")); 1414throw new InvalidOperationException(string.Format(ResXml.XmlInvalidArrayTypeSyntax, type));
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlAttributeOverrides.cs (1)
45throw new InvalidOperationException(string.Format(ResXml.XmlAttributeSetAgain, type.FullName, member));
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlCodeExporter.cs (4)
68if (xmlTypeMapping.Accessor.Any) throw new InvalidOperationException(ResXml.XmlIllegalWildcard); 225if (value.GetType() != typeof(string)) throw new InvalidOperationException(string.Format(ResXml.XmlInternalErrorDetails, "Invalid enumeration type " + value.GetType().Name)); 387throw new InvalidOperationException(string.Format(ResXml.XmlInvalidDefaultValue, defaultValue, em.TypeDesc.FullName)); 505if (value.GetType() != typeof(object[])) throw new InvalidOperationException(string.Format(ResXml.XmlInternalErrorDetails, "Default value for list should be object[], not " + value.GetType().Name));
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlCustomFormatter.cs (3)
138if (ids.Length != vals.Length) throw new InvalidOperationException(string.Format(ResXml.XmlInternalErrorDetails, "Invalid enum")); 167throw new InvalidOperationException(string.Format(ResXml.XmlUnknownConstant, originalValue, typeName == null ? "enum" : typeName)); 397throw new InvalidOperationException(string.Format(ResXml.XmlUnknownConstant, parts[i], typeName));
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlMapping.cs (1)
137throw new InvalidOperationException(ResXml.XmlMelformMapping);
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlReflectionImporter.cs (98)
130throw new InvalidOperationException(string.Format(ResXml.XmlAnonymousInclude, type.FullName)); 280throw new InvalidOperationException(string.Format(ResXml.XmlInvalidNotNullable, model.TypeDesc.BaseTypeDesc.FullName, "XmlRoot")); 335throw new InvalidOperationException(string.Format(ResXml.XmlCannotReconcileAccessorDefault, accessor.Name, accessor.Namespace, value1, value2)); 340throw new InvalidOperationException(string.Format(ResXml.XmlMethodTypeNameConflict, accessor.Name, accessor.Namespace)); 346throw new InvalidOperationException(string.Format(ResXml.XmlCannotReconcileAccessor, accessor.Name, accessor.Namespace, GetMappingName(existing.Mapping), GetMappingName(accessor.Mapping))); 363throw new InvalidOperationException(string.Format(ResXml.XmlCannotReconcileAttributeAccessor, accessor.Name, accessor.Namespace, GetMappingName(existing.Mapping), GetMappingName(accessor.Mapping))); 365throw new InvalidOperationException(string.Format(ResXml.XmlCannotReconcileAccessor, accessor.Name, accessor.Namespace, GetMappingName(existing.Mapping), GetMappingName(accessor.Mapping))); 370return new InvalidOperationException(string.Format(ResXml.XmlReflectionError, context), e); 375return new InvalidOperationException(string.Format(ResXml.XmlTypeReflectionError, context), e); 380return new InvalidOperationException(string.Format(model.IsProperty ? ResXml.XmlPropertyReflectionError : ResXml.XmlFieldReflectionError, model.Name), e); 397throw new InvalidOperationException(string.Format(ResXml.XmlInvalidDataTypeUsage, dataType, "XmlElementAttribute.DataType")); 402throw new InvalidOperationException(string.Format(ResXml.XmlInvalidXsdDataType, dataType, "XmlElementAttribute.DataType", new XmlQualifiedName(dataType, XmlSchema.Namespace).ToString())); 406throw new InvalidOperationException(string.Format(ResXml.XmlDataTypeMismatch, dataType, "XmlElementAttribute.DataType", modelTypeDesc.FullName)); 414throw new InvalidOperationException(string.Format(ResXml.XmlInvalidTypeAttributes, model.Type.FullName)); 455throw new InvalidOperationException(string.Format(ResXml.XmlSerializableAttributes, model.TypeDesc.FullName, typeof(XmlSchemaProviderAttribute).Name)); 493throw new InvalidOperationException(string.Format(ResXml.XmlGetSchemaMethodMissing, provider.MethodName, typeof(XmlSchemaSet).Name, type.FullName)); 496throw new InvalidOperationException(string.Format(ResXml.XmlGetSchemaMethodReturnType, type.Name, provider.MethodName, typeof(XmlSchemaProviderAttribute).Name, typeof(XmlQualifiedName).FullName, typeof(XmlSchemaType).FullName)); 582throw new InvalidOperationException(string.Format(ResXml.XmlSerializableSchemaError, typeof(IXmlSerializable).Name, args.Message)); 594throw new InvalidOperationException(string.Format(ResXml.XmlMissingSchema, baseQname.Namespace)); 598throw new InvalidOperationException(string.Format(ResXml.XmlGetSchemaInclude, baseQname.Namespace, typeof(IXmlSerializable).Name, "GetSchema")); 628return new InvalidOperationException(string.Format(ResXml.XmlInvalidAttributeUse, type.FullName)); 633return new InvalidOperationException(string.Format(ResXml.XmlIllegalTypeContext, typeDesc.FullName, GetContextName(context))); 675throw new InvalidOperationException(string.Format(ResXml.XmlTypesDuplicate, typeDesc.FullName, existingMapping.TypeDesc.FullName, typeDesc.Name, existingMapping.Namespace)); 680throw new InvalidOperationException(string.Format(ResXml.XmlTypesDuplicate, typeDesc.FullName, existingMapping.TypeDesc.FullName, typeDesc.Name, existingMapping.Namespace)); 722throw new InvalidOperationException(string.Format(ResXml.XmlTypesDuplicate, typeDesc.FullName, mapping.TypeDesc.FullName, typeName, ns)); 778throw new InvalidOperationException(string.Format(ResXml.XmlInternalErrorDetails, "DeferredWorkItems.Count have changed")); 780throw new InvalidOperationException(string.Format(ResXml.XmlInternalErrorDetails, "DeferredWorkItems.Top have changed")); 871throw new InvalidOperationException(string.Format(ResXml.XmlIllegalTypedTextAttribute, typeName, member.Text.Name, member.Text.Mapping.TypeDesc.FullName)); 874throw new InvalidOperationException(string.Format(ResXml.XmlIllegalMultipleText, model.Type.FullName)); 881throw new InvalidOperationException(string.Format(ResXml.XmlMultipleXmlns, model.Type.FullName)); 912throw new InvalidOperationException(string.Format(ResXml.XmlSequenceUnique, member.SequenceId.ToString(), "Order", member.Name)); 918throw new InvalidOperationException(string.Format(ResXml.XmlSequenceInconsistent, "Order", member.Name)); 928throw new InvalidOperationException(string.Format(ResXml.XmlMultipleXmlns, model.Type.FullName)); 1169throw new InvalidOperationException(string.Format(ResXml.XmlUdeclaredXsdType, dataType)); 1203throw new InvalidOperationException(string.Format(ResXml.XmlIllegalAttributeFlagsArray, model.TypeDesc.FullName)); 1218throw new InvalidOperationException(string.Format(ResXml.XmlNoSerializableMembers, model.TypeDesc.FullName)); 1231throw new InvalidOperationException(ResXml.XmlInvalidConstantAttribute); 1263throw new InvalidOperationException(ResXml.XmlRpcLitAttributeAttributes); 1267throw new InvalidOperationException(string.Format(ResXml.XmlInvalidAttributeType, "XmlAttribute")); 1273if (i > 0) throw new InvalidOperationException(ResXml.XmlInvalidReturnPosition); 1289throw new InvalidOperationException(ResXml.XmlIllegalMultipleTextMembers); 1297throw new InvalidOperationException(ResXml.XmlMultipleXmlnsMembers); 1312throw new InvalidOperationException(string.Format(ResXml.XmlSequenceMembers, "Order")); 1425throw new InvalidOperationException(string.Format(ResXml.XmlChoiceIdentifierType, identifierName, memberName, type.GetElementType().FullName)); 1432throw new InvalidOperationException(string.Format(ResXml.XmlChoiceIdentifierArrayType, identifierName, memberName, type.FullName)); 1438throw new InvalidOperationException(string.Format(ResXml.XmlChoiceIdentifierTypeEnum, identifierName)); 1453throw new InvalidOperationException(string.Format(ResXml.XmlChoiceIdentiferMemberMissing, choice.MemberName, accessorName)); 1469throw new InvalidOperationException(string.Format(ResXml.XmlChoiceIdentiferMemberMissing, choice.MemberName, accessorName)); 1476throw new InvalidOperationException(string.Format(ResXml.XmlChoiceIdentiferAmbiguous, choice.MemberName)); 1483throw new InvalidOperationException(string.Format(ResXml.XmlChoiceIdentiferMemberMissing, choice.MemberName, accessorName)); 1562throw new InvalidOperationException(ResXml.XmlIllegalAttributesArrayAttribute); 1568throw new InvalidOperationException(string.Format(ResXml.XmlIllegalAttrOrTextInterface, accessorName, accessor.TypeDesc.ArrayElementTypeDesc.FullName, typeof(IXmlSerializable).Name)); 1572throw new InvalidOperationException(string.Format(ResXml.XmlIllegalAttrOrText, accessorName, accessor.TypeDesc.ArrayElementTypeDesc.FullName)); 1610throw new InvalidOperationException(ResXml.XmlIllegalElementsArrayAttribute); 1620throw new InvalidOperationException(string.Format(ResXml.XmlIllegalArrayTextAttribute, accessorName)); 1648throw new InvalidOperationException(string.Format(ResXml.XmlInvalidNotNullable, typeModel.TypeDesc.BaseTypeDesc.FullName, "XmlElement")); 1661throw new InvalidOperationException(string.Format(ResXml.XmlSequenceMatch, "Order")); 1673throw new InvalidOperationException(string.Format(ResXml.XmlIllegalAnyElement, arrayElementType.FullName)); 1684throw new InvalidOperationException(string.Format(ResXml.XmlAnyElementDuplicate, accessorName, xmlAnyElement.Name, xmlAnyElement.Namespace == null ? "null" : xmlAnyElement.Namespace)); 1711throw new InvalidOperationException(string.Format(ResXml.XmlSequenceMatch, "Order")); 1721throw new InvalidOperationException(ResXml.XmlIllegalArrayArrayAttribute); 1756throw new InvalidOperationException(ResXml.XmlIllegalAttribute); 1760if (a.XmlAnyElements.Count > 0) throw new InvalidOperationException(string.Format(ResXml.XmlIllegalAnyElement, accessor.TypeDesc.FullName)); 1764if (a.XmlElements.Count > 0) throw new InvalidOperationException(ResXml.XmlIllegalAttribute); 1765if (a.XmlAttribute.Type != null) throw new InvalidOperationException(string.Format(ResXml.XmlIllegalType, "XmlAttribute")); 1792throw new InvalidOperationException(string.Format(ResXml.XmlIllegalType, "XmlText")); 1809throw new InvalidOperationException(string.Format(ResXml.XmlIllegalType, "XmlElement")); 1823throw new InvalidOperationException(string.Format(ResXml.XmlInvalidNotNullable, typeModel.TypeDesc.BaseTypeDesc.FullName, "XmlElement")); 1836throw new InvalidOperationException(string.Format(ResXml.XmlSequenceMatch, "Order")); 1847throw new InvalidOperationException(ResXml.XmlSoleXmlnsAttribute); 1851throw new InvalidOperationException(string.Format(ResXml.XmlXmlnsInvalidType, accessorName, accessorType.FullName, typeof(XmlSerializerNamespaces).FullName)); 1862throw new InvalidOperationException(string.Format(ResXml.XmlIllegalAttrOrTextInterface, accessorName, accessor.TypeDesc.FullName, typeof(IXmlSerializable).Name)); 1866throw new InvalidOperationException(string.Format(ResXml.XmlIllegalAttrOrText, accessorName, accessor.TypeDesc)); 1891throw new InvalidOperationException(string.Format(ResXml.XmlInvalidNotNullable, typeModel.TypeDesc.BaseTypeDesc.FullName, "XmlElement")); 1904throw new InvalidOperationException(string.Format(ResXml.XmlSequenceMatch, "Order")); 1916throw new InvalidOperationException(string.Format(ResXml.XmlIllegalAnyElement, accessorType.FullName)); 1928throw new InvalidOperationException(string.Format(ResXml.XmlAnyElementDuplicate, accessorName, xmlAnyElement.Name, xmlAnyElement.Namespace == null ? "null" : xmlAnyElement.Namespace)); 1953throw new InvalidOperationException(string.Format(ResXml.XmlSequenceMatch, "Order")); 1967throw new InvalidOperationException(string.Format(ResXml.XmlRpcLitArrayElement, accessor.Elements[0].Name)); 1970throw new InvalidOperationException(string.Format(ResXml.XmlRpcLitXmlns, accessor.Name)); 2016throw new InvalidOperationException(string.Format(ResXml.XmlChoiceMissingAnyValue, accessor.ChoiceIdentifier.Mapping.TypeDesc.FullName)); 2022throw new InvalidOperationException(string.Format(ResXml.XmlChoiceMissingValue, accessor.ChoiceIdentifier.Mapping.TypeDesc.FullName, id, element.Name, element.Namespace)); 2038throw new InvalidOperationException(ResXml.XmlRpcLitAttributeAttributes); 2041throw new InvalidOperationException(ResXml.XmlRpcLitAttributes); 2047throw new InvalidOperationException(ResXml.XmlRpcLitElements); 2052throw new InvalidOperationException(string.Format(ResXml.XmlRpcLitElementNamespace, "Namespace", xmlElement.Namespace)); 2056throw new InvalidOperationException(string.Format(ResXml.XmlRpcLitElementNullable, "IsNullable", "true")); 2061throw new InvalidOperationException(string.Format(ResXml.XmlRpcLitElementNamespace, "Namespace", a.XmlArray.Namespace)); 2078throw new InvalidOperationException(string.Format(ResXml.XmlChoiceIdentiferMissing, typeof(XmlChoiceIdentifierAttribute).Name, accessorName)); 2089throw new InvalidOperationException(string.Format(ResXml.XmlChoiceIdentiferMissing, typeof(XmlChoiceIdentifierAttribute).Name, accessorName)); 2104throw new InvalidOperationException(string.Format(ResXml.XmlArrayItemAmbiguousTypes, accessorName, item.ElementName, items[i].ElementName, typeof(XmlElementAttribute).Name, typeof(XmlChoiceIdentifierAttribute).Name, accessorName)); 2127throw new InvalidOperationException(string.Format(ResXml.XmlChoiceIdDuplicate, choiceMapping.TypeName, choiceId)); 2148throw new InvalidOperationException(string.Format(ResXml.XmlInvalidDefaultValue, strValue, a.XmlDefaultValue.GetType().FullName)); 2181throw new InvalidOperationException(string.Format(ResXml.XmlDuplicateElementName, existing.Name, existing.Namespace)); 2187throw new InvalidOperationException(string.Format(ResXml.XmlInternalErrorDetails, "Bad accessor type " + accessor.GetType().FullName)); 2189throw new InvalidOperationException(string.Format(ResXml.XmlDuplicateAttributeName, existing.Name, existing.Namespace)); 2215if (isQualified && form == XmlSchemaForm.Unqualified) throw new InvalidOperationException(ResXml.XmlInvalidFormUnqualified); 2222if (isNullable && !typeDesc.IsNullable) throw new InvalidOperationException(string.Format(ResXml.XmlInvalidIsNullable, typeDesc.FullName));
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlSchemaExporter.cs (24)
103throw new InvalidOperationException(string.Format(ResXml.XmlBareAttributeMember, member.Attribute.Name)); 105throw new InvalidOperationException(string.Format(ResXml.XmlBareTextMember, member.Text.Name)); 110throw new InvalidOperationException(string.Format(ResXml.XmlIllegalArrayElement, member.Elements[0].Name)); 252throw new InvalidOperationException(ResXml.XmlMappingsScopeMismatch); 263throw new InvalidOperationException(ResXml.XmlIllegalWildcard); 288throw new InvalidOperationException(string.Format(ResXml.XmlDuplicateTypeName, newTypeName, newNamespace)); 319throw new InvalidOperationException(string.Format(ResXml.XmlIllegalForm, e.Name)); 326throw new InvalidOperationException(string.Format(ResXml.XmlIllegalForm, a.Name)); 550throw new InvalidOperationException(string.Format(ResXml.XmlDuplicateNamespace, anyNs)); 601throw new InvalidOperationException(string.Format(ResXml.XmlInternalErrorDetails, "Unsuported anonymous mapping type: " + mapping.ToString())); 658throw new InvalidOperationException(string.Format(ResXml.XmlInternalErrorDetails, "Type " + mapping.TypeName + " from namespace '" + ns + "' is an invalid array mapping")); 720throw new InvalidOperationException(string.Format(ResXml.XmlInvalidContent, type.ContentModel.Content.GetType().Name)); 833throw new InvalidOperationException(ResXml.XmlInternalError); 919if (value.GetType() != typeof(string)) throw new InvalidOperationException(string.Format(ResXml.XmlInternalErrorDetails, string.Format(ResXml.XmlInvalidDefaultValue, value.ToString(), value.GetType().FullName))); 959throw new InvalidOperationException(string.Format(ResXml.XmlInternalErrorDetails, "Mapping for " + pm.TypeDesc.Name + " missing type property")); 975throw new InvalidOperationException(string.Format(ResXml.XmlInvalidDefaultValue, value.ToString(), pm.TypeDesc.Name)); 978throw new InvalidOperationException(string.Format(ResXml.XmlInvalidDefaultValue, value.ToString(), pm.TypeDesc.Name)); 1012throw new InvalidOperationException(string.Format(ResXml.XmlCircularReference2, mapping.TypeDesc.Name, "AnonymousType", "false")); 1018if (!mapping.IncludeInSchema) throw new InvalidOperationException(string.Format(ResXml.XmlCannotIncludeInSchema, mapping.TypeDesc.Name)); 1033throw new InvalidOperationException(string.Format(ResXml.XmlAnonymousBaseType, mapping.TypeDesc.Name, mapping.BaseMapping.TypeDesc.Name, "AnonymousType", "false")); 1094throw new InvalidOperationException(string.Format(ResXml.XmlIllegalMultipleText, name)); 1117throw new InvalidOperationException(string.Format(ResXml.XmlInvalidContent, type.ContentModel.Content.GetType().Name)); 1139throw new InvalidOperationException(string.Format(ResXml.XmlAnonymousBaseType, textMapping.TypeDesc.Name, pm.TypeDesc.Name, "AnonymousType", "false")); 1186if (!mapping.IncludeInSchema) throw new InvalidOperationException(string.Format(ResXml.XmlCannotIncludeInSchema, mapping.TypeDesc.Name));
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlSchemaImporter.cs (19)
110throw new InvalidOperationException(string.Format(ResXml.XmlBadBaseElement, name.Name, name.Namespace, baseType.FullName)); 170throw new InvalidOperationException(string.Format(ResXml.XmlBadBaseType, typeName.Name, typeName.Namespace, baseType.FullName)); 332throw new InvalidOperationException(string.Format(ResXml.XmlElementHasNoName, parentType.Name, parentType.Namespace)); 410throw new InvalidOperationException(string.Format(ResXml.XmlElementImportedTwice, element.Name, ns, mapping.GetType().Name, desiredMappingType.Name)); 453throw new InvalidOperationException(string.Format(ResXml.XmlImporterExtensionBadLocalTypeName, typeOwner.GetType().FullName, typeName)); 457throw new InvalidOperationException(string.Format(ResXml.XmlImporterExtensionBadTypeName, typeOwner.GetType().FullName, qname.Name, qname.Namespace, typeName)); 545throw new InvalidOperationException(ResXml.XmlInternalError); 588if (!type.DerivedFrom.IsEmpty) throw new InvalidOperationException(ResXml.XmlMembersDeriveError); 649throw new InvalidOperationException(string.Format(ResXml.XmlTypeUsedTwice, type.QualifiedName.Name, type.QualifiedName.Namespace)); 696throw new InvalidOperationException(string.Format(ResXml.XmlIllegalOverride, type.Name, baseMember.Name, baseMember.TypeDesc.FullName, structMapping.Members[i].TypeDesc.FullName, declaringMapping.TypeDesc.FullName)); 1097throw new InvalidOperationException(string.Format(ResXml.XmlDuplicateElementInScope, element.Name, element.Namespace)); 1101throw new InvalidOperationException(string.Format(ResXml.XmlDuplicateElementInScope1, element.Name, element.Namespace)); 1713if (attribute.Name.Length == 0) throw new InvalidOperationException(ResXml.XmlAttributeHasNoName); 1959throw new InvalidOperationException(string.Format(ResXml.XmlMissingGroup, name.Name)); 1968throw new InvalidOperationException(string.Format(ResXml.XmlMissingAttributeGroup, name.Name)); 2030throw new InvalidOperationException(string.Format(ResXml.XmlInvalidEncoding, name.ToString())); 2034throw new InvalidOperationException(string.Format(ResXml.XmlMissingDataType, name.ToString())); 2057throw new InvalidOperationException(string.Format(ResXml.XmlMissingElement, name.ToString())); 2065throw new InvalidOperationException(string.Format(ResXml.XmlMissingAttribute, name.Name));
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlSchemas.cs (7)
65throw new InvalidOperationException(string.Format(ResXml.XmlSchemaDuplicateNamespace, ns)); 273if (_isCompiled) throw new InvalidOperationException(ResXml.XmlSchemaCompiled); 366throw new InvalidOperationException(string.Format(ResXml.XmlInternalErrorDetails, "XmlSchemas.Find: Invalid object type " + type.FullName)); 500throw new InvalidOperationException(string.Format(ResXml.XmlSchemaIncludeLocation, this.GetType().Name, external.SchemaLocation)); 525throw new InvalidOperationException(MergeFailedMessage(o, dest, schema.TargetNamespace)); 802throw new InvalidOperationException(GetSchemaItem(source, null, message), exception); 818throw new InvalidOperationException(string.Format(ResXml.XmlSchemaSyntaxErrorDetails, ns, message, exception.LineNumber, exception.LinePosition), exception);
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlSerializationReader.cs (18)
988if (arrayInfo.dimensions != 1) throw new InvalidOperationException(string.Format(ResXml.XmlInvalidArrayDimentions, CurrentTag())); 990if (qname.Name != name) throw new InvalidOperationException(string.Format(ResXml.XmlInvalidArrayTypeName, qname.Name, name, CurrentTag())); 991if (qname.Namespace != ns) throw new InvalidOperationException(string.Format(ResXml.XmlInvalidArrayTypeNamespace, qname.Namespace, ns, CurrentTag())); 1220throw new InvalidOperationException(string.Format(ResXml.XmlUndefinedAlias, prefix)); 1365return new InvalidOperationException(string.Format(ResXml.XmlUnknownType, type.Name, type.Namespace, CurrentTag())); 1371return new InvalidOperationException(string.Format(ResXml.XmlReadOnlyCollection, name)); 1377return new InvalidOperationException(string.Format(ResXml.XmlAbstractType, name, ns, CurrentTag())); 1383return new InvalidOperationException(string.Format(ResXml.XmlConstructorInaccessible, typeName)); 1389return new InvalidOperationException(string.Format(ResXml.XmlConstructorHasSecurityAttributes, typeName)); 1395return new InvalidOperationException(string.Format(ResXml.XmlUnknownNode, CurrentTag())); 1401return new InvalidOperationException(string.Format(ResXml.XmlUnknownConstant, value, enumType.Name)); 1424return new InvalidOperationException(string.Format(ResXml.XmlSerializableBadDerivation, xsdDerived, nsDerived, xsdBase, nsBase, clrDerived, clrBase)); 1430return new InvalidOperationException(string.Format(ResXml.XmlSerializableMissingClrType, name, ns, typeof(XmlIncludeAttribute).Name, clrType)); 1520if (!href.StartsWith("#", StringComparison.Ordinal)) throw new InvalidOperationException(string.Format(ResXml.XmlMissingHref, href)); 1578throw new InvalidOperationException(string.Format(ResXml.XmlInvalidHref, id)); 1649throw new InvalidOperationException(string.Format(ResXml.XmlInvalidArrayRef, id, o.GetType().FullName, i.ToString())); 1680if (arrayInfo.dimensions != 1) throw new InvalidOperationException(string.Format(ResXml.XmlInvalidArrayDimentions, CurrentTag())); 2074throw new InvalidOperationException(ResXml.XmlInternalErrorReaderAdvance);
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlSerializationWriter.cs (30)
468if (_objectsInUse.ContainsKey(o)) throw new InvalidOperationException(string.Format(ResXml.XmlCircularReference, o.GetType().FullName)); 517throw new InvalidOperationException(string.Format(ResXml.XmlInvalidXmlns, alias)); 642if (!_objectsInUse.ContainsKey(o)) throw new InvalidOperationException(string.Format(ResXml.XmlInternalErrorDetails, "missing stack object of type " + o.GetType().FullName)); 779throw new InvalidOperationException(ResXml.XmlNoAttributeHere); 795throw new InvalidOperationException(string.Format(ResXml.XmlElementNameMismatch, node.LocalName, node.NamespaceURI, name, ns)); 816if (typeof(IXmlSerializable).IsAssignableFrom(type)) return new InvalidOperationException(string.Format(ResXml.XmlInvalidSerializable, type.FullName)); 818if (!typeDesc.IsStructLike) return new InvalidOperationException(string.Format(ResXml.XmlInvalidUseOfType, type.FullName)); 819return new InvalidOperationException(string.Format(ResXml.XmlUnxpectedType, type.FullName)); 826return new InvalidOperationException(string.Format(ResXml.XmlChoiceMismatchChoiceException, elementName, value, enumValue)); 832return new InvalidOperationException(string.Format(ResXml.XmlUnknownAnyElement, name, ns)); 838return new InvalidOperationException(string.Format(ResXml.XmlInvalidChoiceIdentifierValue, type, identifier)); 845return new InvalidOperationException(string.Format(ResXml.XmlChoiceIdentifierMismatch, value, identifier, name, ns)); 851return new InvalidOperationException(string.Format(ResXml.XmlUnknownConstant, value, typeName)); 863return new InvalidOperationException(string.Format(ResXml.XmlIllegalAnyElement, type.FullName)); 935if (attr == null) throw new InvalidOperationException(ResXml.XmlNeedAttributeHere); 1319if (!typeof(IEnumerable).IsAssignableFrom(type)) throw new InvalidOperationException(string.Format(ResXml.XmlInternalErrorDetails, "not array like type " + type.FullName)); 1483throw new InvalidOperationException(string.Format(ResXml.XmlDuplicateNs, prefix, ns)); 1680if (methodName == null) throw new InvalidOperationException(string.Format(ResXml.XmlInternalErrorMethod, mapping.TypeDesc.Name) + Environment.StackTrace); 1727if (defaultValue.GetType() != typeof(string)) throw new InvalidOperationException(string.Format(ResXml.XmlInternalErrorDetails, name + " has invalid default type " + defaultValue.GetType().Name)); 2026if (enumSource == null) throw new InvalidOperationException(string.Format(ResXml.XmlInternalErrorDetails, "Can not find " + member.ChoiceIdentifier.MemberName + " in the members mapping.")); 2254if (methodName == null) throw new InvalidOperationException("deriaved from " + mapping.TypeDesc.FullName + ", " + string.Format(ResXml.XmlInternalErrorMethod, derived.TypeDesc.Name) + Environment.StackTrace); 2292if (methodName == null) throw new InvalidOperationException(string.Format(ResXml.XmlInternalErrorMethod, mapping.TypeDesc.Name) + Environment.StackTrace); 2737throw new InvalidOperationException(ResXml.XmlInternalError); 3164throw new InvalidOperationException(ResXml.XmlInternalError); 3376if (methodName == null) throw new InvalidOperationException(string.Format(ResXml.XmlInternalErrorMethod, mapping.TypeDesc.Name) + Environment.StackTrace); 3441throw new InvalidOperationException(ResXml.XmlInternalError); 3590throw new InvalidOperationException(string.Format(ResXml.XmlUnsupportedDefaultType, type.FullName)); 3700throw new InvalidOperationException(string.Format(ResXml.XmlChoiceMissingAnyValue, choiceMapping.TypeDesc.FullName)); 3703throw new InvalidOperationException(string.Format(ResXml.XmlChoiceMissingValue, choiceMapping.TypeDesc.FullName, element.Namespace + ":" + element.Name, element.Name, element.Namespace)); 4018throw new InvalidOperationException(string.Format(ResXml.XmlSerializerUnsupportedType, memberInfos[0].ToString()));
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlSerializationWriterILGen.cs (11)
132if (methodName == null) throw new InvalidOperationException(string.Format(ResXml.XmlInternalErrorMethod, mapping.TypeDesc.Name) + Environment.StackTrace); 204if (defaultValue.GetType() != typeof(string)) throw new InvalidOperationException(string.Format(ResXml.XmlInternalErrorDetails, name + " has invalid default type " + defaultValue.GetType().Name)); 530if (enumSource == null) throw new InvalidOperationException(string.Format(ResXml.XmlInternalErrorDetails, "Can not find " + member.ChoiceIdentifier.MemberName + " in the members mapping.")); 772if (methodName == null) throw new InvalidOperationException("deriaved from " + mapping.TypeDesc.FullName + ", " + string.Format(ResXml.XmlInternalErrorMethod, derived.TypeDesc.Name) + Environment.StackTrace); 823if (methodName == null) throw new InvalidOperationException(string.Format(ResXml.XmlInternalErrorMethod, mapping.TypeDesc.Name) + Environment.StackTrace); 1459throw new InvalidOperationException(ResXml.XmlInternalError); 2003throw new InvalidOperationException(ResXml.XmlInternalError); 2111if (methodName == null) throw new InvalidOperationException(string.Format(ResXml.XmlInternalErrorMethod, mapping.TypeDesc.Name) + Environment.StackTrace); 2184throw new InvalidOperationException(ResXml.XmlInternalError); 2412throw new InvalidOperationException(string.Format(ResXml.XmlChoiceMissingAnyValue, choiceMapping.TypeDesc.FullName)); 2415throw new InvalidOperationException(string.Format(ResXml.XmlChoiceMissingValue, choiceMapping.TypeDesc.FullName, element.Namespace + ":" + element.Name, element.Name, element.Namespace));
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlSerializer.cs (7)
370throw new InvalidOperationException(string.Format(ResXml.XmlInvalidEncodingNotEncoded1, encodingStyle)); 398throw new InvalidOperationException(ResXml.XmlGenError, e); 460throw new InvalidOperationException(string.Format(ResXml.XmlInvalidEncodingNotEncoded1, encodingStyle)); 494throw new InvalidOperationException(string.Format(ResXml.XmlSerializeErrorDetails, lineInfo.LineNumber.ToString(), lineInfo.LinePosition.ToString()), e); 498throw new InvalidOperationException(ResXml.XmlSerializeError, e); 839throw new InvalidOperationException(string.Format(ResXml.XmlUnxpectedType, _primitiveType.FullName)); 913throw new InvalidOperationException(string.Format(ResXml.XmlUnxpectedType, _primitiveType.FullName));
FrameworkFork\Microsoft.Xml\Xml\XPath\Internal\CompiledXpathExpr.cs (1)
222throw new InvalidOperationException(ResXml.Xml_InvalidOperation);
FrameworkFork\Microsoft.Xml\Xml\XPath\Internal\UnionExpr.cs (1)
163public override int CurrentPosition { get { throw new InvalidOperationException(); } }
FrameworkFork\Microsoft.Xml\Xml\XPath\Internal\XPathArrayIterator.cs (1)
58throw new InvalidOperationException(string.Format(ResXml.Sch_EnumNotStarted, string.Empty));
FrameworkFork\Microsoft.Xml\Xml\XPath\XPathNavigator.cs (14)
133throw new InvalidOperationException(ResXml.Xpn_BadPosition); 614throw new InvalidOperationException(ResXml.Xpn_BadPosition); 1056throw new InvalidOperationException(ResXml.XPathDocument_MissingSchemas); 1063throw new InvalidOperationException(ResXml.XPathDocument_MissingSchemas); 1074throw new InvalidOperationException(string.Format(ResXml.XPathDocument_NotEnoughSchemaInfo, null)); 1080throw new InvalidOperationException(ResXml.XPathDocument_MissingSchemas); 1091throw new InvalidOperationException(string.Format(ResXml.XPathDocument_NotEnoughSchemaInfo, null)); 1095throw new InvalidOperationException(string.Format(ResXml.XPathDocument_ValidateInvalidNodeType, null)); 1376throw new InvalidOperationException(ResXml.Xpn_BadPosition); 1514throw new InvalidOperationException(ResXml.Xpn_BadPosition); 1544throw new InvalidOperationException(ResXml.Xpn_BadPosition); 1575throw new InvalidOperationException(ResXml.Xpn_BadPosition); 1606throw new InvalidOperationException(ResXml.Xpn_BadPosition); 1637throw new InvalidOperationException(ResXml.Xpn_BadPosition);
FrameworkFork\Microsoft.Xml\Xml\XPath\XPathNavigatorReader.cs (1)
825throw new InvalidOperationException(ResXml.Xml_InvalidOperation);
FrameworkFork\Microsoft.Xml\Xml\XPath\XPathNodeIterator.cs (2)
70throw new InvalidOperationException(string.Format(ResXml.Sch_EnumFinished, string.Empty)); 76throw new InvalidOperationException(string.Format(ResXml.Sch_EnumNotStarted, string.Empty));
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\CodeExporter.cs (7)
88throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRSerialization.CLRNamespaceMappedMultipleTimes, currentDataContractNamespace, dataContractNamespace, clrNamespace))); 551throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRSerialization.ReferencedTypeDoesNotMatch, type.AssemblyQualifiedName, dataContract.StableName.Name, dataContract.StableName.Namespace))); 569throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRSerialization.ReferencedTypeDoesNotMatch, type.AssemblyQualifiedName, dataContract.StableName.Name, dataContract.StableName.Namespace))); 583throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRSerialization.ReferencedTypeDoesNotMatch, 1055throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRSerialization.CannotDeriveFromSealedReferenceType, dataContract.StableName.Name, dataContract.StableName.Namespace, DataContract.GetClrTypeFullName(baseType)))); 1129throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException( 1155throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRSerialization.ReferencedBaseTypeDoesNotExist,
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\ContractCodeDomInfo.cs (2)
28throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRSerialization.CannotSetNamespaceForReferencedType, TypeReference.BaseType))); 37throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRSerialization.CannotSetMembersForReferencedType, TypeReference.BaseType)));
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\DataContract.cs (1)
2182throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRSerialization.DupContractInKnownTypes, type, alreadyExistingContract.UnderlyingType, dataContract.StableName.Namespace, dataContract.StableName.Name)));
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\DataContractSet.cs (6)
130throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRSerialization.DupContractInDataContractSet, dataContract.StableName.Name, dataContract.StableName.Namespace))); 134throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRSerialization.DupTypeContractInDataContractSet, (typeNamesEqual ? dataContract.UnderlyingType.AssemblyQualifiedName : DataContract.GetClrTypeFullName(dataContract.UnderlyingType)), (typeNamesEqual ? dataContractInSet.UnderlyingType.AssemblyQualifiedName : DataContract.GetClrTypeFullName(dataContractInSet.UnderlyingType)), dataContract.StableName.Name, dataContract.StableName.Namespace))); 361throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRSerialization.ReferencedTypesCannotContainNull))); 380throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRSerialization.ReferencedCollectionTypesCannotContainNull))); 477throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format( 483throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\ExceptionDataContract.cs (1)
869throw new InvalidOperationException();
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\SchemaImporter.cs (1)
55throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRSerialization.CouldNotReadSerializationSchema, Globals.SerializationNamespace)));
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\XsdDataContractImporter.cs (2)
189throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRSerialization.TypeHasNotBeenImported, typeName.Name, typeName.Namespace))); 204throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRSerialization.TypeHasNotBeenImported, typeName.Name, typeName.Namespace)));
FrameworkFork\System.Runtime.Serialization\System\Xml\ValueHandle.cs (3)
215throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException()); 539throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException()); 619throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException());
FrameworkFork\System.Runtime.Serialization\System\Xml\XmlBaseReader.cs (2)
1245throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRSerialization.XmlEndElementNoOpenNodes))); 1674throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRSerialization.XmlInvalidOperation)));
FrameworkFork\System.Runtime.Serialization\System\Xml\XmlBaseWriter.cs (25)
102throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRSerialization.XmlWriterClosed))); 139throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRSerialization.XmlInvalidWriteState, "WriteXmlnsAttribute", WriteState.ToString()))); 164throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRSerialization.XmlInvalidWriteState, "WriteXmlnsAttribute", WriteState.ToString()))); 192throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRSerialization.XmlInvalidWriteState, "WriteStartAttribute", WriteState.ToString()))); 299throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRSerialization.XmlInvalidWriteState, "WriteEndAttribute", WriteState.ToString()))); 411throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRSerialization.XmlInvalidWriteState, "WriteComment", WriteState.ToString()))); 437throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRSerialization.XmlInvalidWriteState, "WriteFullEndElement", WriteState.ToString()))); 449throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRSerialization.XmlInvalidWriteState, "WriteCData", WriteState.ToString()))); 474throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRSerialization.XmlOnlyOneRoot))); 480throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRSerialization.XmlInvalidWriteState, "WriteStartElement", WriteState.ToString()))); 519throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRSerialization.XmlOnlyOneRoot))); 525throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRSerialization.XmlInvalidWriteState, "WriteStartElement", WriteState.ToString()))); 587throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRSerialization.XmlInvalidDepth, "WriteEndElement", _depth.ToString(CultureInfo.InvariantCulture)))); 666throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRSerialization.XmlIllegalOutsideRoot))); 673throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRSerialization.XmlIllegalOutsideRoot))); 700throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRSerialization.XmlIllegalOutsideRoot))); 707throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRSerialization.XmlIllegalOutsideRoot))); 714throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRSerialization.XmlIllegalOutsideRoot))); 836throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRSerialization.XmlInvalidWriteState, "WriteStartDocument", WriteState.ToString()))); 861throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRSerialization.XmlInvalidDeclaration))); 888throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRSerialization.XmlNoRootElement))); 1590throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRSerialization.XmlOnlyOneRoot))); 1592throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRSerialization.XmlOnlyOneRoot))); 1594throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRSerialization.XmlInvalidWriteState, "WriteStartElement", WriteState.ToString()))); 1605throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRSerialization.XmlInvalidPrefixState, WriteState.ToString())));
FrameworkFork\System.Runtime.Serialization\System\Xml\XmlBinaryReaderSession.cs (1)
33throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRSerialization.XmlIDDefined)));
FrameworkFork\System.Runtime.Serialization\System\Xml\XmlBinaryWriter.cs (1)
61throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRSerialization.XmlOnlySingleValue)));
FrameworkFork\System.Runtime.Serialization\System\Xml\XmlBinaryWriterSession.cs (1)
42throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRSerialization.XmlKeyAlreadyExists)));
FrameworkFork\System.Runtime.Serialization\System\Xml\XmlConverter.cs (1)
1122throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException());
FrameworkFork\System.Runtime.Serialization\System\Xml\XmlDictionaryAsyncCheckWriter.cs (1)
38throw new InvalidOperationException(SRSerialization.XmlAsyncIsRunningException);
FrameworkFork\System.Runtime.Serialization\System\Xml\XmlDictionaryReaderQuotas.cs (6)
73throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRSerialization.QuotaCopyReadOnly))); 98throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRSerialization.QuotaIsReadOnly, "MaxStringContentLength"))); 116throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRSerialization.QuotaIsReadOnly, "MaxArrayLength"))); 134throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRSerialization.QuotaIsReadOnly, "MaxBytesPerRead"))); 153throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRSerialization.QuotaIsReadOnly, "MaxDepth"))); 172throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRSerialization.QuotaIsReadOnly, "MaxNameTableCharCount")));
FrameworkFork\System.ServiceModel\Internals\System\Runtime\ActionItem.cs (1)
55throw Fx.Exception.AsError(new InvalidOperationException(InternalSR.ActionItemIsAlreadyScheduled));
FrameworkFork\System.ServiceModel\Internals\System\Runtime\AsyncResult.cs (6)
116throw Fx.Exception.AsError(new InvalidOperationException(InternalSR.AsyncResultCompletedTwice(GetType()))); 196throw Fx.Exception.AsError(new InvalidOperationException(InternalSR.InvalidNullAsyncResult)); 293throw Fx.Exception.AsError(new InvalidOperationException(InternalSR.InvalidNullAsyncResult)); 326throw Fx.Exception.AsError(new InvalidOperationException(InternalSR.InvalidAsyncResultImplementation(result.GetType()))); 338throw Fx.Exception.AsError(new InvalidOperationException(message)); 359throw Fx.Exception.AsError(new InvalidOperationException(InternalSR.AsyncResultAlreadyEnded));
FrameworkFork\System.ServiceModel\Internals\System\Runtime\BufferedOutputStream.cs (1)
228return new InvalidOperationException(InternalSR.BufferedOutputStreamQuotaExceeded(maxSizeQuota));
FrameworkFork\System.ServiceModel\Internals\System\Runtime\SignalGate.cs (1)
85throw Fx.Exception.AsError(new InvalidOperationException(InternalSR.InvalidSemaphoreExit));
FrameworkFork\System.ServiceModel\SMDiagnostics\DiagnosticUtility.cs (1)
74throw Fx.Exception.AsError(new InvalidOperationException());
FrameworkFork\System.ServiceModel\SMDiagnostics\System\ServiceModel\Diagnostics\ExceptionUtility.cs (1)
76return ThrowHelperError(new InvalidOperationException(message));
FrameworkFork\System.ServiceModel\System\IdentityModel\Selectors\SecurityTokenResolver.cs (3)
23throw DiagnosticUtility.ExceptionUtility.ThrowHelperWarning(new InvalidOperationException(string.Format(SRServiceModel.UnableToResolveTokenReference, keyIdentifier))); 46throw DiagnosticUtility.ExceptionUtility.ThrowHelperWarning(new InvalidOperationException(string.Format(SRServiceModel.UnableToResolveTokenReference, keyIdentifierClause))); 69throw DiagnosticUtility.ExceptionUtility.ThrowHelperWarning(new InvalidOperationException(string.Format(SRServiceModel.UnableToResolveKeyReference, keyIdentifierClause)));
FrameworkFork\System.ServiceModel\System\IdentityModel\Tokens\KeyInfoSerializer.cs (1)
318throw /*System.ServiceModel.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.StandardsManagerCannotWriteObject, keyIdentifierClause.GetType())));
FrameworkFork\System.ServiceModel\System\IdentityModel\Tokens\SamlAssertion.cs (1)
33throw /*System.ServiceModel.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.ObjectIsReadOnly));
FrameworkFork\System.ServiceModel\System\IdentityModel\Tokens\SecurityKeyIdentifier.cs (2)
71throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.ObjectIsReadOnly)); 89throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.KeyIdentifierCannotCreateKey));
FrameworkFork\System.ServiceModel\System\IdentityModel\XmlBuffer.cs (1)
53return new InvalidOperationException(SRServiceModel.XmlBufferInInvalidState);
FrameworkFork\System.ServiceModel\System\ServiceModel\BasicHttpBinding.cs (1)
109throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.HttpClientCredentialTypeInvalid, BasicHttpSecurity.Transport.ClientCredentialType)));
FrameworkFork\System.ServiceModel\System\ServiceModel\BasicHttpMessageSecurity.cs (1)
77throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.BasicHttpMessageSecurityRequiresCertificate));
FrameworkFork\System.ServiceModel\System\ServiceModel\BasicHttpsBinding.cs (1)
65throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.HttpClientCredentialTypeInvalid, BasicHttpSecurity.Transport.ClientCredentialType)));
FrameworkFork\System.ServiceModel\System\ServiceModel\CallbackBehaviorAttribute.cs (2)
43throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException( 60throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(
FrameworkFork\System.ServiceModel\System\ServiceModel\ChannelFactory.cs (12)
141throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.SFxChannelFactoryEndpointAddressUri)); 151throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.SFxChannelFactoryCannotCreateFactoryWithoutDescription)); 158throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.SFxChannelFactoryNoBindingFoundInConfig1, _configurationName))); 162throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.SFxChannelFactoryNoBindingFoundInConfigOrCode)); 385throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.InnerChannelFactoryWasNotSet)); 407throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.SFxChannelFactoryTypeMustBeInterface)); 554throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.SFxCreateNonDuplexChannel1, this.Endpoint.Contract.Name))); 588throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.SfxCallbackTypeCannotBeNull, endpoint.Contract.ContractType.FullName))); 597throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.SfxCallbackTypeCannotBeNull, endpoint.Contract.ContractType.FullName))); 625throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.SFxInvalidStaticOverloadCalledForDuplexChannelFactory1, channelFactory._channelType.Name))); 639throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.SFxInvalidStaticOverloadCalledForDuplexChannelFactory1, channelFactory._channelType.Name))); 653throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.SFxInvalidStaticOverloadCalledForDuplexChannelFactory1, channelFactory._channelType.Name)));
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\AsymmetricSecurityBindingElement.cs (9)
75throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.CannotImportSupportingTokensForOperationWithoutRequestAction)); 89throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.CannotImportSupportingTokensForOperationWithoutRequestAction))); 108throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.UnsupportedSecurityPolicyAssertion, assertion.OuterXml))); 114throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.UnsupportedSecurityPolicyAssertion, assertion.OuterXml))); 503throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.UnsupportedSecurityPolicyAssertion, assertion.OuterXml))); 509throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.UnsupportedSecurityPolicyAssertion, assertion.OuterXml))); 539throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.UnsupportedSecurityPolicyAssertion, assertion.OuterXml))); 563throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.UnsupportedSecurityPolicyAssertion, assertion.OuterXml))); 603throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.UnsupportedSecurityPolicyAssertion, assertion.OuterXml)));
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\BinaryMessageEncodingBindingElement.cs (1)
90throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(errorMsg));
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\Binding.cs (6)
187new InvalidOperationException(string.Format(SRServiceModel.SecurityCapabilitiesMismatched, this))); 233throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException( 238throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException( 244throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException( 249throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException( 255throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\BindingContext.cs (2)
115throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format( 134throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.NotAllBindingElementsBuilt, builder.ToString())));
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\BodyWriter.cs (3)
55throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.BodyWriterCanOnlyBeWrittenOnce)); 60throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.BodyWriterReturnedIsNotBuffered)); 111throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.BodyWriterCanOnlyBeWrittenOnce));
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\ChannelFactoryBase.cs (1)
154throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.ChannelFactoryCannotBeUsedToCreateChannels, this.GetType().ToString())));
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\ChannelParameterCollection.cs (2)
100throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(text)); 135throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(text));
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\ChannelRequirements.cs (9)
235exception = new InvalidOperationException(string.Format(SRServiceModel.EndpointListenerRequirementsCannotBeMetBy3, 253exception = new InvalidOperationException(string.Format(SRServiceModel.CouldnTCreateChannelForType2, bindingName, contractChannelTypesString)); 348return new InvalidOperationException(string.Format(SRServiceModel.BindingDoesnTSupportAnyChannelTypes1, bindingName)); 352return new InvalidOperationException(string.Format(SRServiceModel.BindingDoesnTSupportSessionButContractRequires1, bindingName)); 356return new InvalidOperationException(string.Format(SRServiceModel.BindingDoesntSupportDatagramButContractRequires, bindingName)); 360return new InvalidOperationException(string.Format(SRServiceModel.BindingDoesnTSupportDuplexButContractRequires1, bindingName)); 364return new InvalidOperationException(string.Format(SRServiceModel.BindingDoesnTSupportRequestReplyButContract1, bindingName)); 368return new InvalidOperationException(string.Format(SRServiceModel.BindingDoesnTSupportOneWayButContractRequires1, bindingName)); 372return new InvalidOperationException(string.Format(SRServiceModel.BindingDoesnTSupportTwoWayButContractRequires1, bindingName));
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\ClientWebSocketTransportDuplexSessionChannel.cs (4)
224throw FxTrace.Exception.AsError(new InvalidOperationException(string.Format(SRServiceModel.ClientWebSocketFactory_CreateWebSocketFailed, _connectionFactory.GetType().Name), e)); 230throw FxTrace.Exception.AsError(new InvalidOperationException(string.Format(SRServiceModel.ClientWebSocketFactory_InvalidWebSocket, _connectionFactory.GetType().Name))); 236throw FxTrace.Exception.AsError(new InvalidOperationException(string.Format(SRServiceModel.ClientWebSocketFactory_InvalidWebSocket, _connectionFactory.GetType().Name))); 244throw FxTrace.Exception.AsError(new InvalidOperationException(string.Format(SRServiceModel.ClientWebSocketFactory_InvalidSubProtocol, _connectionFactory.GetType().Name, obtained, requested)));
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\CommunicationObject.cs (3)
221return new InvalidOperationException(string.Format(SRServiceModel.CommunicationObjectCannotBeUsed, this.GetCommunicationObjectType().ToString(), _state.ToString())); 226return new InvalidOperationException(string.Format(SRServiceModel.CommunicationObjectCannotBeModifiedInState, this.GetCommunicationObjectType().ToString(), _state.ToString())); 231return new InvalidOperationException(string.Format(SRServiceModel.CommunicationObjectBaseClassMethodNotCalled, this.GetCommunicationObjectType().ToString(), method));
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\ConnectionOrientedTransportChannelFactory.cs (1)
59throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.MultipleStreamUpgradeProvidersInParameters));
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\ContextBindingElementImporter.cs (1)
125throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.PolicyImportContextBindingElementCollectionIsNull));
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\FaultConverter.cs (4)
37Exception error = new InvalidOperationException(text); 46Exception error = new InvalidOperationException(text, exception); 63Exception error = new InvalidOperationException(text); 72Exception error = new InvalidOperationException(text);
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\FramingChannels.cs (1)
108throw new InvalidOperationException();
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\FramingDecoders.cs (8)
36throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.FramingValueNotAvailable)); 58throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.FramingValueNotAvailable)); 112throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.FramingValueNotAvailable)); 239throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.FramingValueNotAvailable)); 496throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.FramingValueNotAvailable)); 662throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.FramingValueNotAvailable)); 672throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.FramingValueNotAvailable)); 817throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.FramingValueNotAvailable));
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\HttpChannelFactory.cs (4)
443throw FxTrace.Exception.AsError(new InvalidOperationException(string.Format( 455throw FxTrace.Exception.AsError(new InvalidOperationException(string.Format( 611throw TraceUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.ManualAddressingRequiresAddressedMessages), message); 1167throw FxTrace.Exception.AsError(new InvalidOperationException(string.Format(
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\HttpChannelHelpers.cs (1)
100new InvalidOperationException(SRServiceModel.CredentialDisallowsNtlm));
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\HttpRequestMessageExtensionMethods.cs (1)
38throw FxTrace.Exception.AsError(new InvalidOperationException(string.Format(
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\HttpsTransportBindingElement.cs (1)
98throw FxTrace.Exception.AsError(new InvalidOperationException(string.Format(SRServiceModel.HttpPipelineNotSupportedOnClientSide, "MessageHandlerFactory")));
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\HttpTransportBindingElement.cs (1)
468throw FxTrace.Exception.AsError(new InvalidOperationException(string.Format(SRServiceModel.HttpPipelineNotSupportedOnClientSide, "MessageHandlerFactory")));
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\Message.cs (21)
96throw TraceUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.MessageHasBeenCopied), this); 98throw TraceUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.MessageHasBeenRead), this); 100throw TraceUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.MessageHasBeenWritten), this); 103throw TraceUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.InvalidMessageState), this); 283throw TraceUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.MessageIsEmpty), this); 295throw TraceUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.MessageHasBeenCopied), this); 297throw TraceUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.MessageHasBeenRead), this); 299throw TraceUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.MessageHasBeenWritten), this); 304throw TraceUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.InvalidMessageState), this); 312throw TraceUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.RequestMessageDoesNotHaveAMessageID), request); 522throw TraceUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.MessageHasBeenCopied), this); 524throw TraceUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.MessageHasBeenRead), this); 526throw TraceUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.MessageHasBeenWritten), this); 531throw TraceUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.InvalidMessageState), this); 666throw TraceUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.MessageHasBeenCopied), this); 668throw TraceUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.MessageHasBeenRead), this); 670throw TraceUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.MessageHasBeenWritten), this); 675throw TraceUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.InvalidMessageState), this); 760throw TraceUtility.ThrowHelperError(new InvalidOperationException(String.Format(CultureInfo.InvariantCulture, "IMessageHeaderWithSharedNamespace must use a single lowercase letter prefix.")), this); 767throw TraceUtility.ThrowHelperError(new InvalidOperationException(String.Format(CultureInfo.InvariantCulture, "IMessageHeaderWithSharedNamespace must use a single lowercase letter prefix.")), this); 1178throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.MessageBodyReaderInvalidReadState, bodyReader.ReadState.ToString())));
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\MessageFault.cs (3)
84throw TraceUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.EnvelopeVersionUnknown, envelopeVersion.ToString())), message); 184throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.FaultDoesNotHaveAnyDetail)); 285throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.EnvelopeVersionUnknown, version.ToString())));
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\MessageHeader.cs (1)
393throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.EnvelopeVersionUnknown, messageVersion.Envelope.ToString())));
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\MessageHeaders.cs (9)
520throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.InvalidEnumValue, header.HeaderType))); 580throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.InvalidEnumValue, kind))); 947new InvalidOperationException(string.Format(SRServiceModel.HeadersCannotBeAddedToEnvelopeVersion, _version.Envelope))); 956new InvalidOperationException(string.Format(SRServiceModel.AddressingHeadersCannotBeAddedToAddressingVersion, _version.Addressing))); 983throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.InvalidEnumValue, _headers[headerIndex].HeaderType))); 1081throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.InvalidEnumValue, _headers[index].HeaderType))); 1303new InvalidOperationException(string.Format(SRServiceModel.AddressingHeadersCannotBeAddedToAddressingVersion, _version.Addressing))); 1595throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.InvalidEnumValue, _headers[headerIndex].HeaderType))); 1627throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.InvalidEnumValue, _headers[headerIndex].HeaderType)));
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\MessageProperties.cs (1)
683throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException());
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\MessageVersion.cs (1)
172throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(String.Format(CultureInfo.InvariantCulture, "MessageVersion.Addressing cannot be null")));
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\PrivacyNoticeBindingElementImporter.cs (2)
42throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.CannotImportPrivacyNoticeElementWithoutVersionAttribute)); 48throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.PrivacyNoticeElementVersionAttributeInvalid));
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\ProducerConsumerStream.cs (1)
270throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.ObjectIsReadOnly));
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\ReliableSessionBindingElement.cs (2)
283new InvalidOperationException(SRServiceModel.ManualAddressingNotSupported)); 309new InvalidOperationException(string.Format(SRServiceModel.TransferModeNotSupported,
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\RequestContextBase.cs (1)
201throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.ReplyAlreadySent));
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\RequestReplyCorrelator.cs (1)
137throw TraceUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.MissingMessageID), reply);
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\ServiceChannel.cs (10)
566throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.SFxNonInitiatingOperation1, operation.Name))); 596Exception error = new InvalidOperationException(text); 604Exception error = new InvalidOperationException(text); 1094throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException( 1105Exception error = new InvalidOperationException(text); 1124Exception error = new InvalidOperationException(text); 1133throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.SFxCannotCallAutoOpenWhenExplicitOpenCalled)); 1168throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException( 1434throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.channelIsNotAvailable0)); 1440throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.channelDoesNotHaveADuplexSession0));
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\ServiceChannelFactory.cs (3)
147throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException( 169throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException( 374throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.SFxChannelFactoryTypeMustBeInterface));
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\ServiceChannelProxy.cs (3)
34throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.FailedToCreateTypedProxy, typeof(TChannel)))); 131throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.InvalidTypedProxyMethodHandle, _proxiedType.Name))); 153throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(String.Format(CultureInfo.InvariantCulture, "Invalid proxy method type")));
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\SslStreamSecurityUpgradeProvider.cs (2)
263throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format( 481throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.ClientCredentialsUnableToCreateLocalTokenProvider, clientCertRequirement)));
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\StreamSecurityUpgradeInitiatorBase.cs (1)
56throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.OperationInvalidBeforeSecurityNegotiation));
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\TextMessageEncoder.cs (2)
86throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException( 304throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\TransactionFlowBindingElement.cs (1)
217throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.TrustDriverVersionDoesNotSupportIssuedTokens)));
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\TransportChannelFactory.cs (1)
36throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.MultipleMebesInParameters));
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\TransportDuplexSessionChannel.cs (1)
665throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.SendCannotBeCalledAfterCloseOutputSession));
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\TransportSecurityHelpers.cs (2)
233throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format( 254throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.NoUserNameTokenProvided));
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\WebSocketTransportDuplexSessionChannel.cs (2)
729throw FxTrace.Exception.AsError(new InvalidOperationException()); 1127throw FxTrace.Exception.AsError(new InvalidOperationException(SRServiceModel.WebSocketStreamWriteCalledAfterEOMSent));
FrameworkFork\System.ServiceModel\System\ServiceModel\ClientBase.cs (1)
529throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.SFxChannelFactoryEndpointAddressUri));
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\ClientClassGenerator.cs (2)
177throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(String.Format(CultureInfo.InvariantCulture, "Invalid client generation constructor table initialization"))); 185throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(String.Format(CultureInfo.InvariantCulture, "Invalid client generation constructor table initialization")));
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\ClientCredentials.cs (2)
150throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.MultipleSecurityCredentialsManagersInChannelBindingParameters, otherCredentialsManager))); 157throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\ContractDescription.cs (5)
210throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException( 215throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException( 220throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException( 233throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException( 239throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\DataContractSerializerOperationGenerator.cs (1)
210throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.SFxWrapperTypeHasMultipleNamespaces, messageName)));
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\DispatcherBuilder.cs (2)
177throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.SFxMultipleContractStarOperations0)); 309Exception error = new InvalidOperationException(text);
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\ImportedPolicyConversionContext.cs (1)
265throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(String.Format(CultureInfo.InvariantCulture, "Each set must have at least one item in it")));
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\MessageContractImporter.cs (17)
311throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.SFxWsdlOperationInputNeedsMessageAttribute2, wsdlOperation.Name, wsdlOperation.PortType.Name))); 313throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.SFxWsdlOperationOutputNeedsMessageAttribute2, wsdlOperation.Name, wsdlOperation.PortType.Name))); 381throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.SFxWsdlOperationInputNeedsMessageAttribute2, wsdlOperation.Name, wsdlOperation.PortType.Name))); 383throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.SFxWsdlOperationOutputNeedsMessageAttribute2, wsdlOperation.Name, wsdlOperation.PortType.Name))); 780throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.SFxWsdlMessageDoesNotContainPart3, name, message.Name, message.ServiceDescription.TargetNamespace))); 803throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.SFxSchemaDoesNotContainElement, elementName.Name, elementName.Namespace))); 832throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.SFxSchemaDoesNotContainType, typeName.Name, typeName.Namespace))); 1175throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.SFxSchemaNotFound, ns))); 1456throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.SFxWsdlPartMustHaveElementOrType, part.Name, part.Message.Name, part.Message.Namespaces))); 1483throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.SFxWsdlPartMustHaveElementOrType, part.Name, part.Message.Name, part.Message.Namespaces))); 1669throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.SFxDataContractSerializerDoesNotSupportEncoded, part.Name))); 1700throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.SFxDataContractSerializerDoesNotSupportBareArray, part.Name))); 1865throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.SFxDataContractSerializerDoesNotSupportEncoded, operationName))); 1887throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.SFxDataContractSerializerDoesNotSupportEncoded, operation.Name))); 2015throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.SFxDocEncodedFaultNotSupported)); 2060throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.SFxDocEncodedNotSupported, part.Name))); 2110throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.SFxDocEncodedNotSupported, operationName)));
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\MetadataExchangeClient.cs (17)
235throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.SFxMetadataExchangeClientNoMetadataAddress)); 280throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.SFxMetadataExchangeClientNoMetadataAddress)); 326throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.SFxMetadataExchangeClientNoMetadataAddress)); 395throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.SFxResolvedMaxResolvedReferences)); 416throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.SFxBindingDoesNotHaveATransportBindingElement)); 636throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException( 757throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException( 804throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException( 816throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException( 833throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException( 964throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException( 978throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException( 1017throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException( 1050throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(stringWriter.ToString())); 1067throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException( 1136throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.SFxBadMetadataReference, 1202throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.SFxResolvedMaxResolvedReferences));
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\MetadataExporter.cs (1)
147return new InvalidOperationException(errorMessage, e);
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\MetadataImporter.cs (1)
142return new InvalidOperationException(errorMessage, e);
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\OperationDescription.cs (1)
249throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new System.InvalidOperationException(string.Format(SRServiceModel.SFxOperationMustHaveOneOrTwoMessages, this.Name)));
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\OperationGenerator.cs (2)
71throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.OperationPropertyIsRequiredForAttributeGeneration)); 744throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.SfxNoTypeSpecifiedForParameter, setting.Name)));
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\PolicyReader.cs (1)
366throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.NoValue0));
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\SchemaHelper.cs (2)
29throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.SFxConflictingGlobalElement, element.Name, schema.TargetNamespace, GetTypeName(element), GetTypeName(existingElement)))); 66throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.SFxConflictingGlobalType, type.Name, schema.TargetNamespace)));
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\ServiceEndpoint.cs (2)
189throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.AChannelServiceEndpointSBindingIsNull0)); 193throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.AChannelServiceEndpointSContractIsNull0));
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\ServiceReflector.cs (20)
150throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(String.Format(CultureInfo.InvariantCulture, "Cannot generate unique name for name {0}", baseName))); 388throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.SFxContractInheritanceRequiresInterfaces2, service, t))); 395throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.ServicesWithoutAServiceContractAttributeCan2, operationContractProviderType.Name, method.Name, service.FullName))); 405throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.SFxContractInheritanceRequiresInterfaces, service, t))); 487throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException( 492throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException( 501throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException( 506throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException( 537throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.tooManyAttributesOfTypeOn2, attrType, attrProvider.ToString()))); 550throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.couldnTFindRequiredAttributeOfTypeOn2, typeof(T), attrProvider.ToString()))); 570throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.SFxDisallowedAttributeCombination, attrProvider, attrType.FullName, otherType.FullName))); 582throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.couldnTFindRequiredAttributeOfTypeOn2, typeof(T), attrProvider.ToString()))); 603throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.AttemptedToGetContractTypeForButThatTypeIs1, interfaceType.Name))); 623throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException( 666new InvalidOperationException(string.Format(SRServiceModel.SFxBadByValueParameterMetadata, 675new InvalidOperationException(string.Format(SRServiceModel.SFxBadByReferenceParameterMetadata, 793throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.NoEndMethodFoundForAsyncBeginMethod3, beginMethod.Name, beginMethod.DeclaringType.FullName, endMethodName))); 797throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.MoreThanOneEndMethodFoundForAsyncBeginMethod3, beginMethod.Name, beginMethod.DeclaringType.FullName, endMethodName))); 808throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.InvalidAsyncEndMethodSignatureForMethod2, endMethod.Name, endMethod.DeclaringType.FullName))); 841throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.InvalidAsyncBeginMethodSignatureForMethod2, method.Name, method.DeclaringType.FullName)));
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\TypeLoader.cs (49)
111throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException( 143throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format( 148throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format( 372throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.SFxKnownTypeAttributeUnknownMethod3, provider, knownTypeAttribute.MethodName, type.FullName))); 375throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.SFxKnownTypeAttributeReturnType3, provider, knownTypeAttribute.MethodName, type.FullName))); 386throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.SFxKnownTypeAttributeInvalid1, provider.ToString()))); 466new InvalidOperationException(string.Format(SRServiceModel.SyncAsyncMatchConsistency_Attributes6, 477new InvalidOperationException(string.Format(SRServiceModel.SyncTaskMatchConsistency_Attributes6, 487new InvalidOperationException(string.Format(SRServiceModel.TaskAsyncMatchConsistency_Attributes6, 682throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException( 724throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException( 730throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException( 782throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException( 858throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException( 882throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.CannotHaveTwoOperationsWithTheSameName3, method1Name, method2Name, reflectionInfo.iface))); 888throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.CannotHaveTwoOperationsWithTheSameName3, method1Name, method2Name, reflectionInfo.iface))); 894throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.CannotHaveTwoOperationsWithTheSameName3, method1Name, method2Name, reflectionInfo.iface))); 976throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.OneWayAndFaultsIncompatible2, methodInfo.DeclaringType.FullName, operationName.EncodedName))); 1057throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.ServiceOperationsMarkedWithIsOneWayTrueMust0)); 1062throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.OneWayOperationShouldNotSpecifyAReplyAction1, operationName))); 1087throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException( 1090throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException( 1190throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.SFxMultipleUnknownHeaders, methodInfo, methodInfo.DeclaringType))); 1216throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.SFxInvalidMessageContractSignature, methodName))); 1221throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.SFxInvalidMessageContractSignature, methodName))); 1297throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.SFxMessageContractBaseTypeNotValid, baseType, typedMessageType))); 1471throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.SFxStaticMessageHeaderPropertiesNotAllowed, defaultName))); 1594new InvalidOperationException(string.Format(SRServiceModel.SyncAsyncMatchConsistency_Parameters5, 1610new InvalidOperationException(string.Format(SRServiceModel.SyncAsyncMatchConsistency_Parameters5, 1627new InvalidOperationException(string.Format(SRServiceModel.SyncAsyncMatchConsistency_Parameters5, 1642new InvalidOperationException(string.Format(SRServiceModel.SyncAsyncMatchConsistency_ReturnType5, 1656new InvalidOperationException(string.Format(SRServiceModel.SyncAsyncMatchConsistency_Attributes6, 1671new InvalidOperationException(string.Format(SRServiceModel.SyncAsyncMatchConsistency_Attributes6, 1686new InvalidOperationException(string.Format(SRServiceModel.SyncAsyncMatchConsistency_Property6, 1703new InvalidOperationException(string.Format(SRServiceModel.SyncAsyncMatchConsistency_Property6, 1735new InvalidOperationException(string.Format(SRServiceModel.SyncTaskMatchConsistency_Parameters5, 1750new InvalidOperationException(string.Format(SRServiceModel.SyncTaskMatchConsistency_Parameters5, 1764new InvalidOperationException(string.Format(SRServiceModel.SyncTaskMatchConsistency_ReturnType5, 1777new InvalidOperationException(string.Format(SRServiceModel.SyncTaskMatchConsistency_Attributes6, 1791new InvalidOperationException(string.Format(SRServiceModel.SyncTaskMatchConsistency_Attributes6, 1805new InvalidOperationException(string.Format(SRServiceModel.SyncTaskMatchConsistency_Property6, 1821new InvalidOperationException(string.Format(SRServiceModel.SyncTaskMatchConsistency_Property6, 1852new InvalidOperationException(string.Format(SRServiceModel.TaskAsyncMatchConsistency_Parameters5, 1868new InvalidOperationException(string.Format(SRServiceModel.TaskAsyncMatchConsistency_Parameters5, 1883new InvalidOperationException(string.Format(SRServiceModel.TaskAsyncMatchConsistency_ReturnType5, 1897new InvalidOperationException(string.Format(SRServiceModel.TaskAsyncMatchConsistency_Attributes6, 1912new InvalidOperationException(string.Format(SRServiceModel.TaskAsyncMatchConsistency_Attributes6, 1927new InvalidOperationException(string.Format(SRServiceModel.TaskAsyncMatchConsistency_Property6, 1944new InvalidOperationException(string.Format(SRServiceModel.TaskAsyncMatchConsistency_Property6,
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\WsdlExporter.cs (9)
36throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.WsdlExporterIsFaulted)); 100throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.WsdlExporterIsFaulted)); 116throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.WsdlExporterIsFaulted)); 617new InvalidOperationException(string.Format(SRServiceModel.AddressingVersionNotSupported, addressing))); 664throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.SupportedAddressingModeNotSupported, mode))); 700new InvalidOperationException(string.Format(SRServiceModel.AddressingVersionNotSupported, addressVersion))); 974throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(String.Format(CultureInfo.InvariantCulture, "You must pass at least one namespaceScope"))); 1205return new InvalidOperationException(errorMessage, e); 1223return new InvalidOperationException(errorMessage, e);
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\WsdlImporter.cs (19)
106throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.WsdlImporterIsFaulted)); 126throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.WsdlImporterIsFaulted)); 146throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.WsdlImporterIsFaulted)); 167throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.WsdlImporterIsFaulted)); 178throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.WsdlImporterIsFaulted)); 189throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.WsdlImporterIsFaulted)); 200throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.WsdlImporterIsFaulted)); 223throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.WsdlImporterIsFaulted)); 248throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.WsdlImporterIsFaulted)); 274throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.WsdlImporterIsFaulted)); 775WsdlImportException wie = WsdlImportException.Create(item, new InvalidOperationException(errorMsg)); 826WsdlImportException wie = WsdlImportException.Create(item, new InvalidOperationException(string.Format(SRServiceModel.UnknownWSDLExtensionIgnored, extension.GetType().AssemblyQualifiedName))); 877throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.SFxInvalidWsdlBindingOpNoName, wsdlOperationBinding.Binding.Name))); 906throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.SFxInvalidWsdlBindingOpMismatch2, wsdlOperationBinding.Binding.Name, wsdlOperationBinding.Name))); 989throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.UnableToLocateOperation2, wsdlOperationBinding.Name, contract.Name))); 1619throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(WsdlImportException.Create(endpointContext.WsdlPort, new InvalidOperationException(SRServiceModel.NoUsablePolicyAssertions))); 1623throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(WsdlImportException.Create(endpointContext.WsdlBinding, new InvalidOperationException(SRServiceModel.NoUsablePolicyAssertions))); 1897return new InvalidOperationException(errorMessage, e); 1911return new InvalidOperationException(errorMessage, e);
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\XmlSerializerOperationBehavior.cs (10)
344throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.SFxKnownTypeNull, Operation.Name))); 355throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.SFxRpcMessageBodyPartNameInvalid, Operation.Name, this.Operation.Messages[0].MessageName, _request.BodyMapping.XsdElementName, this.Operation.Name))); 361throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.SFxRpcMessageBodyPartNameInvalid, Operation.Name, this.Operation.Messages[1].MessageName, _reply.BodyMapping.XsdElementName, responseName.EncodedName))); 421throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.SFxHeaderNameMismatchInMessageContract, message.MessageType, header.MemberInfo.Name, header.Name, headerName))); 423throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.SFxHeaderNameMismatchInOperation, this.Operation.Name, this.Operation.DeclaringContract.Name, this.Operation.DeclaringContract.Namespace, header.Name, headerName))); 428throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.SFxHeaderNamespaceMismatchInMessageContract, message.MessageType, header.MemberInfo.Name, header.Namespace, headerNs))); 430throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.SFxHeaderNamespaceMismatchInOperation, this.Operation.Name, this.Operation.DeclaringContract.Name, this.Operation.DeclaringContract.Namespace, header.Namespace, headerNs))); 525throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.SFxFaultTypeAnonymous, this.Operation.Name, fault.DetailType.FullName))); 860throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(isWrapped ? SRServiceModel.SFxInvalidXmlAttributeInWrapped : SRServiceModel.SFxInvalidXmlAttributeInBare, invalidAttributeType, elementName.DecodedName))); 862throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.SFxXmlArrayNotAllowedForMultiple, elementName.DecodedName, ns)));
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\ChannelDispatcher.cs (4)
491return new InvalidOperationException(string.Format(SRServiceModel.SFxChannelDispatcherUnableToOpen1, _listener.Uri), e); 495return new InvalidOperationException(string.Format(SRServiceModel.SFxChannelDispatcherUnableToOpen2, _listener.Uri, endpointContractNames), e); 643Exception error = new InvalidOperationException(SRServiceModel.SFxChannelDispatcherNoMessageVersion); 685Exception error = new InvalidOperationException(SRServiceModel.SFxCollectionDoesNotSupportSet0);
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\ChannelHandler.cs (3)
268throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(String.Format(CultureInfo.InvariantCulture, "No DispatchOperationRuntime found to process message."))); 273throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.SFxNoEndpointMatchingAddressForConnectionOpeningMessage, message.Headers.Action, "Open"))); 522throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.SFxNonExceptionThrown));
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\ClientRuntime.cs (2)
259throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(text)); 313throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(text));
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\DataContractSerializerOperationFormatter.cs (2)
86throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.SFxKnownTypeNull, description.Name))); 423throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\DispatchOperationRuntime.cs (5)
46throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.RuntimeRequiresInvoker0)); 66throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.DispatchRuntimeRequiresFormatter0, _name))); 301ErrorBehavior.ThrowAndCatch(new InvalidOperationException(message)); 309ErrorBehavior.ThrowAndCatch(new InvalidOperationException(message)); 316throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.SFxInvalidReplyAction, this.Name, reply.Headers.Action ?? "{NULL}", this.ReplyAction)));
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\DispatchRuntime.cs (3)
536throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.SFxCannotActivateCallbackInstace)); 541throw TraceUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.SFxCannotActivateCallbackInstace), message); 546throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.SFxCannotActivateCallbackInstace));
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\EndpointDispatcher.cs (2)
98Exception error = new InvalidOperationException(SRServiceModel.SFxEndpointDispatcherMultipleChannelDispatcher0); 115Exception error = new InvalidOperationException(SRServiceModel.SFxEndpointDispatcherDifferentChannelDispatcher0);
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\ImmutableDispatchRuntime.cs (1)
876throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.SFxActionDemuxerDuplicate, existingOperation.Name, operation.Name, action)));
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\InstanceBehavior.cs (2)
78throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.SFxNoDefaultConstructor)); 88throw TraceUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.SFxNoDefaultConstructor), request);
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\ListenerBinder.cs (1)
38throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.UnknownListenerType1, listener.Uri.AbsoluteUri)));
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\MessageRpc.cs (1)
594Exception error = new InvalidOperationException(text);
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\OperationFormatter.cs (5)
167throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.SFxMessageContractRequiresDefaultConstructor, messageContractType.FullName), mme)); 504throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.SFxDocEncodedNotSupported, operation.Name))); 518throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.SFxTypedMessageCannotBeRpcLiteral, operation.Name))); 528throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.SFxTypedOrUntypedMessageCannotBeMixedWithParameters, operation.Name))); 530throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.SFxTypedOrUntypedMessageCannotBeMixedWithVoidInRpc, operation.Name)));
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\PrimitiveOperationFormatter.cs (8)
179new InvalidOperationException(string.Format(SRServiceModel.AddressingVersionNotSupported, addressing))); 201new InvalidOperationException(string.Format(SRServiceModel.AddressingVersionNotSupported, addressing))); 224throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.SFxInvalidUseOfPrimitiveOperationFormatter)); 297throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.SFxMessagePartDescriptionMissingType, bodyDescription.Name, bodyDescription.Namespace))); 767throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.SFxInvalidUseOfPrimitiveOperationFormatter)); 798throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.SFxInvalidUseOfPrimitiveOperationFormatter)); 859throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.SFxInvalidUseOfPrimitiveOperationFormatter)); 891throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.SFxInvalidUseOfPrimitiveOperationFormatter));
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\ProxyOperationRuntime.cs (3)
84throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.ClientRuntimeRequiresFormatter0, _name))); 255throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.SFxProxyRuntimeMessageCannotBeNull, _name))); 260throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.SFxInvalidRequestAction, this.Name, rpc.Request.Headers.Action ?? "{NULL}", this.Action)));
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\SharedRuntimeState.cs (2)
54throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.SFxImmutableServiceHostBehavior0)); 58throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.SFxImmutableChannelFactoryBehavior0));
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\StreamFormatter.cs (3)
177throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.SFxInvalidStreamInTypedMessage, messageDescription.MessageName))); 179throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.SFxInvalidStreamInRequest, operationName))); 181throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.SFxInvalidStreamInResponse, operationName)));
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\SyncMethodInvoker.cs (3)
79throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.SFxNoServiceObject)); 83throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.SFxInputParametersToServiceNull, _inputParameterCount))); 86throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.SFxInputParametersToServiceInvalid, _inputParameterCount, inputs.Length)));
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\TaskMethodInvoker.cs (3)
135new InvalidOperationException(SRServiceModel.SFxNoServiceObject)); 140new InvalidOperationException(string.Format(SRServiceModel.SFxInputParametersToServiceNull, _inputParameterCount))); 144new InvalidOperationException(string.Format(SRServiceModel.SFxInputParametersToServiceInvalid, _inputParameterCount,
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\ThreadBehavior.cs (1)
122throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(text));
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\XmlSerializerOperationFormatter.cs (1)
281throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.SFxBodyCannotBeNull, messageDescription.MessageName)));
FrameworkFork\System.ServiceModel\System\ServiceModel\DuplexChannelFactory.cs (5)
216throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.SFxCreateDuplexChannelNoCallback1)); 220throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.SFxCreateDuplexChannelNoCallback)); 225throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.SFxCreateDuplexChannelNoCallbackUserObject)); 230throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.SFxCreateDuplexChannel1, this.Endpoint.Contract.Name))); 237throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(
FrameworkFork\System.ServiceModel\System\ServiceModel\EndpointIdentity.cs (1)
182throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.UnrecognizedIdentityPropertyType, this.IdentityClaim.GetType().ToString())));
FrameworkFork\System.ServiceModel\System\ServiceModel\ExtensionCollection.cs (1)
112throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.SFxCannotSetExtensionsByIndex));
FrameworkFork\System.ServiceModel\System\ServiceModel\FederatedMessageSecurityOverHttp.cs (2)
142throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.BearerKeyIncompatibleWithWSFederationHttpBinding)); 147throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.SecureConversationRequiredByReliableSession));
FrameworkFork\System.ServiceModel\System\ServiceModel\HttpTransportSecurity.cs (1)
119throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.CertificateUnsupportedForHttpTransportCredentialOnly));
FrameworkFork\System.ServiceModel\System\ServiceModel\InstanceContext.cs (1)
198Exception error = new InvalidOperationException(SRServiceModel.SFxInstanceNotInitialized);
FrameworkFork\System.ServiceModel\System\ServiceModel\MessageSecurityOverHttp.cs (2)
79throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.SecureConversationRequiredByReliableSession)); 92throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.ClientCredentialTypeMustBeSpecifiedForMixedMode));
FrameworkFork\System.ServiceModel\System\ServiceModel\MessageSecurityOverTcp.cs (1)
75throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.ClientCredentialTypeMustBeSpecifiedForMixedMode));
FrameworkFork\System.ServiceModel\System\ServiceModel\NetHttpBinding.cs (1)
118throw FxTrace.Exception.AsError(new InvalidOperationException(string.Format(SRServiceModel.HttpClientCredentialTypeInvalid, this.BasicHttpSecurity.Transport.ClientCredentialType)));
FrameworkFork\System.ServiceModel\System\ServiceModel\NetHttpsBinding.cs (1)
75throw FxTrace.Exception.AsError(new InvalidOperationException(string.Format(SRServiceModel.HttpClientCredentialTypeInvalid, BasicHttpSecurity.Transport.ClientCredentialType)));
FrameworkFork\System.ServiceModel\System\ServiceModel\OperationContext.cs (1)
54throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.SFxInvalidChannelToOperationContext));
FrameworkFork\System.ServiceModel\System\ServiceModel\OperationContextScope.cs (2)
50throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.SFxInterleavedContextScopes0)); 53throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.SFxContextModifiedInsideScope0));
FrameworkFork\System.ServiceModel\System\ServiceModel\OperationContractAttribute.cs (1)
128throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\ChannelProtectionRequirements.cs (1)
272throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.OnlyBodyReturnValuesSupported));
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\ClientCredentialsSecurityTokenManager.cs (3)
109throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.ClientCertificateNotProvidedOnClientCredentials)); 131throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.ClientCertificateNotProvidedOnClientCredentials)); 146throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.UserNamePasswordNotProvidedOnClientCredentials));
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\EncryptedType.cs (2)
58throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.BadEncryptionState)); 67throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.BadEncryptionState));
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\HttpDigestClientCredential.cs (1)
48throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.ObjectIsReadOnly));
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\MessagePartSpecification.cs (3)
53throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.ObjectIsReadOnly)); 84throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.ObjectIsReadOnly)); 94throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.ObjectIsReadOnly));
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\ReferenceList.cs (1)
103throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SR_IdentityModel.ReferenceListCannotBeEmpty));
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\RequestSecurityToken.cs (17)
178throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.ObjectIsReadOnly)); 192throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.ObjectIsReadOnly)); 206throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.ObjectIsReadOnly)); 232throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.ObjectIsReadOnly)); 244throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.ItemNotAvailableInDeserializedRST, "RequestProperties"))); 251throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.ObjectIsReadOnly)); 281throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.ObjectIsReadOnly)); 297throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.ObjectIsReadOnly)); 311throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.ObjectIsReadOnly)); 322throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.ItemAvailableInDeserializedRSTOnly, "RequestSecurityTokenXml"))); 337throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.ObjectIsReadOnly)); 360throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.ItemNotAvailableInDeserializedRST, "AppliesTo"))); 372throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.ItemNotAvailableInDeserializedRST, "AppliesToSerializer"))); 384throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.ItemNotAvailableInDeserializedRST, "AppliesToType"))); 403throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.ObjectIsReadOnly)); 438throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.ObjectIsReadOnly)); 451throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.ItemAvailableInDeserializedRSTOnly, "MatchesAppliesTo")));
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\RequestSecurityTokenResponse.cs (21)
168throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.ObjectIsReadOnly)); 182throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.ObjectIsReadOnly)); 196throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.ObjectIsReadOnly)); 210throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.ObjectIsReadOnly)); 240throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.ObjectIsReadOnly)); 254throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.ObjectIsReadOnly)); 270throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.ObjectIsReadOnly)); 308throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.ObjectIsReadOnly)); 319throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.ItemNotAvailableInDeserializedRSTR, "EntropyToken"))); 331throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.ItemNotAvailableInDeserializedRSTR, "IssuedToken"))); 338throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.ObjectIsReadOnly)); 349throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.ItemNotAvailableInDeserializedRSTR, "ProofToken"))); 356throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.ObjectIsReadOnly)); 367throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.ItemAvailableInDeserializedRSTROnly, "RequestSecurityTokenXml"))); 379throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.ItemNotAvailableInDeserializedRST, "AppliesTo"))); 391throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.ItemNotAvailableInDeserializedRST, "AppliesToSerializer"))); 403throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.ItemNotAvailableInDeserializedRST, "AppliesToType"))); 415throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.ItemNotAvailableInDeserializedRSTR, "IsLifetimeSet"))); 435throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.ObjectIsReadOnly)); 448throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.ObjectIsReadOnly)); 461throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.ItemAvailableInDeserializedRSTOnly, "MatchesAppliesTo")));
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\ScopedMessagePartSpecification.cs (1)
203throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.ObjectIsReadOnly));
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\SecureConversationDriver.cs (4)
23throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.SecureConversationDriverVersionDoesNotSupportSession)); 31throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.SecureConversationDriverVersionDoesNotSupportSession)); 51throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.SecureConversationDriverVersionDoesNotSupportSession)); 59throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.SecureConversationDriverVersionDoesNotSupportSession));
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\SecurityAlgorithmSuite.cs (2)
296throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.SigningTokenHasNoKeys, token))); 317throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.SigningTokenHasNoKeysSupportingTheAlgorithmSuite, token, this)));
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\SecurityHeader.cs (1)
155throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.OperationCannotBeDoneAfterProcessingIsStarted));
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\SecurityProtocolFactory.cs (1)
1023throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.NoncesCachedInfinitely));
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\SecurityUtils.cs (5)
887throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.CannotFindCert, storeName, storeLocation, findType, findValue))); 941return new InvalidOperationException(string.Format(SRServiceModel.CannotFindCert, storeName, storeLocation, findType, findValue)); 943return new InvalidOperationException(string.Format(SRServiceModel.CannotFindCertForTarget, storeName, storeLocation, findType, findValue, target)); 947return new InvalidOperationException(string.Format(SRServiceModel.FoundMultipleCerts, storeName, storeLocation, findType, findValue)); 949return new InvalidOperationException(string.Format(SRServiceModel.FoundMultipleCertsForTarget, storeName, storeLocation, findType, findValue, target));
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\SecurityVersion.cs (2)
106throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException( 136throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\Tokens\DerivedKeySecurityToken.cs (1)
113throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.DerivedKeyNotInitialized));
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\Tokens\SecurityTokenParameters.cs (1)
84throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.SecurityTokenParametersCloneInvalidResult, this.GetType().ToString())));
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\TrustDriver.cs (4)
41throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.TrustDriverVersionDoesNotSupportIssuedTokens)); 50throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.TrustDriverVersionDoesNotSupportIssuedTokens)); 74throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.TrustDriverVersionDoesNotSupportSession)); 85throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.TrustDriverVersionDoesNotSupportSession));
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\UserNamePasswordClientCredential.cs (1)
60throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.ObjectIsReadOnly));
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\WindowsClientCredential.cs (1)
89throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.ObjectIsReadOnly));
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\WSSecurityPolicy.cs (6)
1059throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.UnsupportedSecurityPolicyAssertion, assertion.OuterXml))); 1071throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.UnsupportedSecurityPolicyAssertion, assertion.OuterXml))); 1083throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.UnsupportedSecurityPolicyAssertion, assertion.OuterXml))); 1192throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.UnsupportedSecurityPolicyAssertion, assertion.OuterXml))); 1256throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.UnsupportedSecurityPolicyAssertion, assertion.OuterXml))); 2860throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.MaximumPolicyRedirectionsExceeded));
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\WSSecurityPolicy12.cs (5)
460throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.UnsupportedSecurityPolicyAssertion, assertion.OuterXml))); 472throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.UnsupportedSecurityPolicyAssertion, assertion.OuterXml))); 484throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.UnsupportedSecurityPolicyAssertion, assertion.OuterXml))); 496throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.UnsupportedSecurityPolicyAssertion, assertion.OuterXml))); 611throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.UnsupportedSecurityPolicyAssertion, assertion.OuterXml)));
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\WSTrust.cs (4)
288throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.NoAppliesToPresent)); 460throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.RstrHasMultipleIssuedTokens)); 468throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.RstrHasMultipleProofTokens)); 704throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.UnableToCreateKeyTypeElementForUnknownKeyType, keyType.ToString())));
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\X509CertificateInitiatorClientCredential.cs (1)
70throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.ObjectIsReadOnly));
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\X509CertificateRecipientClientCredential.cs (1)
145throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.ObjectIsReadOnly));
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\X509ServiceCertificateAuthentication.cs (2)
143throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.MissingCustomCertificateValidator)); 157throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.ObjectIsReadOnly));
FrameworkFork\System.ServiceModel\System\ServiceModel\TcpTransportSecurity.cs (1)
73throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(
FrameworkFork\System.ServiceModel\System\ServiceModel\WSHttpBinding.cs (2)
84throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.HttpClientCredentialTypeInvalid, _security.Transport.ClientCredentialType))); 95throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRServiceModel.WSHttpDoesNotSupportRMWithHttps));
FrameworkFork\System.ServiceModel\System\ServiceModel\XmlBuffer.cs (1)
127return new InvalidOperationException(SRServiceModel.XmlBufferInInvalidState);
FrameworkFork\System.Web.Services\Services\Description\ServiceDescription.cs (2)
2022throw new InvalidOperationException(string.Format(ResWebServices.WebDescriptionTooManyMessages)); 2033if (oldValue.GetType() != newValue.GetType()) throw new InvalidOperationException(string.Format(ResWebServices.WebDescriptionTooManyMessages));
FrameworkFork\System.Web.Services\Services\Description\WebReferenceOptions.cs (1)
179throw new InvalidOperationException(string.Format(ResWebServices.WsdlInstanceValidationDetails, args.Message, args.Exception.LineNumber.ToString(CultureInfo.InvariantCulture), args.Exception.LinePosition.ToString(CultureInfo.InvariantCulture)));
Metadata\MetadataDocumentLoader.cs (1)
174throw new InvalidOperationException();
Metadata\MetadataFileNameManager.cs (1)
56throw new InvalidOperationException(string.Format(MetadataResources.Culture, MetadataResources.ErrUnableToCreateUniqueFileNameFormat, GetFileNameWithExtension(fileName, extension)));
Metadata\ServiceDescriptor.cs (1)
261throw new InvalidOperationException(MetadataResources.ErrServiceMetadataNotImported);
Shared\Options\ApplicationOptions.cs (1)
75throw new InvalidOperationException(string.Format(CultureInfo.CurrentCulture, Shared.Resources.ErrorOptionAlreadyRegisteredFormat, option.Name));
Shared\Utilities\AsyncHelper.cs (1)
64throw new InvalidOperationException();
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();
GenerateDocumentationAndConfigFiles (59)
Program.cs (4)
933onDuplicateEntryInRelease: (_1, _2, _3, _4, line) => throw new InvalidOperationException($"Duplicate entry in {shippedFile} at {line.LineNumber}: '{line}'"), 934onInvalidEntry: (line, _2, _3, _4) => throw new InvalidOperationException($"Invalid entry in {shippedFile} at {line.LineNumber}: '{line}'"), 943onDuplicateEntryInRelease: (_1, _2, _3, _4, line) => throw new InvalidOperationException($"Duplicate entry in {unshippedFile} at {line.LineNumber}: '{line}'"), 944onInvalidEntry: (line, _2, _3, _4) => throw new InvalidOperationException($"Invalid entry in {unshippedFile} at {line.LineNumber}: '{line}'"),
src\Compilers\Core\Portable\InternalUtilities\ReaderWriterLockSlimExtensions.cs (2)
93throw new InvalidOperationException(); 101throw new InvalidOperationException();
src\Compilers\Core\Portable\Text\TextChangeRangeExtensions.cs (1)
323throw new InvalidOperationException();
src\Dependencies\Collections\Internal\ThrowHelper.cs (4)
181throw new InvalidOperationException(GetResourceString(resource), e); 199throw new InvalidOperationException(SR.InvalidOperation_EnumFailedVersion); 205throw new InvalidOperationException(SR.InvalidOperation_EnumOpCantHappen); 211throw new InvalidOperationException(SR.InvalidOperation_ConcurrentOperationsNotSupported);
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (1)
102throw new InvalidOperationException($"Unexpected concurrent access to {GetType()}");
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+ValueBuilder.cs (1)
68throw new InvalidOperationException($"Unexpected concurrent access to {GetType()}");
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+ValueBuilder.cs (1)
78throw new InvalidOperationException($"Unexpected concurrent access to {GetType()}");
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Enumerator.cs (2)
24public object? Current => throw new InvalidOperationException(); 33throw new InvalidOperationException();
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Enumerator`1.cs (1)
24public new T Current => throw new InvalidOperationException();
src\Dependencies\Contracts\Contract.cs (1)
161throw new InvalidOperationException($"{message} - file {fileName} line {lineNumber}");
src\Dependencies\Contracts\ExceptionUtilities.cs (2)
27return new InvalidOperationException(output); 31=> new InvalidOperationException($"This program location is thought to be unreachable. File='{path}' Line={line}");
src\RoslynAnalyzers\Utilities\Compiler\Extensions\IOperationExtensions.cs (1)
532throw new InvalidOperationException();
src\RoslynAnalyzers\Utilities\Compiler\Lightup\LightupHelpers.cs (2)
171throw new InvalidOperationException(); 187throw new InvalidOperationException();
src\RoslynAnalyzers\Utilities\Compiler\SmallDictionary.cs (2)
306throw new InvalidOperationException(); 573throw new InvalidOperationException();
src\RoslynAnalyzers\Utilities\Workspaces\DocumentExtensions.cs (3)
22return semanticModel ?? throw new InvalidOperationException("SyntaxTree is required to accomplish the task but is not supported by document"); 31return syntaxTree ?? throw new InvalidOperationException("SyntaxTree is required to accomplish the task but is not supported by document"); 40return root ?? throw new InvalidOperationException("SyntaxTree is required to accomplish the task but is not supported by document");
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EditorConfig\Parsing\EditorConfigFile.cs (2)
62throw new InvalidOperationException("No path was given for this editorconfig file"); 78throw new InvalidOperationException("No path was given for this editorconfig file");
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EditorConfig\Parsing\Sections\Section.cs (1)
142throw new InvalidOperationException("No path given for editorconfig");
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SemanticModelExtensions.cs (7)
37=> semanticModel.AnalyzeDataFlow(statementOrExpression) ?? throw new InvalidOperationException(); 40=> semanticModel.AnalyzeDataFlow(firstStatement, lastStatement) ?? throw new InvalidOperationException(); 43=> semanticModel.AnalyzeControlFlow(statement) ?? throw new InvalidOperationException(); 46=> semanticModel.AnalyzeControlFlow(firstStatement, lastStatement) ?? throw new InvalidOperationException(); 51?? throw new InvalidOperationException(); 57?? throw new InvalidOperationException(); 63?? throw new InvalidOperationException();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (1)
24=> node.Parent ?? throw new InvalidOperationException("Node's parent was null");
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTokenExtensions.cs (2)
22=> GetAncestor(token, predicate) ?? throw new InvalidOperationException("Could not find a valid ancestor"); 154=> token.Parent ?? throw new InvalidOperationException("Token's parent was null");
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser.cs (1)
89trimmedDictionary[key.Trim()] = allRawConventions.TryGetValue(key, out var value) ? value : throw new InvalidOperationException();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\NamingStyle.cs (2)
83throw new InvalidOperationException(); 170default: throw new InvalidOperationException();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (1)
482throw new InvalidOperationException();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Serialization\ObjectWriter.cs (1)
286throw new InvalidOperationException($"Unsupported object type: {value.GetType()}");
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\BKTree.Builder.cs (1)
201throw new InvalidOperationException();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\StringEscapeEncoder.cs (1)
138throw new InvalidOperationException();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\TaskExtensions.cs (1)
36throw new InvalidOperationException($"{nameof(WaitAndGetResult)} cannot be called from a thread pool thread.");
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationConstructedMethodSymbol.cs (1)
85=> throw new System.InvalidOperationException();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationMethodSymbol.cs (1)
110=> throw new InvalidOperationException();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\DocumentExtensions.cs (3)
39return semanticModel ?? throw new InvalidOperationException(string.Format(WorkspaceExtensionsResources.SyntaxTree_is_required_to_accomplish_the_task_but_is_not_supported_by_document_0, document.Name)); 63return syntaxTree ?? throw new InvalidOperationException(string.Format(WorkspaceExtensionsResources.SyntaxTree_is_required_to_accomplish_the_task_but_is_not_supported_by_document_0, document.Name)); 80return root ?? throw new InvalidOperationException(string.Format(WorkspaceExtensionsResources.SyntaxTree_is_required_to_accomplish_the_task_but_is_not_supported_by_document_0, document.Name));
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\ISolutionExtensions.cs (3)
36=> solution.GetDocument(syntaxTree) ?? throw new InvalidOperationException(); 43throw new InvalidOperationException(string.Format(WorkspaceExtensionsResources.Project_of_ID_0_is_required_to_accomplish_the_task_but_is_not_available_from_the_solution, projectId)); 109=> new InvalidOperationException(WorkspaceExtensionsResources.The_solution_does_not_contain_the_specified_document);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\ProjectExtensions.cs (1)
114throw new InvalidOperationException(string.Format(WorkspaceExtensionsResources.Compilation_is_required_to_accomplish_the_task_but_is_not_supported_by_project_0, project.Name));
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\AddImports\AbstractAddImportsService.cs (1)
126throw 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\10.0.0-preview.7.25351.105\contentFiles\cs\netstandard2.0\HostFactoryResolver.cs (2)
247_hostTcs.TrySetException(new InvalidOperationException("The entry point exited without ever building an IHost.")); 286throw 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)
96throw new InvalidOperationException(
src\Shared\CommandLineUtils\CommandLine\CommandLineApplication.cs (1)
124throw new InvalidOperationException(message);
HealthChecksSandbox.AppHost (1)
Program.cs (1)
34() => new HealthCheckResult(status, description, new InvalidOperationException(exceptionMessage))
HelixTestRunner (1)
ProcessUtil.cs (1)
158processLifetimeTask.TrySetException(new InvalidOperationException($"Command {filename} {arguments} returned exit code {process.ExitCode} output: {outputBuilder.ToString()}"));
http2cat (4)
src\Shared\Http2cat\Http2Utilities.cs (1)
152throw new InvalidOperationException();
src\Shared\ServerInfrastructure\BufferExtensions.cs (1)
61throw new InvalidOperationException("Buffer backed by array was expected");
src\Shared\ServerInfrastructure\StringUtilities.cs (2)
46throw new InvalidOperationException(); 60throw 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.");
IdeBenchmarks (2)
SQLitePersistentStorageBenchmark.cs (2)
51throw new InvalidOperationException(); 80throw new InvalidOperationException();
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}'.");
IdentitySample.PasskeyConformance (1)
InMemoryUserStore.cs (1)
29throw new InvalidOperationException($"Unknown user with ID '{user.Id}'.");
IdentitySample.PasskeyUI (1)
InMemoryUserStore.cs (1)
29throw new InvalidOperationException($"Unknown user with ID '{user.Id}'.");
IIS.FunctionalTests (11)
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)
85throw new InvalidOperationException("Test instance is already attached to this fixture"); 95throw new InvalidOperationException("Different test is attached to this fixture");
src\Servers\IIS\IIS\test\Common.FunctionalTests\WebSocketTests.cs (2)
143throw new InvalidOperationException("The response status code was incorrect: " + statusLine); 163throw new InvalidOperationException("The response status code was incorrect: " + statusLine);
src\Shared\Http2cat\Http2Utilities.cs (1)
152throw new InvalidOperationException();
src\Shared\ServerInfrastructure\BufferExtensions.cs (1)
61throw new InvalidOperationException("Buffer backed by array was expected");
src\Shared\ServerInfrastructure\StringUtilities.cs (2)
46throw new InvalidOperationException(); 60throw new InvalidOperationException();
IIS.LongTests (9)
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)
85throw new InvalidOperationException("Test instance is already attached to this fixture"); 95throw new InvalidOperationException("Different test is attached to this fixture");
src\Shared\Http2cat\Http2Utilities.cs (1)
152throw new InvalidOperationException();
src\Shared\ServerInfrastructure\BufferExtensions.cs (1)
61throw new InvalidOperationException("Buffer backed by array was expected");
src\Shared\ServerInfrastructure\StringUtilities.cs (2)
46throw new InvalidOperationException(); 60throw new InvalidOperationException();
IIS.Microbenchmarks (1)
src\Shared\BenchmarkRunner\AspNetCoreBenchmarkAttribute.cs (1)
53throw new InvalidOperationException(message);
IIS.NewHandler.FunctionalTests (9)
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)
85throw new InvalidOperationException("Test instance is already attached to this fixture"); 95throw new InvalidOperationException("Different test is attached to this fixture");
src\Shared\Http2cat\Http2Utilities.cs (1)
152throw new InvalidOperationException();
src\Shared\ServerInfrastructure\BufferExtensions.cs (1)
61throw new InvalidOperationException("Buffer backed by array was expected");
src\Shared\ServerInfrastructure\StringUtilities.cs (2)
46throw new InvalidOperationException(); 60throw new InvalidOperationException();
IIS.NewShim.FunctionalTests (9)
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)
85throw new InvalidOperationException("Test instance is already attached to this fixture"); 95throw new InvalidOperationException("Different test is attached to this fixture");
src\Shared\Http2cat\Http2Utilities.cs (1)
152throw new InvalidOperationException();
src\Shared\ServerInfrastructure\BufferExtensions.cs (1)
61throw new InvalidOperationException("Buffer backed by array was expected");
src\Shared\ServerInfrastructure\StringUtilities.cs (2)
46throw new InvalidOperationException(); 60throw new InvalidOperationException();
IIS.ShadowCopy.Tests (8)
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)
85throw new InvalidOperationException("Test instance is already attached to this fixture"); 95throw 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 (2)
46throw new InvalidOperationException(); 60throw new InvalidOperationException();
IIS.Tests (1)
Utilities\TestServer.cs (1)
112throw new InvalidOperationException($"Error while running WebCoreActivate: {startResult} on port {_currentPort}");
IISExpress.FunctionalTests (11)
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)
85throw new InvalidOperationException("Test instance is already attached to this fixture"); 95throw new InvalidOperationException("Different test is attached to this fixture");
src\Servers\IIS\IIS\test\Common.FunctionalTests\WebSocketTests.cs (2)
143throw new InvalidOperationException("The response status code was incorrect: " + statusLine); 163throw new InvalidOperationException("The response status code was incorrect: " + statusLine);
src\Shared\Http2cat\Http2Utilities.cs (1)
152throw new InvalidOperationException();
src\Shared\ServerInfrastructure\BufferExtensions.cs (1)
61throw new InvalidOperationException("Buffer backed by array was expected");
src\Shared\ServerInfrastructure\StringUtilities.cs (2)
46throw new InvalidOperationException(); 60throw new InvalidOperationException();
illink (31)
ILLink.RoslynAnalyzer (19)
CompilationExtensions.cs (1)
172_ => throw new InvalidOperationException("Unreachable"),
DataFlow\ControlFlowGraphProxy.cs (4)
44_ => throw new InvalidOperationException() 86_ => throw new InvalidOperationException() 186throw new InvalidOperationException(); 236throw new InvalidOperationException();
DataFlow\LocalDataFlowVisitor.cs (1)
254_ => throw new InvalidOperationException()
IMethodSymbolExtensions.cs (1)
41throw 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)
144throw 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)
56throw 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."); 69throw 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)
17throw new InvalidOperationException($"Parameter of index {(int)index} does not exist on method {method.GetDisplayName()} with {method.GetParametersCount()}"); 38throw new InvalidOperationException("Cannot get metadata index of the implicit 'this' parameter");
TrimAnalysis\DiagnosticContext.cs (1)
60_ => throw new InvalidOperationException()
TrimAnalysis\FlowAnnotations.cs (2)
249throw new InvalidOperationException($"Cannot get 'this' parameter of method {method.GetDisplayName()} with no 'this' parameter."); 256throw new InvalidOperationException($"Cannot get 'this' parameter of method {method.GetDisplayName()} with no 'this' parameter.");
ILLink.Tasks (1)
LinkTask.cs (1)
248throw new InvalidOperationException($"{DotNetHostPathEnvironmentName} is not set");
Infrastructure.Common (10)
CertificateManager.cs (2)
122throw new InvalidOperationException(exceptionString.ToString(), inner); 157throw new InvalidOperationException($"Error while attempting to install cert with thumbprint '{certificate.Thumbprint}' into OSX custom keychain.", inner);
SafeKeychainHandle.cs (4)
58throw new InvalidOperationException($"OSStatus={osStatus}"); 73throw new InvalidOperationException($"OSStatus={osStatus}"); 84throw new InvalidOperationException($"OSStatus={osStatus}"); 102throw new InvalidOperationException($"OSStatus={osStatus}");
ServiceUtilHelper.cs (4)
388throw new InvalidOperationException( 397throw new InvalidOperationException( 406throw new InvalidOperationException( 415throw new InvalidOperationException(
InMemory.FunctionalTests (25)
ConnectionMiddlewareTests.cs (2)
159listenOptions.Use(next => context => throw new InvalidOperationException()); 247throw new InvalidOperationException();
EventSourceTests.cs (1)
173throw new InvalidOperationException();
Http2\Http2ConnectionTests.cs (2)
587throw new InvalidOperationException("Put the stream into an invalid state by throwing after writing to response."); 1740await InitializeConnectionAsync(_ => Task.FromException(new InvalidOperationException("No requests should be processed")));
Http2\Http2EndToEndTests.cs (1)
55throw new InvalidOperationException();
KestrelMetricsTests.cs (3)
449throw new InvalidOperationException("Test"); 709throw new InvalidOperationException(); 878throw new InvalidOperationException();
src\Servers\Kestrel\shared\test\CertificateAuthority.cs (1)
207throw new InvalidOperationException();
src\Servers\Kestrel\shared\test\Http3\Http3InMemory.cs (12)
181throw new InvalidOperationException($"Expected error code {expectedErrorCode}, got {currentError}."); 193throw new InvalidOperationException("Failed to read GO_AWAY stream ID."); 197throw new InvalidOperationException($"Expected stream ID {expectedLastStreamId}, got {streamId}."); 263throw new InvalidOperationException($"Expected {expected} frame. Got {actual}."); 530throw new InvalidOperationException("End not received."); 567throw new InvalidOperationException("No data received."); 637throw new InvalidOperationException("Stream not ended."); 649throw new InvalidOperationException($"Expected error code {protocolError}, got {(Http3ErrorCode)Error}."); 707throw new InvalidOperationException("The headers are too large."); 769throw new InvalidOperationException("End of stream not received."); 979throw new InvalidOperationException("Failed to read GO_AWAY stream ID."); 983throw 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\TestResources.cs (2)
26throw new InvalidOperationException("Cannot acquire the global certificate mutex."); 63throw new InvalidOperationException("Cannot acquire the global certificate mutex.");
InProcessWebSite (3)
src\Servers\IIS\IIS\test\testassets\InProcessWebSite\Program.cs (1)
54throw new InvalidOperationException("Program.Main exception");
src\Servers\IIS\IIS\test\testassets\InProcessWebSite\Startup.WebSockets.cs (1)
105throw new InvalidOperationException("Unexpected error from UpgradeAsync.");
src\Servers\IIS\IIS\test\testassets\InProcessWebSite\ThrowingStartup.cs (1)
14throw new InvalidOperationException("From Configure");
Interop.FunctionalTests (19)
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)
757throw new InvalidOperationException(); 1477throw new InvalidOperationException(); 1769throw 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\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.");
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)
60return Task.FromException(new InvalidOperationException("Server is not running."));
InteropTests.cs (2)
138throw new InvalidOperationException(errorMessage, ex); 170throw new InvalidOperationException(errorMessage, ex);
IOperationGenerator (2)
IOperationClassWriter.cs (2)
653throw new InvalidOperationException($"{node.Name} is not being included in OperationKind, but has no base type!"); 720throw new InvalidOperationException($"Cannot find property for {childName}"));
Keycloak.Web (1)
AuthorizationHandler.cs (1)
11throw new InvalidOperationException("No HttpContext available from the IHttpContextAccessor!");
KeyManagementSimulator (2)
Program.cs (2)
273_ => throw new InvalidOperationException(), 510throw new InvalidOperationException("Flakiness!");
Metrics (47)
src\Compilers\Core\Portable\InternalUtilities\ReaderWriterLockSlimExtensions.cs (2)
93throw new InvalidOperationException(); 101throw new InvalidOperationException();
src\Compilers\Core\Portable\Text\TextChangeRangeExtensions.cs (1)
323throw new InvalidOperationException();
src\Dependencies\Collections\Internal\ThrowHelper.cs (4)
181throw new InvalidOperationException(GetResourceString(resource), e); 199throw new InvalidOperationException(SR.InvalidOperation_EnumFailedVersion); 205throw new InvalidOperationException(SR.InvalidOperation_EnumOpCantHappen); 211throw new InvalidOperationException(SR.InvalidOperation_ConcurrentOperationsNotSupported);
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (1)
102throw new InvalidOperationException($"Unexpected concurrent access to {GetType()}");
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+ValueBuilder.cs (1)
68throw new InvalidOperationException($"Unexpected concurrent access to {GetType()}");
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+ValueBuilder.cs (1)
78throw new InvalidOperationException($"Unexpected concurrent access to {GetType()}");
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Enumerator.cs (2)
24public object? Current => throw new InvalidOperationException(); 33throw new InvalidOperationException();
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Enumerator`1.cs (1)
24public new T Current => throw new InvalidOperationException();
src\Dependencies\Contracts\Contract.cs (1)
161throw new InvalidOperationException($"{message} - file {fileName} line {lineNumber}");
src\Dependencies\Contracts\ExceptionUtilities.cs (2)
27return new InvalidOperationException(output); 31=> new InvalidOperationException($"This program location is thought to be unreachable. File='{path}' Line={line}");
src\RoslynAnalyzers\Utilities\Compiler\Extensions\IOperationExtensions.cs (1)
532throw new InvalidOperationException();
src\RoslynAnalyzers\Utilities\Compiler\Lightup\LightupHelpers.cs (2)
171throw new InvalidOperationException(); 187throw new InvalidOperationException();
src\RoslynAnalyzers\Utilities\Compiler\SmallDictionary.cs (2)
306throw new InvalidOperationException(); 573throw new InvalidOperationException();
src\RoslynAnalyzers\Utilities\Workspaces\DocumentExtensions.cs (3)
22return semanticModel ?? throw new InvalidOperationException("SyntaxTree is required to accomplish the task but is not supported by document"); 31return syntaxTree ?? throw new InvalidOperationException("SyntaxTree is required to accomplish the task but is not supported by document"); 40return root ?? throw new InvalidOperationException("SyntaxTree is required to accomplish the task but is not supported by document");
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EditorConfig\Parsing\EditorConfigFile.cs (2)
62throw new InvalidOperationException("No path was given for this editorconfig file"); 78throw new InvalidOperationException("No path was given for this editorconfig file");
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EditorConfig\Parsing\Sections\Section.cs (1)
142throw new InvalidOperationException("No path given for editorconfig");
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SemanticModelExtensions.cs (7)
37=> semanticModel.AnalyzeDataFlow(statementOrExpression) ?? throw new InvalidOperationException(); 40=> semanticModel.AnalyzeDataFlow(firstStatement, lastStatement) ?? throw new InvalidOperationException(); 43=> semanticModel.AnalyzeControlFlow(statement) ?? throw new InvalidOperationException(); 46=> semanticModel.AnalyzeControlFlow(firstStatement, lastStatement) ?? throw new InvalidOperationException(); 51?? throw new InvalidOperationException(); 57?? throw new InvalidOperationException(); 63?? throw new InvalidOperationException();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (1)
24=> node.Parent ?? throw new InvalidOperationException("Node's parent was null");
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTokenExtensions.cs (2)
22=> GetAncestor(token, predicate) ?? throw new InvalidOperationException("Could not find a valid ancestor"); 154=> token.Parent ?? throw new InvalidOperationException("Token's parent was null");
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser.cs (1)
89trimmedDictionary[key.Trim()] = allRawConventions.TryGetValue(key, out var value) ? value : throw new InvalidOperationException();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\NamingStyle.cs (2)
83throw new InvalidOperationException(); 170default: throw new InvalidOperationException();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (1)
482throw new InvalidOperationException();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Serialization\ObjectWriter.cs (1)
286throw new InvalidOperationException($"Unsupported object type: {value.GetType()}");
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\BKTree.Builder.cs (1)
201throw new InvalidOperationException();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\RoslynParallel.NetFramework.cs (2)
596Enumerator = source.GetEnumerator() ?? throw new InvalidOperationException(); 622Enumerator = source.GetAsyncEnumerator(Cancellation.Token) ?? throw new InvalidOperationException();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\StringEscapeEncoder.cs (1)
138throw new InvalidOperationException();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\TaskExtensions.cs (1)
36throw new InvalidOperationException($"{nameof(WaitAndGetResult)} cannot be called from a thread pool thread.");
Metrics.Legacy (47)
src\Compilers\Core\Portable\InternalUtilities\ReaderWriterLockSlimExtensions.cs (2)
93throw new InvalidOperationException(); 101throw new InvalidOperationException();
src\Compilers\Core\Portable\Text\TextChangeRangeExtensions.cs (1)
323throw new InvalidOperationException();
src\Dependencies\Collections\Internal\ThrowHelper.cs (4)
181throw new InvalidOperationException(GetResourceString(resource), e); 199throw new InvalidOperationException(SR.InvalidOperation_EnumFailedVersion); 205throw new InvalidOperationException(SR.InvalidOperation_EnumOpCantHappen); 211throw new InvalidOperationException(SR.InvalidOperation_ConcurrentOperationsNotSupported);
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (1)
102throw new InvalidOperationException($"Unexpected concurrent access to {GetType()}");
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+ValueBuilder.cs (1)
68throw new InvalidOperationException($"Unexpected concurrent access to {GetType()}");
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+ValueBuilder.cs (1)
78throw new InvalidOperationException($"Unexpected concurrent access to {GetType()}");
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Enumerator.cs (2)
24public object? Current => throw new InvalidOperationException(); 33throw new InvalidOperationException();
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Enumerator`1.cs (1)
24public new T Current => throw new InvalidOperationException();
src\Dependencies\Contracts\Contract.cs (1)
161throw new InvalidOperationException($"{message} - file {fileName} line {lineNumber}");
src\Dependencies\Contracts\ExceptionUtilities.cs (2)
27return new InvalidOperationException(output); 31=> new InvalidOperationException($"This program location is thought to be unreachable. File='{path}' Line={line}");
src\RoslynAnalyzers\Utilities\Compiler\Extensions\IOperationExtensions.cs (1)
532throw new InvalidOperationException();
src\RoslynAnalyzers\Utilities\Compiler\Lightup\LightupHelpers.cs (2)
171throw new InvalidOperationException(); 187throw new InvalidOperationException();
src\RoslynAnalyzers\Utilities\Compiler\SmallDictionary.cs (2)
306throw new InvalidOperationException(); 573throw new InvalidOperationException();
src\RoslynAnalyzers\Utilities\Workspaces\DocumentExtensions.cs (3)
22return semanticModel ?? throw new InvalidOperationException("SyntaxTree is required to accomplish the task but is not supported by document"); 31return syntaxTree ?? throw new InvalidOperationException("SyntaxTree is required to accomplish the task but is not supported by document"); 40return root ?? throw new InvalidOperationException("SyntaxTree is required to accomplish the task but is not supported by document");
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EditorConfig\Parsing\EditorConfigFile.cs (2)
62throw new InvalidOperationException("No path was given for this editorconfig file"); 78throw new InvalidOperationException("No path was given for this editorconfig file");
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EditorConfig\Parsing\Sections\Section.cs (1)
142throw new InvalidOperationException("No path given for editorconfig");
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SemanticModelExtensions.cs (7)
37=> semanticModel.AnalyzeDataFlow(statementOrExpression) ?? throw new InvalidOperationException(); 40=> semanticModel.AnalyzeDataFlow(firstStatement, lastStatement) ?? throw new InvalidOperationException(); 43=> semanticModel.AnalyzeControlFlow(statement) ?? throw new InvalidOperationException(); 46=> semanticModel.AnalyzeControlFlow(firstStatement, lastStatement) ?? throw new InvalidOperationException(); 51?? throw new InvalidOperationException(); 57?? throw new InvalidOperationException(); 63?? throw new InvalidOperationException();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (1)
24=> node.Parent ?? throw new InvalidOperationException("Node's parent was null");
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTokenExtensions.cs (2)
22=> GetAncestor(token, predicate) ?? throw new InvalidOperationException("Could not find a valid ancestor"); 154=> token.Parent ?? throw new InvalidOperationException("Token's parent was null");
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser.cs (1)
89trimmedDictionary[key.Trim()] = allRawConventions.TryGetValue(key, out var value) ? value : throw new InvalidOperationException();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\NamingStyle.cs (2)
83throw new InvalidOperationException(); 170default: throw new InvalidOperationException();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (1)
482throw new InvalidOperationException();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Serialization\ObjectWriter.cs (1)
286throw new InvalidOperationException($"Unsupported object type: {value.GetType()}");
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\BKTree.Builder.cs (1)
201throw new InvalidOperationException();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\RoslynParallel.NetFramework.cs (2)
596Enumerator = source.GetEnumerator() ?? throw new InvalidOperationException(); 622Enumerator = source.GetAsyncEnumerator(Cancellation.Token) ?? throw new InvalidOperationException();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\StringEscapeEncoder.cs (1)
138throw new InvalidOperationException();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\TaskExtensions.cs (1)
36throw new InvalidOperationException($"{nameof(WaitAndGetResult)} cannot be called from a thread pool thread.");
Microsoft.Analyzers.Local (4)
ApiLifecycle\Json\JsonValue.cs (4)
305throw new InvalidOperationException("This value does not represent a JsonObject."); 317throw new InvalidOperationException("This value does not represent a JsonObject."); 339throw new InvalidOperationException("This value does not represent a JsonArray."); 351throw new InvalidOperationException("This value does not represent a JsonArray.");
Microsoft.Analyzers.Local.Tests (3)
Json\JsonValueTest.cs (1)
326Assert.False(JsonValue.Null.Equals(new InvalidOperationException()));
src\Shared\Throw\Throw.cs (2)
398=> throw new InvalidOperationException(message); 410=> throw new InvalidOperationException(message, innerException);
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 (3)
FakeHttpClient.cs (3)
44throw new InvalidOperationException($"Unexpected end of response sequence. Number of predefined responses should be at least equal to number of requests invoked by HttpClient."); 77throw new InvalidOperationException($"Unexpected request URI: {request.RequestUri}."); 80throw new InvalidOperationException($"Unexpected end of response sequence for uri '{request.RequestUri}'. " +
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)
154_ => 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)
21=> 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.AsyncState (2)
src\Shared\Throw\Throw.cs (2)
398=> throw new InvalidOperationException(message); 410=> throw new InvalidOperationException(message, innerException);
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)
71throw 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)."); 116throw 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)."); 139throw 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)."); 163throw new InvalidOperationException("SignInAsync when principal.Identity == null is not allowed when AuthenticationOptions.RequireAuthenticatedSignIn is true."); 167throw new InvalidOperationException("SignInAsync when principal.Identity.IsAuthenticated is false is not allowed when AuthenticationOptions.RequireAuthenticatedSignIn is true."); 177throw 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)."); 205throw 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)."); 226return new InvalidOperationException( 230return new InvalidOperationException( 250return new InvalidOperationException( 254return new InvalidOperationException( 267return new InvalidOperationException(mismatchError 271return new InvalidOperationException(mismatchError + $"The registered sign-in schemes are: {schemes}."); 290return new InvalidOperationException($"No sign-out authentication handlers are registered." + footer); 293return new InvalidOperationException( 306return new InvalidOperationException(mismatchError 310return 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."); 296throw new InvalidOperationException("AuthenticateAsync must not be called before the UseAuthentication middleware runs."); 316throw 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 (12)
Events\PushedAuthorizationContext.cs (3)
47throw new InvalidOperationException("Only one of HandlePush, SkipPush, and HandledClientAuthentication may be called in the OnPushAuthorization event."); 77throw new InvalidOperationException("Only one of HandlePush, SkipPush, and HandledClientAuthentication may be called in the OnPushAuthorization event."); 101throw new InvalidOperationException("Only one of HandlePush, SkipPush, and HandledClientAuthentication may be called in the OnPushAuthorization event.");
OpenIdConnectHandler.cs (7)
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( 504throw new InvalidOperationException("Pushed authorization is required by the OpenId Connect provider, but disabled by the OpenIdConnectOptions.PushedAuthorizationBehavior."); 513throw new InvalidOperationException("Pushed authorization is required by the OpenIdConnectOptions.PushedAuthorizationBehavior, but no pushed authorization endpoint is available."); 610throw new InvalidOperationException("Invalid response from pushed authorization: content type is not application/json.");
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 (8)
AuthenticationMetricsTest.cs (5)
104authenticationHandler.Setup(h => h.AuthenticateAsync()).Throws(new InvalidOperationException("An error occurred during authentication")); 156authenticationHandler.Setup(h => h.ChallengeAsync(It.IsAny<AuthenticationProperties>())).Throws(new InvalidOperationException("An error occurred during challenge")); 207authenticationHandler.Setup(h => h.ForbidAsync(It.IsAny<AuthenticationProperties>())).Throws(new InvalidOperationException("An error occurred during forbid")); 258authenticationHandler.Setup(h => h.SignInAsync(It.IsAny<ClaimsPrincipal>(), It.IsAny<AuthenticationProperties>())).Throws(new InvalidOperationException("An error occurred during sign in")); 309authenticationHandler.Setup(h => h.SignOutAsync(It.IsAny<AuthenticationProperties>())).Throws(new InvalidOperationException("An error occurred during sign out"));
OAuthTests.cs (1)
306opt.Events.OnRemoteFailure = context => throw new InvalidOperationException("This event should not be called.");
OpenIdConnect\TestSettings.cs (1)
211throw 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)
109return await _policyProvider.GetPolicyAsync(policyName).ConfigureAwait(false) ?? throw 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.Authorization.Test (1)
AuthorizationMetricsTest.cs (1)
201throw new InvalidOperationException("An error occurred in the authorization handler");
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 (110)
BindConverter.cs (2)
1839throw new InvalidOperationException( 2046throw new InvalidOperationException(
CascadingParameterState.cs (1)
67throw 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)
89throw new InvalidOperationException($"Cannot notify about changes because the {GetType()} is configured as fixed.");
ComponentBase.cs (1)
236throw 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)}.");
NavigationManager.cs (3)
230throw new InvalidOperationException($"'{GetType().Name}' already initialized."); 502=> throw new InvalidOperationException($"To support navigation locks, {GetType().Name} must override {nameof(HandleLocationChangingHandlerException)}"); 553throw 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 (4)
34throw new InvalidOperationException("PersistentComponentState already initialized."); 61throw new InvalidOperationException("Registering a callback while persisting state is not allowed."); 84throw new InvalidOperationException("Persisting state is only allowed during an OnPersisting callback."); 102throw new InvalidOperationException("Persisting state is only allowed during an OnPersisting callback.");
PersistentState\ComponentStatePersistenceManager.cs (3)
74throw new InvalidOperationException("State already persisted."); 140throw new InvalidOperationException("Render mode already set."); 173throw new InvalidOperationException(
PersistentState\PersistentServicesRegistry.cs (2)
188throw new InvalidOperationException( 194throw new InvalidOperationException(
PersistentStateValueProvider.cs (1)
85throw new InvalidOperationException($"Property {propertyName} not found on type {type.FullName}");
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\PropertyGetter.cs (1)
25throw new InvalidOperationException("Cannot provide a value for property " +
Reflection\PropertySetter.cs (1)
25throw new InvalidOperationException("Cannot provide a value for property " +
RenderHandle.cs (5)
55?? throw new InvalidOperationException("No renderer has been initialized."); 60public RendererInfo RendererInfo => _renderer?.RendererInfo ?? throw new InvalidOperationException("No renderer has been initialized."); 72throw new InvalidOperationException("No renderer has been initialized."); 86return _renderer?.Assets ?? throw new InvalidOperationException("No renderer has been initialized."); 119throw 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)
776throw new InvalidOperationException("The specified component is not a root component"); 802throw 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.");
ResourceAssetCollection.cs (1)
40throw new InvalidOperationException($"The static asset '{property.Value}' is already mapped to {value.Url}.");
RouteView.cs (1)
60throw 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 (5)
133throw new InvalidOperationException($"The {nameof(Router)} component requires a value for the parameter {nameof(AppAssembly)}."); 141throw new InvalidOperationException($"The {nameof(Router)} component requires a value for the parameter {nameof(Found)}."); 148throw new InvalidOperationException($"The type {NotFoundPage.FullName} " + 155throw new InvalidOperationException($"The type {NotFoundPage.FullName} " + 262throw new InvalidOperationException($"The type {context.Handler.FullName} " +
Routing\RouteTableFactory.cs (3)
190throw new InvalidOperationException($"Unable to find the provided template '{template}'"); 214throw new InvalidOperationException($""" 296_ => 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 (78)
Builder\RazorComponentDataSourceOptions.cs (1)
28_ => throw new InvalidOperationException($"Unknown render mode: {obj}"),
Builder\RazorComponentEndpointDataSource.cs (1)
157throw new InvalidOperationException($"Unable to find a provider for the render mode: {renderMode.GetType().FullName}. This generally " +
Builder\RazorComponentsEndpointRouteBuilderExtensions.cs (1)
62throw new InvalidOperationException(Resources.FormatUnableToFindServices(
DependencyInjection\HttpNavigationManager.cs (1)
43throw new InvalidOperationException($"'{GetType().Name}' method for endpoint-based navigation has not been initialized.");
DependencyInjection\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\UnsupportedJavaScriptRuntime.cs (8)
15=> throw new InvalidOperationException(Message); 18=> throw new InvalidOperationException(Message); 21=> throw new InvalidOperationException(Message); 24=> throw new InvalidOperationException(Message); 27=> throw new InvalidOperationException(Message); 30=> throw new InvalidOperationException(Message); 33=> throw new InvalidOperationException(Message); 36=> 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 (2)
27throw new InvalidOperationException($"Could not resolve metadata for type '{type.FullName}'."); 121throw new InvalidOperationException($"Type '{model.Type}' does not have a constructor. " +
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)
59var 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)
75throw new InvalidOperationException("The HttpContext cannot change value once assigned.");
Rendering\EndpointHtmlRenderer.EventDispatch.cs (5)
50throw new InvalidOperationException(CreateMessageForAmbiguousNamedSubmitEvent(handlerName, locationsForName)); 118throw new InvalidOperationException("The NotFoundPage route must be specified or re-execution middleware has to be set to render NotFoundPage when the response has started."); 193throw new InvalidOperationException($"A single named submit event is tracked more than once at the same location."); 221throw new InvalidOperationException($"The named value frame for component '{componentId}' at index '{frameIndex}' unexpectedly matches a frame of type '{frame.FrameType}'."); 227throw new InvalidOperationException($"Expected a named value with name '{eventType}' but found the name '{frame.NamedEventType}'.");
Rendering\EndpointHtmlRenderer.Prerendering.cs (3)
248throw new InvalidOperationException( 306throw new InvalidOperationException( 334throw 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)
57throw new InvalidOperationException($"{nameof(SendStreamingUpdatesAsync)} can only be called once."); 62throw new InvalidOperationException("Cannot begin streaming rendering because no framing header was set.");
Rendering\SSRRenderModeBoundary.cs (3)
91throw new InvalidOperationException($"A component of type '{componentType}' has render mode '{specifiedMode.GetType().Name}', " + 146throw 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."); 155throw 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\Components\Shared\src\ResourceCollectionProvider.cs (1)
24throw new InvalidOperationException("The resource collection URL has already been set.");
src\Shared\Components\PrerenderComponentApplicationStore.cs (1)
59throw new InvalidOperationException("State already persisted.");
src\Shared\Components\ServerComponentSerializer.cs (2)
45rootComponent.Assembly.GetName().Name ?? throw new InvalidOperationException("Cannot prerender components from assemblies with a null name"), 46rootComponent.FullName ?? throw new InvalidOperationException("Cannot prerender component types with a null name"),
Microsoft.AspNetCore.Components.Endpoints.Tests (12)
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)
1374throw new InvalidOperationException($"Unexpected render mode: {renderMode}"); 1406_ => throw new InvalidOperationException($"Unexpected render mode: {renderMode}"), 1460_ => throw new InvalidOperationException($"Unexpected render mode: {declaredRenderMode}"), 1529_ => throw new InvalidOperationException($"Unexpected render mode: {renderMode}"), 1585_ => throw new InvalidOperationException($"Unexpected render mode: {renderMode}"), 1593_ => throw new InvalidOperationException($"Unexpected render mode: {declared}"), 1897throw new InvalidOperationException("Threw an exception synchronously"); 1902throw new InvalidOperationException("Threw an exception asynchronously");
ImportMapTest.cs (1)
356throw new InvalidOperationException("Did not dispose all the ComponentState instances. This could lead to ArrayBuffer not returning buffers to its pool.");
Microsoft.AspNetCore.Components.Forms (8)
DataAnnotationsValidator.cs (2)
23throw new InvalidOperationException($"{nameof(DataAnnotationsValidator)} requires a cascading " + 39throw new InvalidOperationException($"{GetType()} does not support changing the " +
EditContextDataAnnotationsExtensions.cs (1)
187throw new InvalidOperationException("Async validation is not supported");
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)
182throw 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 (36)
Circuits\CircuitClientProxy.cs (2)
42throw new InvalidOperationException($"{nameof(SendCoreAsync)} cannot be invoked with an offline client."); 52throw new InvalidOperationException($"{nameof(InvokeCoreAsync)} cannot be invoked with an offline client.");
Circuits\CircuitHost.cs (6)
122throw new InvalidOperationException("The circuit host is already initialized."); 533throw new InvalidOperationException($"The stream with ID {streamId} is not available. It may have timed out."); 678throw new InvalidOperationException("Circuit is being invoked prior to initialization."); 772throw new InvalidOperationException("UpdateRootComponents is not supported when components have" + 800throw new InvalidOperationException($"The first set of update operations must always be of type {nameof(RootComponentOperationType.Add)}"); 884throw new InvalidOperationException("Persisted state has already been attached to this circuit.");
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\HybridCacheCircuitPersistenceProvider.cs (1)
14static ct => throw new InvalidOperationException();
Circuits\RemoteJSDataStream.cs (1)
94throw new InvalidOperationException($"An error occurred while reading the remote stream: {error}");
Circuits\RemoteJSRuntime.cs (1)
134throw 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 (3)
75throw new InvalidOperationException("JavaScript runtime already initialized."); 116throw new InvalidOperationException($"'{GetType().Name}' method for endpoint-based navigation has not been initialized."); 166throw new InvalidOperationException($"'{GetType().Name}' method for endpoint-based navigation has not been initialized.");
Circuits\RemoteRenderer.cs (2)
289throw new InvalidOperationException($"Received an acknowledgement for batch with id '{incomingBatchId}' when the last batch produced was '{lastBatchId}'."); 353pendingRenderInfo.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 " +
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}."); 129throw new InvalidOperationException("An invalid component marker key was provided."); 172throw new InvalidOperationException("Cannot update components with mismatching types."); 177throw new InvalidOperationException("An invalid component marker key was provided."); 184throw new InvalidOperationException("Cannot update components with mismatching keys.");
src\Shared\Components\PrerenderComponentApplicationStore.cs (1)
59throw new InvalidOperationException("State already persisted.");
src\Shared\Components\ServerComponentSerializer.cs (2)
45rootComponent.Assembly.GetName().Name ?? throw new InvalidOperationException("Cannot prerender components from assemblies with a null name"), 46rootComponent.FullName ?? throw new InvalidOperationException("Cannot prerender component types with a null name"),
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 (9)
Circuits\CircuitActivitySourceTest.cs (1)
76var exception = new InvalidOperationException("Test exception");
Circuits\CircuitHostTest.cs (3)
479var expectedException = new InvalidOperationException("Test exception"); 884throw new InvalidOperationException( 901throw new InvalidOperationException("Created more test component instances than expected.");
Circuits\CircuitPersistenceManagerTest.cs (1)
248.ThrowsAsync(new InvalidOperationException("Failed to persist circuit"));
Circuits\RenderBatchWriterTest.cs (1)
349throw new InvalidOperationException($"Unsupported type: {expectedEntry.GetType().FullName}");
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 (30)
CascadingParameterTest.cs (1)
698() => throw new InvalidOperationException("This should not be used because NotifyChanged is called with a value first"), isFixed: false);
ComponentsActivitySourceTest.cs (2)
118var exception = new InvalidOperationException("Test exception"); 157var exception = new InvalidOperationException("Test exception");
ComponentsMetricsTest.cs (6)
106await componentsMetrics.CaptureEventDuration(Task.FromException(new InvalidOperationException()), 127var exception = new InvalidOperationException(); 192await componentsMetrics.CaptureParametersDuration(Task.FromException(new InvalidOperationException()), 211var exception = new InvalidOperationException(); 273await componentsMetrics.CaptureBatchDuration(Task.FromException(new InvalidOperationException()), 292var exception = new InvalidOperationException();
LayoutViewTest.cs (1)
285throw new InvalidOperationException("Got a null body when not expecting it");
NavigationManagerTest.cs (5)
716throw new InvalidOperationException(exceptionMessage); 741throw new InvalidOperationException(exceptionMessage); 772throw new InvalidOperationException(exceptionMessage); 793throw new InvalidOperationException(exceptionMessage); 820throw new InvalidOperationException(exceptionMessage);
ParameterViewTest.Assignment.cs (1)
666set => throw new InvalidOperationException("This setter throws");
PersistentState\ComponentStatePersistenceManagerTest.cs (2)
262persistenceManager.State.RegisterOnPersisting(() => throw new InvalidOperationException(), new TestRenderMode()); 290persistenceManager.State.RegisterOnPersisting(async () => { await tcs.Task; throw new InvalidOperationException(); }, new TestRenderMode());
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)
40throw new InvalidOperationException($"{nameof(FocusOnNavigate)} requires a non-null value for the parameter '{nameof(RouteData)}'."); 45throw 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)
159throw new InvalidOperationException( 172throw new InvalidOperationException( 193throw 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 (28)
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)
121throw new InvalidOperationException("The host has already started."); 223throw 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.");
HotReload\WebAssemblyHotReload.cs (2)
77throw new InvalidOperationException("Hot Reload agent already initialized"); 131=> s_hotReloadAgent ?? (s_initialized ? throw new InvalidOperationException("Hot Reload agent not initialized") : null);
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\ResourceCollectionProvider.cs (1)
24throw new InvalidOperationException("The resource collection URL has already been set.");
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}."); 129throw new InvalidOperationException("An invalid component marker key was provided."); 172throw new InvalidOperationException("Cannot update components with mismatching types."); 177throw new InvalidOperationException("An invalid component marker key was provided."); 184throw 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 (8)
AuthenticationStateSerializer.cs (1)
32throw new InvalidOperationException($"{nameof(SetAuthenticationState)} must be called before the {nameof(PersistentComponentState)}.{nameof(PersistentComponentState.RegisterOnPersisting)} callback.");
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)
419throw new InvalidOperationException("Unknown OS platform");
WebAssemblyEndpointProvider.cs (1)
22? 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)
50throw 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.Maui (3)
RootComponent.cs (3)
41 throw new InvalidOperationException($"{nameof(RootComponent)} requires a value for its {nameof(Selector)} property, but no value was set."); 46 throw new InvalidOperationException($"{nameof(RootComponent)} requires a value for its {nameof(ComponentType)} property, but no value was set."); 57 throw new InvalidOperationException($"{nameof(RootComponent)} requires a value for its {nameof(Selector)} property, but no value was set.");
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.Components.WebView.WindowsForms (1)
src\BlazorWebView\src\SharedSource\WebView2WebViewManager.cs (1)
106 throw new InvalidOperationException(
Microsoft.AspNetCore.Components.WebView.Wpf (3)
RootComponent.cs (2)
40 throw new InvalidOperationException($"{nameof(RootComponent)} requires a value for its {nameof(Selector)} property, but no value was set."); 45 throw new InvalidOperationException($"{nameof(RootComponent)} requires a value for its {nameof(ComponentType)} property, but no value was set.");
src\BlazorWebView\src\SharedSource\WebView2WebViewManager.cs (1)
113 throw new InvalidOperationException(
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.ConcurrencyLimiter.Tests (2)
src\Shared\AsyncEnumerableExtensions.cs (2)
28throw new InvalidOperationException("Data ended without match."); 32throw new InvalidOperationException($"Results ended with final value of {value}. Expected value of {expectedValue}.", ex);
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 (9)
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)
297throw new InvalidOperationException("Shouldn't be called"); 376throw new InvalidOperationException("Simulated decryption failure"); 435throw new InvalidOperationException("Simulated decryption failure");
KeyManagement\XmlKeyManagerTests.cs (3)
1008void IXmlRepository.StoreElement(XElement element, string friendlyName) => throw new InvalidOperationException(); 1018void IXmlRepository.StoreElement(XElement element, string friendlyName) => throw new InvalidOperationException(); 1019bool IDeletableXmlRepository.DeleteElements(Action<IReadOnlyCollection<IDeletableElement>> chooseElements) => throw new InvalidOperationException();
Microsoft.AspNetCore.DeveloperCertificates.XPlat (10)
src\Shared\CertificateGeneration\CertificateManager.cs (5)
369throw new InvalidOperationException($"The directory '{exportDir}' does not exist. Choose permissions carefully when creating it."); 605throw new InvalidOperationException("Unknown format."); 791throw new InvalidOperationException($"'{nameof(RemoveLocations.Undefined)}' is not a valid location."); 803throw new InvalidOperationException("Invalid location."); 833throw new InvalidOperationException($"Failed to create a key with a size of {minimumKeySize} bits");
src\Shared\CertificateGeneration\MacOSCertificateManager.cs (4)
110throw new InvalidOperationException("There was an error trusting the certificate."); 265throw new InvalidOperationException($@"There was an error removing the certificate with thumbprint '{certificate.Thumbprint}'. 282throw new InvalidOperationException($"Can't determine the subject for the certificate with subject '{certificate.Subject}'."); 366throw 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)
447throw new InvalidOperationException($@"There was an error removing the certificate with thumbprint '{certificate.Thumbprint}'.");
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.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.Middleware (1)
Logging\HttpLoggingRedactionInterceptor.cs (1)
192_ => throw new InvalidOperationException($"Unsupported value '{mode}' for enum type '{nameof(IncomingPathLoggingMode)}'"),
Microsoft.AspNetCore.Diagnostics.Middleware.Tests (16)
Logging\AcceptanceTests.cs (2)
123throw new InvalidOperationException("Test exception"); 997public void Enrich(IEnrichmentTagCollector collector, HttpContext httpContext) => throw new InvalidOperationException();
Logging\HttpUtilityExtensionsTests.cs (2)
41c => throw new InvalidOperationException("Test"), 70c => throw new InvalidOperationException("Test"),
Logging\IncomingHttpRouteUtilityTests.cs (10)
45c => throw new InvalidOperationException("Test"), 83c => throw new InvalidOperationException("Test"), 123c => throw new InvalidOperationException("Test"), 165c => throw new InvalidOperationException("Test"), 207c => throw new InvalidOperationException("Test"), 254c => throw new InvalidOperationException("Test"), 295c => throw new InvalidOperationException("Test"), 343c => throw new InvalidOperationException("Test"), 388c => throw new InvalidOperationException("Test"), 426c => throw new InvalidOperationException("Test"),
src\Shared\EmptyCollections\EmptyReadOnlyList.cs (2)
55public T Current => throw new InvalidOperationException(); 56object IEnumerator.Current => throw new InvalidOperationException();
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."); 758throw new InvalidOperationException("Something bad happened."); 812throw new InvalidOperationException("Something bad happened"); 866throw new InvalidOperationException("Something bad happened"); 918throw new InvalidOperationException("Something bad happened"); 976throw new InvalidOperationException("Something bad happened"); 1074throw new InvalidOperationException("Test exception2"); 1137throw 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 (73)
Internal\Binding\JsonTranscodingProviderServiceBinder.cs (1)
228throw new InvalidOperationException($"Error binding {method.Name} on {typeof(TService).Name} to HTTP API.", ex);
Internal\Binding\JsonTranscodingServiceMethodProvider.cs (1)
85throw 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 (2)
100throw new InvalidOperationException($"Could not construct Interceptor instance for type {interceptorRegistration.Type.FullName}"); 159throw new InvalidOperationException($"Could not construct Interceptor instance for type {interceptorRegistration.Type.FullName}");
src\Grpc\JsonTranscoding\src\Shared\Server\MethodOptions.cs (1)
100throw 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)
46throw new InvalidOperationException("Couldn't find Descriptor property on message type: " + typeToConvert); 52throw 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)
990throw new InvalidOperationException("exception"); 1040throw new InvalidOperationException("Error!"); 1068throw new InvalidOperationException("Error!"); 1462throw 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.HeaderParsing (2)
src\Shared\Throw\Throw.cs (2)
398=> throw new InvalidOperationException(message); 410=> throw new InvalidOperationException(message, innerException);
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)
97throw new InvalidOperationException("Timeout while waiting for host process to output started message.", ex); 110throw 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 (17)
HostingMetricsTests.cs (1)
51hostingApplication.DisposeContext(context2, new InvalidOperationException("Test error"));
src\Shared\AsyncEnumerableExtensions.cs (2)
28throw new InvalidOperationException("Data ended without match."); 32throw new InvalidOperationException($"Results ended with final value of {value}. Expected value of {expectedValue}.", ex);
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 (10)
75throw new InvalidOperationException(Resources.FormatException_UseMiddleMutlipleInvokes(InvokeMethodName, InvokeAsyncMethodName)); 84throw new InvalidOperationException(Resources.FormatException_UseMiddlewareNoInvokeMethod(InvokeMethodName, InvokeAsyncMethodName, middleware)); 89throw new InvalidOperationException(Resources.FormatException_UseMiddlewareNonTaskReturnType(InvokeMethodName, InvokeAsyncMethodName, nameof(Task))); 95throw new InvalidOperationException(Resources.FormatException_UseMiddlewareNoParameters(InvokeMethodName, InvokeAsyncMethodName, nameof(HttpContext))); 148throw new InvalidOperationException(Resources.FormatException_UseMiddlewareIServiceProviderNotAvailable(nameof(IServiceProvider))); 176throw new InvalidOperationException(Resources.FormatException_UseMiddlewareNoMiddlewareFactory(typeof(IMiddlewareFactory))); 183throw new InvalidOperationException(Resources.FormatException_UseMiddlewareUnableToCreateMiddleware(middlewareFactory.GetType(), _middlewareType)); 330var service = sp.GetService(type) ?? throw new InvalidOperationException(Resources.FormatException_InvokeMiddlewareNoService(type, middleware)); 339var service = ksp.GetKeyedService(type, key) ?? throw new InvalidOperationException(Resources.FormatException_InvokeMiddlewareNoService(type, middleware)); 344throw new InvalidOperationException(Resources.Exception_KeyedServicesNotSupported);
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)
912throw new InvalidOperationException(message);
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.Abstractions.Tests (1)
UseMiddlewareTest.cs (1)
364throw new InvalidOperationException($"No service for type '{serviceType}' has been registered.");
Microsoft.AspNetCore.Http.Connections (4)
Internal\HttpConnectionsMetrics.cs (2)
87_ => throw new InvalidOperationException("Unexpected value: " + transportType) 98_ => 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 (13)
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."); 494throw new InvalidOperationException(negotiateResponse.Error); 617throw 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 (5)
212throw new InvalidOperationException("Negotiate Authentication doesn't work with HTTP/2 or higher."); 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()); 3831throw 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 (59)
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)
674throw new InvalidOperationException(errorMessage); 681throw new InvalidOperationException(errorMessage); 686throw new InvalidOperationException(errorMessage); 699throw new InvalidOperationException($"Encountered a parameter of type '{parameter.ParameterType}' without a name. Parameters must have a name."); 726throw new InvalidOperationException($"'{routeName}' is not a route parameter."); 811throw new InvalidOperationException($"Unable to resolve service referenced by {nameof(FromKeyedServicesAttribute)}. The service provider doesn't support keyed services."); 1568throw new InvalidOperationException($"The nullable type '{TypeNameHelper.GetTypeDisplayName(parameter.ParameterType, fullName: false)}' is not supported, mark the parameter as non-nullable."); 1688throw 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}."); 2808throw new InvalidOperationException("The IResult in Task<IResult> response must not be null."); 2816throw new InvalidOperationException("The Task returned by the Delegate must not be null."); 2824throw 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 (2)
27throw new InvalidOperationException($"Could not resolve metadata for type '{type.FullName}'."); 121throw new InvalidOperationException($"Type '{model.Type}' does not have a constructor. " +
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)
186throw new InvalidOperationException($"Cannot call {nameof(GetDefaultValueForParameter)}, because no parameter default values were supplied.");
src\Shared\ParameterBindingMethodCache.cs (7)
200throw new InvalidOperationException(stringBuilder.ToString()); 296throw new InvalidOperationException(stringBuilder.ToString()); 346throw new InvalidOperationException( 363throw new InvalidOperationException($"The abstract type '{TypeNameHelper.GetTypeDisplayName(type, fullName: false)}' is not supported."); 403throw new InvalidOperationException($"Only a single public parameterized constructor is allowed for type '{TypeNameHelper.GetTypeDisplayName(type, fullName: false)}'."); 406throw new InvalidOperationException($"No public parameterless constructor found for type '{TypeNameHelper.GetTypeDisplayName(type, fullName: false)}'."); 466throw 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 (3)
src\Http\Http.Extensions\test\RequestDelegateGenerator\SharedTypes.cs (1)
468throw new InvalidOperationException("BindAsync failed");
src\Shared\BenchmarkRunner\AspNetCoreBenchmarkAttribute.cs (1)
53throw new InvalidOperationException(message);
ValidatableTypesBenchmark.cs (1)
106throw new InvalidOperationException("Failed to register one or more type infos with mock resolver");
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)
1724_ => 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 (9)
IdentityBuilderExtensions.cs (1)
78throw new InvalidOperationException(Resources.FormatInvalidManagerType(customType.Name, "SignInManager", builder.UserType.Name));
Passkeys\CredentialPublicKey.cs (5)
37throw new InvalidOperationException($"Unsupported key type '{_type}'."); 73_ => throw new InvalidOperationException($"Missing or unknown kty {_type}"), 166throw new InvalidOperationException($"Cannot get RSA signature padding for key type {_type}."); 183_ => throw new InvalidOperationException($"Missing or unknown alg {_alg}"), 207_ => throw new InvalidOperationException("Invalid COSE algorithm value."),
SecurityStampValidator.cs (1)
194throw new InvalidOperationException("RequestServices is null.");
SignInManager.cs (2)
132throw new InvalidOperationException("HttpContext must not be null."); 534throw new InvalidOperationException(
Microsoft.AspNetCore.Identity.EntityFrameworkCore (10)
IdentityEntityFrameworkBuilderExtensions.cs (2)
34throw new InvalidOperationException(Resources.NotIdentityUser); 44throw new InvalidOperationException(Resources.NotIdentityRole);
IdentityUserContext.cs (6)
227throw new InvalidOperationException(Resources.CanOnlyProtectStrings); 276throw new InvalidOperationException(Resources.CanOnlyProtectStrings); 338throw new InvalidOperationException(Resources.CanOnlyProtectStrings); 386throw new InvalidOperationException(Resources.CanOnlyProtectStrings); 433throw new InvalidOperationException(Resources.CanOnlyProtectStrings); 481throw new InvalidOperationException(Resources.CanOnlyProtectStrings);
UserOnlyStore.cs (1)
758throw new InvalidOperationException(
UserStore.cs (1)
363throw 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 (17)
IdentityUIScriptsTest.cs (1)
185throw new InvalidOperationException($"Solution root could not be located using application root {applicationPath}.");
Passkeys\CredentialHelpers.cs (2)
33throw new InvalidOperationException($"Expected attested credential data length '{length}', but got '{offset}'."); 76throw new InvalidOperationException($"Expected authenticator data length '{length}', but got '{offset}'.");
Passkeys\CredentialKeyPair.cs (6)
61_ => throw new InvalidOperationException($"Unsupported key type {_keyType}") 69throw new InvalidOperationException("RSA key is not available for signing"); 82throw new InvalidOperationException("ECDSA key is not available for signing"); 107_ => throw new InvalidOperationException($"Unsupported key type {_keyType}") 174_ => throw new InvalidOperationException($"Unsupported algorithm: {alg}") 191_ => throw new InvalidOperationException($"Unsupported RSA algorithm: {alg}")
Passkeys\PasskeyScenarioTest.cs (8)
20throw new InvalidOperationException("The test can only be run once."); 43throw new InvalidOperationException("Cannot get the value because it has not yet been computed."); 53throw new InvalidOperationException("Cannot compute a value multiple times."); 70throw new InvalidOperationException("Cannot transform a value multiple times."); 90var rawValue = GetValue() ?? throw new InvalidOperationException("Cannot get the value as a JSON element because it is null."); 97throw new InvalidOperationException("Cannot get the value as a JSON element because it is not valid JSON.", ex); 111?? throw new InvalidOperationException("Could not transform the JSON value because it was unexpectedly null."); 117throw new InvalidOperationException("Could not transform the value because it was not valid JSON.", ex);
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.JsonPatch.SystemTextJson (7)
Helpers\GenericListOrJsonArrayUtilities.cs (6)
24throw new InvalidOperationException($"Unsupported list type: {list.GetType()}"); 39throw new InvalidOperationException($"Unsupported list type: {list.GetType()}"); 55throw new InvalidOperationException($"Unsupported list type: {list.GetType()}"); 70throw new InvalidOperationException($"Unsupported list type: {list.GetType()}"); 86throw new InvalidOperationException($"Unsupported list type: {list.GetType()}"); 102throw new InvalidOperationException($"Unsupported list type: {list.GetType()}");
JsonPatchDocumentOfT.cs (1)
710throw new InvalidOperationException(Resources.FormatExpressionTypeNotSupported(expr));
Microsoft.AspNetCore.Mvc.Abstractions (11)
ModelBinding\ModelMetadata.cs (1)
687_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)
200throw new InvalidOperationException(stringBuilder.ToString()); 296throw new InvalidOperationException(stringBuilder.ToString()); 346throw new InvalidOperationException( 363throw new InvalidOperationException($"The abstract type '{TypeNameHelper.GetTypeDisplayName(type, fullName: false)}' is not supported."); 403throw new InvalidOperationException($"Only a single public parameterized constructor is allowed for type '{TypeNameHelper.GetTypeDisplayName(type, fullName: false)}'."); 406throw new InvalidOperationException($"No public parameterless constructor found for type '{TypeNameHelper.GetTypeDisplayName(type, fullName: false)}'."); 466throw 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)
217throw 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)
521throw 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)
120throw 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)
307throw new InvalidOperationException(message)
ProducesAttribute.cs (1)
118throw new InvalidOperationException(
ProducesResponseTypeAttribute.cs (1)
119throw 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)
186throw 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)
65throw 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)
60throw new InvalidOperationException("The maximum number of bytes have been read."); 100throw 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)
259throw 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 (17)
ApplicationModels\CompiledPageActionDescriptorBuilder.cs (1)
41throw new InvalidOperationException(message);
ApplicationModels\DefaultPageApplicationModelProvider.cs (2)
69throw new InvalidOperationException(Resources.FormatInvalidPageType_WrongBase( 79throw new InvalidOperationException(Resources.FormatInvalidPageType_NoModelProperty(
Builder\RazorPagesEndpointRouteBuilderExtensions.cs (1)
367throw new InvalidOperationException(Mvc.Core.Resources.FormatUnableToFindServices(
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 (9)
.packages\microsoft.extensions.hostfactoryresolver.sources\10.0.0-preview.7.25351.105\contentFiles\cs\netstandard2.0\HostFactoryResolver.cs (2)
247_hostTcs.TrySetException(new InvalidOperationException("The entry point exited without ever building an IHost.")); 286throw 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 (7)
169throw new InvalidOperationException(Resources.UseKestrelCanBeCalledBeforeInitialization); 293throw new InvalidOperationException(Resources.FormatMissingBuilderMethod( 507throw new InvalidOperationException(Resources.FormatInvalidAssemblyEntryPoint(typeof(TEntryPoint).Name)); 514throw new InvalidOperationException(Resources.FormatMissingDepsFile( 647throw new InvalidOperationException(Resources.ServerNotInitialized); 682throw new InvalidOperationException(Resources.ServerNotInitialized); 700throw new InvalidOperationException(Resources.ServerNotInitialized);
Microsoft.AspNetCore.Mvc.ViewFeatures (54)
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);
PartialViewResult.cs (1)
68throw new InvalidOperationException(Mvc.Core.Resources.FormatUnableToFindServices(
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(
ViewComponentResult.cs (1)
67throw new InvalidOperationException(Mvc.Core.Resources.FormatUnableToFindServices(
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));
ViewResult.cs (1)
67throw new InvalidOperationException(Mvc.Core.Resources.FormatUnableToFindServices(
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}"),
Extensions\JsonNodeSchemaExtensions.cs (1)
507_ => throw new InvalidOperationException($"Unknown schema type: {identifier}"),
Services\OpenApiDocumentService.cs (1)
189throw new InvalidOperationException("Cached operation transformer context not found. Please ensure that the operation contains the `x-aspnetcore-id` extension attribute.");
Services\OpenApiGenerator.cs (1)
373throw new InvalidOperationException($"Encountered a parameter of type '{parameter.ParameterType}' without a name. Parameters must have a name.");
Services\Schemas\OpenApiSchemaService.cs (2)
257throw new InvalidOperationException($"The input schema must be an {nameof(OpenApiSchema)} or {nameof(OpenApiSchemaReference)}."); 266throw new InvalidOperationException($"The input schema must be an {nameof(OpenApiSchema)} or {nameof(OpenApiSchemaReference)}.");
src\Shared\ObjectMethodExecutor\ObjectMethodExecutor.cs (1)
186throw new InvalidOperationException($"Cannot call {nameof(GetDefaultValueForParameter)}, because no parameter default values were supplied.");
src\Shared\ParameterBindingMethodCache.cs (7)
200throw new InvalidOperationException(stringBuilder.ToString()); 296throw new InvalidOperationException(stringBuilder.ToString()); 346throw new InvalidOperationException( 363throw new InvalidOperationException($"The abstract type '{TypeNameHelper.GetTypeDisplayName(type, fullName: false)}' is not supported."); 403throw new InvalidOperationException($"Only a single public parameterized constructor is allowed for type '{TypeNameHelper.GetTypeDisplayName(type, fullName: false)}'."); 406throw new InvalidOperationException($"No public parameterless constructor found for type '{TypeNameHelper.GetTypeDisplayName(type, fullName: false)}'."); 466throw 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\TypeBasedOpenApiOperationTransformer.cs (1)
33=> throw new InvalidOperationException("This method should not be called. Only activated instances of this transformer should be used.");
Transformers\TypeBasedOpenApiSchemaTransformer.cs (1)
33=> throw new InvalidOperationException("This method should not be called. Only activated instances of this transformer should be used.");
Microsoft.AspNetCore.OpenApi.Microbenchmarks (1)
src\Shared\BenchmarkRunner\AspNetCoreBenchmarkAttribute.cs (1)
53throw new InvalidOperationException(message);
Microsoft.AspNetCore.OpenApi.SourceGenerators.Tests (5)
SnapshotTestHelper.cs (5)
71throw new InvalidOperationException($"Failed to compile class library {classLibrary.Key}: {string.Join(Environment.NewLine, emitResult.Diagnostics)}"); 197var service = services.GetService(serviceType) ?? throw new InvalidOperationException("Could not resolve IDocumentProvider service."); 201var targetMethod = serviceType.GetMethod("GenerateAsync", [typeof(string), typeof(TextWriter)]) ?? throw new InvalidOperationException("Could not resolve GenerateAsync method."); 437_hostTcs.TrySetException(new InvalidOperationException("The entry point exited without ever building an IHost.")); 476throw 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.");
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)
77throw new InvalidOperationException("Key already present"); 333throw new InvalidOperationException("Missing feature: " + FeatureInterface.FullName); // TODO: LOC
Microsoft.AspNetCore.Owin.Microbenchmarks (1)
src\Shared\BenchmarkRunner\AspNetCoreBenchmarkAttribute.cs (1)
53throw new InvalidOperationException(message);
Microsoft.AspNetCore.RateLimiting (5)
RateLimiterApplicationBuilderExtensions.cs (1)
51throw new InvalidOperationException(Resources.FormatUnableToFindServices(
RateLimitingMetrics.cs (1)
183_ => 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)
60throw new InvalidOperationException("The maximum number of bytes have been read."); 100throw 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 (48)
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)
145throw 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)
18throw new InvalidOperationException(message); 24throw new InvalidOperationException(message);
Matching\NegotiationMatcherPolicy.cs (1)
363throw new InvalidOperationException("No quality values found.");
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 (3)
123throw new InvalidOperationException($"There are {_routeEntries.Count} endpoints defined! This can only be called for a single endpoint."); 171throw new InvalidOperationException(Resources.RouteEndpointDataSource_RequestDelegateCannotBeCalledBeforeBuild); 374throw new InvalidOperationException(Resources.RouteEndpointDataSource_ConventionsCannotBeModifiedAfterBuild);
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)
60throw new InvalidOperationException("The maximum number of bytes have been read."); 100throw 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 (42)
AuthenticationHandler.cs (1)
43throw new InvalidOperationException("No RequestContext found.");
RequestProcessing\RequestContext.cs (6)
94throw new InvalidOperationException("Upgrade requires HTTP/1.1."); 96throw new InvalidOperationException("This request cannot be upgraded because it has a body."); 100throw new InvalidOperationException("This request cannot be upgraded, the response has already started."); 236throw new InvalidOperationException("Windows HTTP Server API does not support HTTP_FEATURE_ID.HttpFeatureCacheTlsClientHello or HttpQueryRequestProperty. See HTTP_FEATURE_ID for details."); 347throw new InvalidOperationException("This request cannot be delegated, the request body has already started."); 351throw new InvalidOperationException("This request cannot be delegated, the response has already started.");
RequestProcessing\RequestContext.FeatureCollection.cs (2)
459throw new InvalidOperationException("Cannot register new callbacks, the response has already started."); 470throw new InvalidOperationException("Cannot register new callbacks, the response has already completed.");
RequestProcessing\RequestStream.cs (5)
51throw new InvalidOperationException("The maximum request size cannot be changed after the request body has started reading."); 103throw new InvalidOperationException("Synchronous IO APIs are disabled, see AllowSynchronousIO."); 304throw new InvalidOperationException(Resources.Exception_ReadOnlyStream); 309throw new InvalidOperationException(Resources.Exception_ReadOnlyStream); 314throw new InvalidOperationException(Resources.Exception_ReadOnlyStream);
RequestProcessing\Response.cs (1)
236throw 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\HeaderEncoding.cs (1)
25throw new InvalidOperationException();
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)
115throw new InvalidOperationException("The path contains null characters.");
src\Shared\ServerInfrastructure\StringUtilities.cs (2)
46throw new InvalidOperationException(); 60throw new InvalidOperationException();
StandardFeatureCollection.cs (1)
81throw 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 (8)
Listener\Utilities.cs (1)
156throw 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\Http2cat\Http2Utilities.cs (1)
152throw 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 (40)
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)
679throw new InvalidOperationException("Response already started"); 841throw new InvalidOperationException(CoreStrings.FormatParameterReadOnlyAfterResponseStarted(name));
Core\IISHttpContext.FeatureCollection.cs (6)
343throw new InvalidOperationException(CoreStrings.UpgradeWithWrongProtocolVersion); 345throw new InvalidOperationException(CoreStrings.CannotUpgradeNonUpgradableRequest); 350throw new InvalidOperationException(CoreStrings.UpgradeCannotBeCalledMultipleTimes); 354throw new InvalidOperationException(CoreStrings.UpgradeCannotBeCalledMultipleTimes); 446throw new InvalidOperationException(CoreStrings.MaxRequestBodySizeCannotBeModifiedAfterRead); 450throw 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\HeaderEncoding.cs (1)
25throw new InvalidOperationException();
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)
115throw 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 (2)
46throw new InvalidOperationException(); 60throw 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 (112)
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)
223throw new InvalidOperationException("Reading is not allowed after the reader was completed.");
Internal\Http\Http1OutputProducer.cs (1)
790throw 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 (7)
893return new InvalidOperationException( 932ex = new InvalidOperationException( 1315throw new InvalidOperationException(CoreStrings.FormatParameterReadOnlyAfterResponseStarted(value)); 1326var ex = new InvalidOperationException(message); 1389throw new InvalidOperationException(CoreStrings.FormatWritingToResponseBodyNotSupported(StatusCode)); 1479throw new InvalidOperationException("Invalid ordering of calling StartAsync or CompleteAsync and Advance."); 1728throw new InvalidOperationException();
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)
753throw new InvalidOperationException("Writing is not allowed after writer was completed."); 759throw new InvalidOperationException("Cannot write to response after the request has completed.");
Internal\Http3\Http3Connection.cs (1)
885throw 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)
282throw new InvalidOperationException("Writing is not allowed after writer was completed."); 471throw 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)
1254throw new InvalidOperationException(CoreStrings.AcceptCannotBeCalledMultipleTimes); 1259throw new InvalidOperationException(CoreStrings.WebTransportIsDisabled); 1264throw new InvalidOperationException(CoreStrings.FormatFailedToNegotiateCommonWebTransportVersion(WebTransportSession.CurrentSupportedVersion));
Internal\Infrastructure\HttpUtilities.cs (3)
147throw new InvalidOperationException("Newline characters (CR/LF) or Null are not allowed in request headers."); 151throw new InvalidOperationException("Null characters are not allowed in request headers."); 173throw 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\KestrelMetrics.cs (1)
520_ => throw new InvalidOperationException($"Unable to calculate whether {reason} resolves to error.type value.")
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)
320throw new InvalidOperationException(CoreStrings.ConcurrentTimeoutsNotSupported);
Internal\Infrastructure\TransportManager.cs (4)
39throw new InvalidOperationException($"Cannot bind with {nameof(ConnectionDelegate)} no {nameof(IConnectionListenerFactory)} is registered."); 61throw new InvalidOperationException($"No registered {nameof(IConnectionListenerFactory)} supports endpoint {endPoint.GetType().Name}: {endPoint}"); 68throw new InvalidOperationException($"Cannot bind with {nameof(MultiplexedConnectionDelegate)} no {nameof(IMultiplexedConnectionListenerFactory)} is registered."); 87throw new InvalidOperationException($"No registered {nameof(IMultiplexedConnectionListenerFactory)} supports endpoint {endPoint.GetType().Name}: {endPoint}");
Internal\KestrelServerImpl.cs (8)
65throw new InvalidOperationException(CoreStrings.TransportNotFound); 133throw new InvalidOperationException(CoreStrings.ServerAlreadyStarted); 171throw new InvalidOperationException("HTTP/3 requires HTTPS."); 178throw 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."); 194throw new InvalidOperationException($"Cannot start HTTP/1.x or HTTP/2 server if no {nameof(IConnectionListenerFactory)} is registered."); 298throw new InvalidOperationException("Kestrel has already been stopped."); 420throw new InvalidOperationException( 427throw 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)
459throw 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)
485throw new InvalidOperationException(CoreStrings.FormatInvalidServerCertificateEku(certificate.Thumbprint));
src\Servers\Kestrel\shared\Http2HeadersEnumerator.cs (1)
132throw new InvalidOperationException("Unexpected headers collection type.");
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\CertificateGeneration\CertificateManager.cs (5)
369throw new InvalidOperationException($"The directory '{exportDir}' does not exist. Choose permissions carefully when creating it."); 605throw new InvalidOperationException("Unknown format."); 791throw new InvalidOperationException($"'{nameof(RemoveLocations.Undefined)}' is not a valid location."); 803throw new InvalidOperationException("Invalid location."); 833throw new InvalidOperationException($"Failed to create a key with a size of {minimumKeySize} bits");
src\Shared\CertificateGeneration\MacOSCertificateManager.cs (4)
110throw new InvalidOperationException("There was an error trusting the certificate."); 265throw new InvalidOperationException($@"There was an error removing the certificate with thumbprint '{certificate.Thumbprint}'. 282throw new InvalidOperationException($"Can't determine the subject for the certificate with subject '{certificate.Subject}'."); 366throw 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)
447throw new InvalidOperationException($@"There was an error removing the certificate with thumbprint '{certificate.Thumbprint}'.");
src\Shared\ServerInfrastructure\BufferExtensions.cs (1)
61throw new InvalidOperationException("Buffer backed by array was expected");
src\Shared\ServerInfrastructure\StringUtilities.cs (2)
46throw new InvalidOperationException(); 60throw 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 (13)
AddressBinderTests.cs (1)
270throw new InvalidOperationException("EAFNOSUPPORT");
ConnectionDispatcherTests.cs (1)
132throw new InvalidOperationException("Unexpected error listening");
KestrelServerTests.cs (4)
607var unbindException = new InvalidOperationException(); 1017throw new InvalidOperationException(); 1025throw new InvalidOperationException(); 1035throw 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.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 (22)
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)
181throw new InvalidOperationException($"Expected error code {expectedErrorCode}, got {currentError}."); 193throw new InvalidOperationException("Failed to read GO_AWAY stream ID."); 197throw new InvalidOperationException($"Expected stream ID {expectedLastStreamId}, got {streamId}."); 263throw new InvalidOperationException($"Expected {expected} frame. Got {actual}."); 530throw new InvalidOperationException("End not received."); 567throw new InvalidOperationException("No data received."); 637throw new InvalidOperationException("Stream not ended."); 649throw new InvalidOperationException($"Expected error code {protocolError}, got {(Http3ErrorCode)Error}."); 707throw new InvalidOperationException("The headers are too large."); 769throw new InvalidOperationException("End of stream not received."); 979throw new InvalidOperationException("Failed to read GO_AWAY stream ID."); 983throw 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);
Microsoft.AspNetCore.Server.Kestrel.Tests (3)
KestrelConfigurationLoaderTests.cs (1)
1789serverOptions.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 (19)
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 (2)
46throw new InvalidOperationException(); 60throw 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 (2)
Internal\BufferExtensions.cs (1)
19throw new InvalidOperationException("Buffer backed by array was expected");
SocketConnectionListener.cs (1)
38throw new InvalidOperationException(SocketsStrings.TransportAlreadyBound);
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 (21)
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\HeaderEncoding.cs (1)
25throw new InvalidOperationException();
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)
115throw new InvalidOperationException("The path contains null characters.");
src\Shared\ObjectMethodExecutor\ObjectMethodExecutor.cs (1)
186throw 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 (2)
46throw new InvalidOperationException(); 60throw 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 (19)
HubConnection.cs (11)
280throw new InvalidOperationException($"The {nameof(HubConnection)} cannot be started if it is not in the {nameof(HubConnectionState.Disconnected)} state."); 287throw new InvalidOperationException($"The {nameof(HubConnection)} cannot be started while {nameof(StopAsync)} is running."); 868throw new InvalidOperationException($"{reader.GetType()} is not a {typeof(ChannelReader<>).Name}."); 1368throw new InvalidOperationException($"Unexpected message type: {message.GetType().FullName}"); 1555throw new InvalidOperationException( 2020throw new InvalidOperationException($"Assertion failed in {memberName}, at {fileName}:{lineNumber}: {message}"); 2081throw new InvalidOperationException($"'{methodName}' already has a value returning handler. Multiple return values are not supported."); 2189throw new InvalidOperationException($"Invocation ID '{irq.InvocationId}' is already in use."); 2431throw new InvalidOperationException($"There are no callbacks registered for the method '{methodName}'"); 2462throw new InvalidOperationException($"The HubConnection failed to transition from the '{expectedState}' state to the '{newState}' state because it was actually in the '{OverallState}' state."); 2514throw 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)
103_channel.Writer.TryComplete(new InvalidOperationException("Server provided a result in a completion response to a streamed invocation.")); 213_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)
219throw new InvalidOperationException("Sequence ID greater than amount of messages we've received.");
src\SignalR\common\Shared\ReflectionHelper.cs (1)
93throw new InvalidOperationException($"Type '{type}' does not implement IAsyncEnumerator<>");
Microsoft.AspNetCore.SignalR.Client.FunctionalTests (10)
HubConnectionTests.Tracing.cs (6)
134_ => throw new InvalidOperationException("Unexpected path: " + path) 306_ => throw new InvalidOperationException("Unexpected path: " + path) 435_ => throw new InvalidOperationException("Unexpected path: " + path) 532_ => throw new InvalidOperationException("Unexpected path: " + path) 627_ => throw new InvalidOperationException("Unexpected path: " + path) 726_ => throw new InvalidOperationException("Unexpected path: " + path)
Hubs.cs (4)
63throw new InvalidOperationException("Unable to get HttpContext from request."); 70throw new InvalidOperationException("Unable to get headers from context."); 223public static string InvokeException() => throw new InvalidOperationException(); 245throw 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 (22)
DefaultHubLifetimeManager.cs (1)
235throw new InvalidOperationException("Cannot send to an empty group name.");
HubConnectionHandler.cs (1)
116throw 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)
33throw new InvalidOperationException($"Unknown invocation ID '{invocationId}'.");
Internal\HubMethodDescriptor.cs (5)
106throw new InvalidOperationException($"'{p.ParameterType}' is not in DI as a keyed service."); 111throw new InvalidOperationException($"Unable to resolve service referenced by {nameof(FromKeyedServicesAttribute)}. The service provider doesn't support keyed services."); 119throw new InvalidOperationException( 151throw new InvalidOperationException( 302throw new InvalidOperationException($"Method '{methodInfo.DeclaringType}.{methodInfo.Name}' is not supported with native AOT because it has a parameter of type '{parameterType}'. A ValueType streaming parameter is not supported because the native code to support the ValueType will not be available with native AOT.");
Internal\TypedClientBuilder.cs (6)
256throw new InvalidOperationException("Type must be an interface."); 261throw new InvalidOperationException("Type must not contain properties."); 266throw new InvalidOperationException("Type must not contain events."); 287throw new InvalidOperationException( 295throw new InvalidOperationException( 301throw new InvalidOperationException(
SerializedHubMessage.cs (1)
62throw new InvalidOperationException(
SignalRConnectionBuilderExtensions.cs (1)
26throw new InvalidOperationException("Unable to find the required services. Please add all the required services by calling " +
src\Shared\ObjectMethodExecutor\ObjectMethodExecutor.cs (1)
186throw 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)
219throw new InvalidOperationException("Sequence ID greater than amount of messages we've received.");
src\SignalR\common\Shared\ReflectionHelper.cs (1)
93throw new InvalidOperationException($"Type '{type}' does not implement IAsyncEnumerator<>");
Microsoft.AspNetCore.SignalR.Microbenchmarks (11)
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");
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)
126throw new InvalidOperationException("Connection aborted!"); 159throw 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)
135throw new InvalidOperationException("BOOM!"); 145return Task.FromException(new InvalidOperationException("BOOM!")); 594tcs.SetException(new InvalidOperationException("Hub OnConnected failed.")); 604tcs.SetException(new InvalidOperationException("Hub OnDisconnected failed.")); 1244throw new InvalidOperationException("BOOM");
HubConnectionHandlerTestUtils\Utils.cs (1)
52throw new InvalidOperationException($"Unsupported Hub Message type {expected.GetType()}");
Microsoft.AspNetCore.SignalR.Tests.Utils (5)
ChannelExtensions.cs (1)
62throw new InvalidOperationException($"Channel ended after writing {items.Count} items.");
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)
126throw new InvalidOperationException("Connection aborted!"); 159throw 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 (14)
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)
155throw new InvalidOperationException("The original asset was not found.");
StaticAssetDescriptor.cs (7)
27get => _route ?? throw new InvalidOperationException("Route is required"); 28set => _route = !_isFrozen ? value : throw new InvalidOperationException("StaticAssetDescriptor is frozen and doesn't accept further changes"); 37get => _assetFile ?? throw new InvalidOperationException("AssetPath is required"); 38set => _assetFile = !_isFrozen ? value : throw new InvalidOperationException("StaticAssetDescriptor is frozen and doesn't accept further changes"); 48set => _selectors = !_isFrozen ? value : throw new InvalidOperationException("StaticAssetDescriptor is frozen and doesn't accept further changes"); 58set => _endpointProperties = !_isFrozen ? value : throw new InvalidOperationException("StaticAssetDescriptor is frozen and doesn't accept further changes"); 68set => _responseHeaders = !_isFrozen ? value : throw new InvalidOperationException("StaticAssetDescriptor is frozen and doesn't accept further changes");
StaticAssetsEndpointRouteBuilderExtensions.cs (1)
67throw new InvalidOperationException($"The static resources manifest file '{manifestPath}' was not found.");
StaticAssetsInvoker.cs (1)
76throw 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\10.0.0-preview.7.25351.105\contentFiles\cs\netstandard2.0\HostFactoryResolver.cs (2)
247_hostTcs.TrySetException(new InvalidOperationException("The entry point exited without ever building an IHost.")); 286throw 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)
513throw new InvalidOperationException("Test Exception"); 529throw new InvalidOperationException("Test Exception"); 547throw new InvalidOperationException(new string('a', 1024 * 32)); 563throw new InvalidOperationException(new string('a', 1024 * 32)); 579throw new InvalidOperationException(new string('a', 1024 * 32));
HttpContextBuilderTests.cs (2)
273throw new InvalidOperationException("Test Exception"); 291throw 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.Testing (3)
ServiceFakesHostExtensions.cs (1)
41?? throw new InvalidOperationException("No suitable address found to call the server.");
src\Shared\Throw\Throw.cs (2)
398=> throw new InvalidOperationException(message); 410=> throw new InvalidOperationException(message, innerException);
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 (37)
BackEnd\Client\MSBuildClient.cs (2)
583throw new InvalidOperationException($"Unexpected packet type {packet.GetType().Name}"); 598throw new InvalidOperationException($"Unexpected console output type {consoleWrite.OutputType}");
BackEnd\Components\ProjectCache\ProjectCacheService.cs (1)
416throw new InvalidOperationException($"Plugin type '{pluginType}' does not derive from a supported plugin base class.");
BackEnd\Components\Scheduler\Scheduler.cs (1)
1792new InvalidOperationException(
BackEnd\Node\OutOfProcServerNode.cs (2)
112shutdownException = new InvalidOperationException("MSBuild server is already running!"); 363_shutdownException = new InvalidOperationException("Client requested build while server is busy processing previous client build request.");
BuildCheck\Infrastructure\ConfigurationProvider.cs (1)
303throw new InvalidOperationException("Value is null");
Collections\ArrayDictionary.cs (1)
104throw new InvalidOperationException($"ArrayDictionary is at capacity {keys.Length}");
Collections\RetrievableEntryHashSet\RetrievableEntryHashSet.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)
636throw new InvalidOperationException(); 687throw new InvalidOperationException(String.Format(CultureInfo.InvariantCulture, "Client: rejected old host. Received byte {0} instead of {1}.", bytes[0], byteToAccept));
Construction\ProjectElementContainer.cs (2)
899throw new InvalidOperationException(); 1011throw new InvalidOperationException();
ErrorUtilities.cs (1)
251throw new InvalidOperationException(ResourceUtilities.FormatResourceStringStripCodeAndKeyword(resourceName, args));
Evaluation\LazyItemEvaluator.IncludeOperation.cs (1)
144throw 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)
112throw new InvalidOperationException(
InprocTrackingNativeMethods.cs (1)
223throw new InvalidOperationException();
Instance\TaskRegistry.cs (1)
1587throw new InvalidOperationException(AssemblyResources.GetString("TaskFactoryTaskTypeIsNotSet"));
InterningBinaryReader.cs (1)
66throw new InvalidOperationException();
Logging\BinaryLogger\BinaryLogReplayEventSource.cs (2)
69public int FileFormatVersion => _fileFormatVersion ?? throw new InvalidOperationException(ResourceUtilities.GetResourceString("Binlog_Source_VersionUninitialized")); 70public int MinimumReaderVersion => _minimumReaderVersion ?? throw new InvalidOperationException(ResourceUtilities.GetResourceString("Binlog_Source_VersionUninitialized"));
Logging\BinaryLogger\BuildEventArgsReader.cs (2)
122throw new InvalidOperationException( 200throw new InvalidOperationException(
Logging\BinaryLogger\Postprocessing\TransparentReadStream.cs (2)
30throw new InvalidOperationException(ResourceUtilities.GetResourceString("Binlog_StreamUtils_MustBeReadable")); 45throw new InvalidOperationException(ResourceUtilities.GetResourceString("Binlog_StreamUtils_MustBeReadable"));
Logging\TerminalLogger\Terminal.cs (2)
97throw new InvalidOperationException(); 107throw new InvalidOperationException();
ManagedFileSystem.cs (2)
75throw new InvalidOperationException(ex.Message, ex); 80throw new InvalidOperationException(ex.Message, ex);
Microsoft.Build.Engine.OM.UnitTests (1)
ErrorUtilities.cs (1)
251throw new InvalidOperationException(ResourceUtilities.FormatResourceStringStripCodeAndKeyword(resourceName, args));
Microsoft.Build.Engine.UnitTests (7)
BackEnd\BuildRequestEngine_Tests.cs (4)
103BuildResult errorResult = new BuildResult(_entry.Request, new InvalidOperationException("ContinueRequest not received in time.")); 145BuildResult errorResult = new BuildResult(_entry.Request, new InvalidOperationException("ContinueRequest not received in time.")); 185throw new InvalidOperationException("ThrowExceptionOnContinue set."); 204throw new InvalidOperationException("ThrowExceptionOnCancel set.");
ConsoleLogger_Tests.cs (1)
675throw new InvalidOperationException($"Invalid expectedMessageType '{expectedMessageType}'");
Evaluation\ProjectRootElementCache_Tests.cs (2)
73ProjectRootElement projectRootElement2 = ProjectCollection.GlobalProjectCollection.ProjectRootElementCache.Get(rootedPath, (p, c) => { throw new InvalidOperationException(); }, true, false); 90projectRootElement = ProjectCollection.GlobalProjectCollection.ProjectRootElementCache.Get(projectPath, (p, c) => { throw new InvalidOperationException(); }, true, false);
Microsoft.Build.Framework (15)
BinaryTranslator.cs (2)
804throw new InvalidOperationException("Cannot enter recursive intern block."); 1607throw new InvalidOperationException("Cannot enter recursive intern block.");
BuildCheck\BuildCheckRuleTelemetryData.cs (1)
52throw new InvalidOperationException("Cannot merge telemetry data for different rules.");
ImmutableSegmentedList`1+ValueBuilder.cs (1)
76throw new InvalidOperationException($"Unexpected concurrent access to {GetType()}");
InterningReadTranslator.cs (1)
29throw new InvalidOperationException(
InterningWriteTranslator.cs (1)
160throw new InvalidOperationException(
LazyFormattedBuildEventArgs.cs (1)
198throw new InvalidOperationException($"Invalid type for message formatting argument, was {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.CodeAnalysis (11)
src\Compilers\Core\MSBuildTask\Csc.cs (1)
233throw new InvalidOperationException(string.Format(ErrorString.General_IncorrectHostObject, "Csc", "ICscHostObject"));
src\Compilers\Core\MSBuildTask\ManagedToolTask.cs (1)
205throw new InvalidOperationException("Unable to determine the location of the build task assembly.");
src\Compilers\Core\MSBuildTask\Vbc.cs (1)
531throw new InvalidOperationException(string.Format(ErrorString.General_IncorrectHostObject, "Vbc", "IVbcHostObject"));
src\Compilers\Shared\BuildProtocol.cs (1)
356throw new InvalidOperationException("Received invalid response type from server.");
src\Compilers\Shared\BuildServerConnection.cs (3)
695throw new InvalidOperationException("Unable to acquire guard"); 764throw new InvalidOperationException("Lock already held"); 876throw new InvalidOperationException("Lock already held");
src\Compilers\Shared\ConsoleUtil.cs (1)
47throw new InvalidOperationException("Utf8Output is only supported when writing to Console.Out");
src\Dependencies\Contracts\Contract.cs (1)
161throw new InvalidOperationException($"{message} - file {fileName} line {lineNumber}");
src\Dependencies\Contracts\ExceptionUtilities.cs (2)
27return new InvalidOperationException(output); 31=> new InvalidOperationException($"This program location is thought to be unreachable. File='{path}' Line={line}");
Microsoft.Build.Tasks.CodeAnalysis.Sdk (11)
src\Compilers\Core\MSBuildTask\Csc.cs (1)
233throw new InvalidOperationException(string.Format(ErrorString.General_IncorrectHostObject, "Csc", "ICscHostObject"));
src\Compilers\Core\MSBuildTask\ManagedToolTask.cs (1)
205throw new InvalidOperationException("Unable to determine the location of the build task assembly.");
src\Compilers\Core\MSBuildTask\Vbc.cs (1)
531throw new InvalidOperationException(string.Format(ErrorString.General_IncorrectHostObject, "Vbc", "IVbcHostObject"));
src\Compilers\Shared\BuildProtocol.cs (1)
356throw new InvalidOperationException("Received invalid response type from server.");
src\Compilers\Shared\BuildServerConnection.cs (3)
695throw new InvalidOperationException("Unable to acquire guard"); 764throw new InvalidOperationException("Lock already held"); 876throw new InvalidOperationException("Lock already held");
src\Compilers\Shared\ConsoleUtil.cs (1)
47throw new InvalidOperationException("Utf8Output is only supported when writing to Console.Out");
src\Dependencies\Contracts\Contract.cs (1)
161throw new InvalidOperationException($"{message} - file {fileName} line {lineNumber}");
src\Dependencies\Contracts\ExceptionUtilities.cs (2)
27return new InvalidOperationException(output); 31=> new InvalidOperationException($"This program location is thought to be unreachable. File='{path}' Line={line}");
Microsoft.Build.Tasks.CodeAnalysis.UnitTests (3)
IntegrationTests.cs (1)
35throw new InvalidOperationException("Could not locate MSBuild");
TestUtilities\DotNetSdkTestBase.cs (1)
70?? throw new InvalidOperationException($"Couldn't find {nameof(DotNetSdkVersionAttribute)}");
TestUtilities\TestableCompilerServerLogger.cs (1)
13public Action<string> LogFunc { get; set; } = delegate { throw new InvalidOperationException(); };
Microsoft.Build.Tasks.Core (10)
AssemblyDependency\Node\OutOfProcRarNode.cs (1)
54shutdownException = new InvalidOperationException("RAR node is already running.", ex);
BootstrapperUtil\Product.cs (1)
35throw new InvalidOperationException();
CommunicationsUtilities.cs (2)
636throw new InvalidOperationException(); 687throw new InvalidOperationException(String.Format(CultureInfo.InvariantCulture, "Client: rejected old host. Received byte {0} instead of {1}.", bytes[0], byteToAccept));
ErrorUtilities.cs (1)
251throw new InvalidOperationException(ResourceUtilities.FormatResourceStringStripCodeAndKeyword(resourceName, args));
InterningBinaryReader.cs (1)
66throw new InvalidOperationException();
ManifestUtil\Manifest.cs (3)
400throw new InvalidOperationException(String.Format(System.Globalization.CultureInfo.InvariantCulture, "XPath not found: {0}", XPaths.codebasePaths[0])); 409throw new InvalidOperationException(String.Format(System.Globalization.CultureInfo.InvariantCulture, "XPath not found: {0}", XPaths.dependencyPublicKeyTokenAttribute)); 428throw 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 (2)
RunnerUtilities.cs (2)
22?? throw new InvalidOperationException("This test assembly does not have the ArtifactsLocationAttribute"); 25?? throw new InvalidOperationException("This test assembly does not have the BootstrapLocationAttribute");
Microsoft.Build.Utilities.Core (6)
ErrorUtilities.cs (1)
251throw 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)
109throw new InvalidOperationException("We should never hit ProcessorArchitecture.MSIL"); 112throw new InvalidOperationException("Untested or new ProcessorArchitecture type");
TaskLoggingHelper_Tests.cs (2)
249Exception inner = new InvalidOperationException(); 298new 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)
291throw new InvalidOperationException("The Core Assembly can only be set once."); 485throw new InvalidOperationException(string.Format("Could not find core assembly '{0}' in the list of contracts.", coreAssemblySimpleName)); 672throw 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.CodeAnalysis (82)
CodeGen\PrivateImplementationDetails.cs (1)
162throw new InvalidOperationException();
Collections\SmallDictionary.cs (2)
193throw new InvalidOperationException(); 460throw new InvalidOperationException();
Compilation\Compilation.cs (1)
256throw new InvalidOperationException(CodeAnalysisResources.PreviousSubmissionHasErrors);
Compilation\SourceReferenceResolver.cs (1)
55throw new InvalidOperationException(CodeAnalysisResources.ReferenceResolverShouldReturnReadableNonNullStream);
Compilation\XmlReferenceResolver.cs (1)
45throw new InvalidOperationException(CodeAnalysisResources.ReferenceResolverShouldReturnReadableNonNullStream);
ConstantValue.cs (11)
45public virtual string? StringValue { get { throw new InvalidOperationException(); } } 46internal virtual Rope? RopeValue { get { throw new InvalidOperationException(); } } 48public virtual bool BooleanValue { get { throw new InvalidOperationException(); } } 50public virtual sbyte SByteValue { get { throw new InvalidOperationException(); } } 51public virtual byte ByteValue { get { throw new InvalidOperationException(); } } 72public virtual char CharValue { get { throw new InvalidOperationException(); } } 73public virtual decimal DecimalValue { get { throw new InvalidOperationException(); } } 74public virtual DateTime DateTimeValue { get { throw new InvalidOperationException(); } } 76public virtual double DoubleValue { get { throw new InvalidOperationException(); } } 77public virtual float SingleValue { get { throw new InvalidOperationException(); } } 395throw new InvalidOperationException(); //Not using ExceptionUtilities.UnexpectedValue() because this failure path is tested.
DiagnosticAnalyzer\AnalyzerAssemblyLoader.cs (1)
238throw new InvalidOperationException($"Unable to load {assemblyName.Name}: {ex.Message}", ex);
DiagnosticAnalyzer\AnalyzerDriver.cs (1)
1738throw new InvalidOperationException("Unexpected compilation event of type " + compilationEvent.GetType().Name);
DiagnosticAnalyzer\AsyncQueue.cs (3)
62throw new InvalidOperationException($"Cannot call {nameof(Enqueue)} when the queue is already completed."); 81throw new InvalidOperationException($"Cannot enqueue data after PromiseNotToEnqueue."); 153throw new InvalidOperationException($"Cannot call {nameof(Complete)} when the queue is already completed.");
DiagnosticAnalyzer\DiagnosticAnalysisContext.cs (1)
1686public Compilation Compilation => _semanticModel?.Compilation ?? throw new InvalidOperationException();
DiagnosticAnalyzer\DiagnosticQueue.cs (1)
106throw new InvalidOperationException();
DiaSymReader\Writer\SymUnmanagedWriterImpl.cs (1)
45=> _symWriter ?? throw (_disposed ? new ObjectDisposedException(nameof(SymUnmanagedWriterImpl)) : new InvalidOperationException());
InternalUtilities\ReaderWriterLockSlimExtensions.cs (2)
93throw new InvalidOperationException(); 101throw new InvalidOperationException();
Operations\IOperation.OperationList.cs (2)
79throw new InvalidOperationException(); 92throw new InvalidOperationException();
Operations\OperationExtensions.cs (3)
237throw new InvalidOperationException(); 304throw new InvalidOperationException(); 360throw new InvalidOperationException(CodeAnalysisResources.OperationMustNotBeControlFlowGraphPart);
PEWriter\ManagedResource.cs (1)
52throw new InvalidOperationException(CodeAnalysisResources.ResourceStreamProviderShouldReturnNonNullStream);
ResourceDescription.cs (1)
118throw new InvalidOperationException(CodeAnalysisResources.ResourceDataProviderShouldReturnNonNullStream);
SourceGeneration\GeneratorContexts.cs (1)
213throw new InvalidOperationException(string.Format(CodeAnalysisResources.Single_type_per_generator_0, typeName ?? typeof(T).Name));
src\Dependencies\CodeAnalysis.Debugging\CustomDebugInfoReader.cs (13)
76throw new InvalidOperationException("Invalid header."); 92throw new InvalidOperationException("Invalid header."); 110throw new InvalidOperationException("Invalid header."); 364throw new InvalidOperationException(string.Format("Expected at most one Using record for method {0}", FormatMethodToken(methodToken))); 373throw new InvalidOperationException(string.Format("Did not expect both Forward and ForwardToModule records for method {0}", FormatMethodToken(methodToken))); 391throw new InvalidOperationException(string.Format("Expected at most one ForwardToModule record for method {0}", FormatMethodToken(methodToken))); 433throw new InvalidOperationException(string.Format("Group size indicates more imports than there are import strings (method {0}).", FormatMethodToken(methodToken))); 439throw new InvalidOperationException(string.Format("Encountered extern alias info before all import strings were consumed (method {0}).", FormatMethodToken(methodToken))); 459throw new InvalidOperationException(string.Format("Expected only extern alias info strings after consuming the indicated number of imports (method {0}).", FormatMethodToken(methodToken))); 473throw new InvalidOperationException(string.Format("Group size indicates fewer imports than there are import strings (method {0}).", FormatMethodToken(methodToken))); 524throw new InvalidOperationException("Read out of buffer."); 536throw new InvalidOperationException("Read out of buffer."); 548throw new InvalidOperationException("Read out of buffer.");
src\Dependencies\Collections\Extensions\FixedSizeArrayBuilder.cs (1)
59throw new InvalidOperationException($"Unexpected true - file {fileName} line {lineNumber}");
src\Dependencies\Collections\Internal\ThrowHelper.cs (4)
181throw new InvalidOperationException(GetResourceString(resource), e); 199throw new InvalidOperationException(SR.InvalidOperation_EnumFailedVersion); 205throw new InvalidOperationException(SR.InvalidOperation_EnumOpCantHappen); 211throw new InvalidOperationException(SR.InvalidOperation_ConcurrentOperationsNotSupported);
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (1)
102throw new InvalidOperationException($"Unexpected concurrent access to {GetType()}");
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+ValueBuilder.cs (1)
68throw new InvalidOperationException($"Unexpected concurrent access to {GetType()}");
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+ValueBuilder.cs (1)
78throw new InvalidOperationException($"Unexpected concurrent access to {GetType()}");
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Enumerator.cs (2)
24public object? Current => throw new InvalidOperationException(); 33throw new InvalidOperationException();
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Enumerator`1.cs (1)
24public new T Current => throw new InvalidOperationException();
src\Dependencies\Contracts\ExceptionUtilities.cs (2)
27return new InvalidOperationException(output); 31=> new InvalidOperationException($"This program location is thought to be unreachable. File='{path}' Line={line}");
SymbolDisplay\AbstractSymbolDisplayVisitor.cs (1)
82throw new InvalidOperationException();
Symbols\TypedConstant.cs (2)
99throw new InvalidOperationException("TypedConstant is an array. Use Values property."); 117throw new InvalidOperationException("TypedConstant is not an array. Use Value property.");
Syntax\ChildSyntaxList.cs (2)
385throw new InvalidOperationException(); 400throw new InvalidOperationException();
Syntax\SeparatedSyntaxListBuilder.cs (2)
56throw new InvalidOperationException(CodeAnalysisResources.SeparatorIsExpected); 64throw new InvalidOperationException(CodeAnalysisResources.ElementIsExpected);
Syntax\SyntaxTokenList.cs (2)
220throw new InvalidOperationException(); 235throw new InvalidOperationException();
Syntax\SyntaxTokenList.Enumerator.cs (1)
110throw new InvalidOperationException();
Syntax\SyntaxTokenList.Reversed.cs (1)
125throw new InvalidOperationException();
Syntax\SyntaxTriviaList.cs (2)
192throw new InvalidOperationException(); 207throw new InvalidOperationException();
Syntax\SyntaxTriviaList.Enumerator.cs (1)
115throw new InvalidOperationException();
Syntax\SyntaxTriviaList.Reversed.cs (1)
124throw new InvalidOperationException();
Text\ChangedText.cs (4)
41throw new InvalidOperationException("Delta length difference of change ranges didn't match before/after text length."); 47throw new InvalidOperationException("Change preceded current position in oldText"); 50throw new InvalidOperationException("Change start was after the end of oldText"); 53throw new InvalidOperationException("Change end was after the end of oldText");
Text\SubText.cs (1)
188throw new InvalidOperationException();
Text\TextChangeRangeExtensions.cs (1)
323throw new InvalidOperationException();
Microsoft.CodeAnalysis.Analyzers (59)
MetaAnalyzers\Fixers\CompareSymbolsCorrectlyFix.cs (1)
234throw new InvalidOperationException("Invocation contains conditional expression but we could not detect the parts.");
MetaAnalyzers\Fixers\DefineDiagnosticDescriptorArgumentsCorrectlyFix.cs (1)
61_ => throw new InvalidOperationException()
src\Compilers\Core\Portable\InternalUtilities\ReaderWriterLockSlimExtensions.cs (2)
93throw new InvalidOperationException(); 101throw new InvalidOperationException();
src\Compilers\Core\Portable\Text\TextChangeRangeExtensions.cs (1)
323throw new InvalidOperationException();
src\Dependencies\Collections\Internal\ThrowHelper.cs (4)
181throw new InvalidOperationException(GetResourceString(resource), e); 199throw new InvalidOperationException(SR.InvalidOperation_EnumFailedVersion); 205throw new InvalidOperationException(SR.InvalidOperation_EnumOpCantHappen); 211throw new InvalidOperationException(SR.InvalidOperation_ConcurrentOperationsNotSupported);
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (1)
102throw new InvalidOperationException($"Unexpected concurrent access to {GetType()}");
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+ValueBuilder.cs (1)
68throw new InvalidOperationException($"Unexpected concurrent access to {GetType()}");
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+ValueBuilder.cs (1)
78throw new InvalidOperationException($"Unexpected concurrent access to {GetType()}");
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Enumerator.cs (2)
24public object? Current => throw new InvalidOperationException(); 33throw new InvalidOperationException();
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Enumerator`1.cs (1)
24public new T Current => throw new InvalidOperationException();
src\Dependencies\Contracts\Contract.cs (1)
161throw new InvalidOperationException($"{message} - file {fileName} line {lineNumber}");
src\Dependencies\Contracts\ExceptionUtilities.cs (2)
27return new InvalidOperationException(output); 31=> new InvalidOperationException($"This program location is thought to be unreachable. File='{path}' Line={line}");
src\RoslynAnalyzers\Utilities\Compiler\Extensions\IOperationExtensions.cs (1)
532throw new InvalidOperationException();
src\RoslynAnalyzers\Utilities\Compiler\Lightup\LightupHelpers.cs (2)
171throw new InvalidOperationException(); 187throw new InvalidOperationException();
src\RoslynAnalyzers\Utilities\Compiler\SmallDictionary.cs (2)
306throw new InvalidOperationException(); 573throw new InvalidOperationException();
src\RoslynAnalyzers\Utilities\Workspaces\DocumentExtensions.cs (3)
22return semanticModel ?? throw new InvalidOperationException("SyntaxTree is required to accomplish the task but is not supported by document"); 31return syntaxTree ?? throw new InvalidOperationException("SyntaxTree is required to accomplish the task but is not supported by document"); 40return root ?? throw new InvalidOperationException("SyntaxTree is required to accomplish the task but is not supported by document");
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EditorConfig\Parsing\EditorConfigFile.cs (2)
62throw new InvalidOperationException("No path was given for this editorconfig file"); 78throw new InvalidOperationException("No path was given for this editorconfig file");
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EditorConfig\Parsing\Sections\Section.cs (1)
142throw new InvalidOperationException("No path given for editorconfig");
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SemanticModelExtensions.cs (7)
37=> semanticModel.AnalyzeDataFlow(statementOrExpression) ?? throw new InvalidOperationException(); 40=> semanticModel.AnalyzeDataFlow(firstStatement, lastStatement) ?? throw new InvalidOperationException(); 43=> semanticModel.AnalyzeControlFlow(statement) ?? throw new InvalidOperationException(); 46=> semanticModel.AnalyzeControlFlow(firstStatement, lastStatement) ?? throw new InvalidOperationException(); 51?? throw new InvalidOperationException(); 57?? throw new InvalidOperationException(); 63?? throw new InvalidOperationException();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (1)
24=> node.Parent ?? throw new InvalidOperationException("Node's parent was null");
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTokenExtensions.cs (2)
22=> GetAncestor(token, predicate) ?? throw new InvalidOperationException("Could not find a valid ancestor"); 154=> token.Parent ?? throw new InvalidOperationException("Token's parent was null");
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser.cs (1)
89trimmedDictionary[key.Trim()] = allRawConventions.TryGetValue(key, out var value) ? value : throw new InvalidOperationException();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\NamingStyle.cs (2)
83throw new InvalidOperationException(); 170default: throw new InvalidOperationException();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (1)
482throw new InvalidOperationException();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Serialization\ObjectWriter.cs (1)
286throw new InvalidOperationException($"Unsupported object type: {value.GetType()}");
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\BKTree.Builder.cs (1)
201throw new InvalidOperationException();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\RoslynParallel.NetFramework.cs (2)
596Enumerator = source.GetEnumerator() ?? throw new InvalidOperationException(); 622Enumerator = source.GetAsyncEnumerator(Cancellation.Token) ?? throw new InvalidOperationException();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\StringEscapeEncoder.cs (1)
138throw new InvalidOperationException();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\TaskExtensions.cs (1)
36throw new InvalidOperationException($"{nameof(WaitAndGetResult)} cannot be called from a thread pool thread.");
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationConstructedMethodSymbol.cs (1)
85=> throw new System.InvalidOperationException();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationMethodSymbol.cs (1)
110=> throw new InvalidOperationException();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\DocumentExtensions.cs (3)
39return semanticModel ?? throw new InvalidOperationException(string.Format(WorkspaceExtensionsResources.SyntaxTree_is_required_to_accomplish_the_task_but_is_not_supported_by_document_0, document.Name)); 63return syntaxTree ?? throw new InvalidOperationException(string.Format(WorkspaceExtensionsResources.SyntaxTree_is_required_to_accomplish_the_task_but_is_not_supported_by_document_0, document.Name)); 80return root ?? throw new InvalidOperationException(string.Format(WorkspaceExtensionsResources.SyntaxTree_is_required_to_accomplish_the_task_but_is_not_supported_by_document_0, document.Name));
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\ISolutionExtensions.cs (3)
36=> solution.GetDocument(syntaxTree) ?? throw new InvalidOperationException(); 43throw new InvalidOperationException(string.Format(WorkspaceExtensionsResources.Project_of_ID_0_is_required_to_accomplish_the_task_but_is_not_available_from_the_solution, projectId)); 109=> new InvalidOperationException(WorkspaceExtensionsResources.The_solution_does_not_contain_the_specified_document);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\ProjectExtensions.cs (1)
114throw new InvalidOperationException(string.Format(WorkspaceExtensionsResources.Compilation_is_required_to_accomplish_the_task_but_is_not_supported_by_project_0, project.Name));
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\AddImports\AbstractAddImportsService.cs (1)
126throw new InvalidOperationException();
Microsoft.CodeAnalysis.Analyzers.UnitTests (7)
MetaAnalyzers\PreferIsKindAnalyzerTests.cs (7)
43_ => throw new InvalidOperationException(), 82_ => throw new InvalidOperationException(), 180_ => throw new InvalidOperationException(), 221_ => throw new InvalidOperationException(), 261_ => throw new InvalidOperationException(), 312_ => throw new InvalidOperationException(), 361_ => throw new InvalidOperationException(),
Microsoft.CodeAnalysis.AnalyzerUtilities (47)
src\Compilers\Core\Portable\InternalUtilities\ReaderWriterLockSlimExtensions.cs (2)
93throw new InvalidOperationException(); 101throw new InvalidOperationException();
src\Compilers\Core\Portable\Text\TextChangeRangeExtensions.cs (1)
323throw new InvalidOperationException();
src\Dependencies\Collections\Internal\ThrowHelper.cs (4)
181throw new InvalidOperationException(GetResourceString(resource), e); 199throw new InvalidOperationException(SR.InvalidOperation_EnumFailedVersion); 205throw new InvalidOperationException(SR.InvalidOperation_EnumOpCantHappen); 211throw new InvalidOperationException(SR.InvalidOperation_ConcurrentOperationsNotSupported);
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (1)
102throw new InvalidOperationException($"Unexpected concurrent access to {GetType()}");
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+ValueBuilder.cs (1)
68throw new InvalidOperationException($"Unexpected concurrent access to {GetType()}");
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+ValueBuilder.cs (1)
78throw new InvalidOperationException($"Unexpected concurrent access to {GetType()}");
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Enumerator.cs (2)
24public object? Current => throw new InvalidOperationException(); 33throw new InvalidOperationException();
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Enumerator`1.cs (1)
24public new T Current => throw new InvalidOperationException();
src\Dependencies\Contracts\Contract.cs (1)
161throw new InvalidOperationException($"{message} - file {fileName} line {lineNumber}");
src\Dependencies\Contracts\ExceptionUtilities.cs (2)
27return new InvalidOperationException(output); 31=> new InvalidOperationException($"This program location is thought to be unreachable. File='{path}' Line={line}");
src\RoslynAnalyzers\Utilities\Compiler\Extensions\IOperationExtensions.cs (1)
532throw new InvalidOperationException();
src\RoslynAnalyzers\Utilities\Compiler\Lightup\LightupHelpers.cs (2)
171throw new InvalidOperationException(); 187throw new InvalidOperationException();
src\RoslynAnalyzers\Utilities\Compiler\SmallDictionary.cs (2)
306throw new InvalidOperationException(); 573throw new InvalidOperationException();
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\DisposeAnalysis\DisposeAnalysis.DisposeDataFlowOperationVisitor.cs (1)
53throw new InvalidOperationException();
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\AnalysisEntityDataFlowOperationVisitor.cs (1)
170=> throw new InvalidOperationException("Unreachable");
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\DataFlowOperationVisitor.cs (1)
1076throw new InvalidOperationException();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EditorConfig\Parsing\EditorConfigFile.cs (2)
62throw new InvalidOperationException("No path was given for this editorconfig file"); 78throw new InvalidOperationException("No path was given for this editorconfig file");
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EditorConfig\Parsing\Sections\Section.cs (1)
142throw new InvalidOperationException("No path given for editorconfig");
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SemanticModelExtensions.cs (7)
37=> semanticModel.AnalyzeDataFlow(statementOrExpression) ?? throw new InvalidOperationException(); 40=> semanticModel.AnalyzeDataFlow(firstStatement, lastStatement) ?? throw new InvalidOperationException(); 43=> semanticModel.AnalyzeControlFlow(statement) ?? throw new InvalidOperationException(); 46=> semanticModel.AnalyzeControlFlow(firstStatement, lastStatement) ?? throw new InvalidOperationException(); 51?? throw new InvalidOperationException(); 57?? throw new InvalidOperationException(); 63?? throw new InvalidOperationException();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (1)
24=> node.Parent ?? throw new InvalidOperationException("Node's parent was null");
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTokenExtensions.cs (2)
22=> GetAncestor(token, predicate) ?? throw new InvalidOperationException("Could not find a valid ancestor"); 154=> token.Parent ?? throw new InvalidOperationException("Token's parent was null");
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser.cs (1)
89trimmedDictionary[key.Trim()] = allRawConventions.TryGetValue(key, out var value) ? value : throw new InvalidOperationException();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\NamingStyle.cs (2)
83throw new InvalidOperationException(); 170default: throw new InvalidOperationException();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (1)
482throw new InvalidOperationException();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Serialization\ObjectWriter.cs (1)
286throw new InvalidOperationException($"Unsupported object type: {value.GetType()}");
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\BKTree.Builder.cs (1)
201throw new InvalidOperationException();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\RoslynParallel.NetFramework.cs (2)
596Enumerator = source.GetEnumerator() ?? throw new InvalidOperationException(); 622Enumerator = source.GetAsyncEnumerator(Cancellation.Token) ?? throw new InvalidOperationException();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\StringEscapeEncoder.cs (1)
138throw new InvalidOperationException();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\TaskExtensions.cs (1)
36throw new InvalidOperationException($"{nameof(WaitAndGetResult)} cannot be called from a thread pool thread.");
Microsoft.CodeAnalysis.BannedApiAnalyzers (54)
src\Compilers\Core\Portable\InternalUtilities\ReaderWriterLockSlimExtensions.cs (2)
93throw new InvalidOperationException(); 101throw new InvalidOperationException();
src\Compilers\Core\Portable\Text\TextChangeRangeExtensions.cs (1)
323throw new InvalidOperationException();
src\Dependencies\Collections\Internal\ThrowHelper.cs (4)
181throw new InvalidOperationException(GetResourceString(resource), e); 199throw new InvalidOperationException(SR.InvalidOperation_EnumFailedVersion); 205throw new InvalidOperationException(SR.InvalidOperation_EnumOpCantHappen); 211throw new InvalidOperationException(SR.InvalidOperation_ConcurrentOperationsNotSupported);
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (1)
102throw new InvalidOperationException($"Unexpected concurrent access to {GetType()}");
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+ValueBuilder.cs (1)
68throw new InvalidOperationException($"Unexpected concurrent access to {GetType()}");
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+ValueBuilder.cs (1)
78throw new InvalidOperationException($"Unexpected concurrent access to {GetType()}");
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Enumerator.cs (2)
24public object? Current => throw new InvalidOperationException(); 33throw new InvalidOperationException();
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Enumerator`1.cs (1)
24public new T Current => throw new InvalidOperationException();
src\Dependencies\Contracts\Contract.cs (1)
161throw new InvalidOperationException($"{message} - file {fileName} line {lineNumber}");
src\Dependencies\Contracts\ExceptionUtilities.cs (2)
27return new InvalidOperationException(output); 31=> new InvalidOperationException($"This program location is thought to be unreachable. File='{path}' Line={line}");
src\RoslynAnalyzers\Utilities\Compiler\Extensions\IOperationExtensions.cs (1)
532throw new InvalidOperationException();
src\RoslynAnalyzers\Utilities\Compiler\Lightup\LightupHelpers.cs (2)
171throw new InvalidOperationException(); 187throw new InvalidOperationException();
src\RoslynAnalyzers\Utilities\Compiler\SmallDictionary.cs (2)
306throw new InvalidOperationException(); 573throw new InvalidOperationException();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EditorConfig\Parsing\EditorConfigFile.cs (2)
62throw new InvalidOperationException("No path was given for this editorconfig file"); 78throw new InvalidOperationException("No path was given for this editorconfig file");
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EditorConfig\Parsing\Sections\Section.cs (1)
142throw new InvalidOperationException("No path given for editorconfig");
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SemanticModelExtensions.cs (7)
37=> semanticModel.AnalyzeDataFlow(statementOrExpression) ?? throw new InvalidOperationException(); 40=> semanticModel.AnalyzeDataFlow(firstStatement, lastStatement) ?? throw new InvalidOperationException(); 43=> semanticModel.AnalyzeControlFlow(statement) ?? throw new InvalidOperationException(); 46=> semanticModel.AnalyzeControlFlow(firstStatement, lastStatement) ?? throw new InvalidOperationException(); 51?? throw new InvalidOperationException(); 57?? throw new InvalidOperationException(); 63?? throw new InvalidOperationException();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (1)
24=> node.Parent ?? throw new InvalidOperationException("Node's parent was null");
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTokenExtensions.cs (2)
22=> GetAncestor(token, predicate) ?? throw new InvalidOperationException("Could not find a valid ancestor"); 154=> token.Parent ?? throw new InvalidOperationException("Token's parent was null");
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser.cs (1)
89trimmedDictionary[key.Trim()] = allRawConventions.TryGetValue(key, out var value) ? value : throw new InvalidOperationException();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\NamingStyle.cs (2)
83throw new InvalidOperationException(); 170default: throw new InvalidOperationException();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (1)
482throw new InvalidOperationException();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Serialization\ObjectWriter.cs (1)
286throw new InvalidOperationException($"Unsupported object type: {value.GetType()}");
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\BKTree.Builder.cs (1)
201throw new InvalidOperationException();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\RoslynParallel.NetFramework.cs (2)
596Enumerator = source.GetEnumerator() ?? throw new InvalidOperationException(); 622Enumerator = source.GetAsyncEnumerator(Cancellation.Token) ?? throw new InvalidOperationException();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\StringEscapeEncoder.cs (1)
138throw new InvalidOperationException();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\TaskExtensions.cs (1)
36throw new InvalidOperationException($"{nameof(WaitAndGetResult)} cannot be called from a thread pool thread.");
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationConstructedMethodSymbol.cs (1)
85=> throw new System.InvalidOperationException();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationMethodSymbol.cs (1)
110=> throw new InvalidOperationException();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\DocumentExtensions.cs (3)
39return semanticModel ?? throw new InvalidOperationException(string.Format(WorkspaceExtensionsResources.SyntaxTree_is_required_to_accomplish_the_task_but_is_not_supported_by_document_0, document.Name)); 63return syntaxTree ?? throw new InvalidOperationException(string.Format(WorkspaceExtensionsResources.SyntaxTree_is_required_to_accomplish_the_task_but_is_not_supported_by_document_0, document.Name)); 80return root ?? throw new InvalidOperationException(string.Format(WorkspaceExtensionsResources.SyntaxTree_is_required_to_accomplish_the_task_but_is_not_supported_by_document_0, document.Name));
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\ISolutionExtensions.cs (3)
36=> solution.GetDocument(syntaxTree) ?? throw new InvalidOperationException(); 43throw new InvalidOperationException(string.Format(WorkspaceExtensionsResources.Project_of_ID_0_is_required_to_accomplish_the_task_but_is_not_available_from_the_solution, projectId)); 109=> new InvalidOperationException(WorkspaceExtensionsResources.The_solution_does_not_contain_the_specified_document);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\ProjectExtensions.cs (1)
114throw new InvalidOperationException(string.Format(WorkspaceExtensionsResources.Compilation_is_required_to_accomplish_the_task_but_is_not_supported_by_project_0, project.Name));
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\AddImports\AbstractAddImportsService.cs (1)
126throw new InvalidOperationException();
Microsoft.CodeAnalysis.CodeStyle (39)
src\Compilers\Core\Portable\InternalUtilities\ReaderWriterLockSlimExtensions.cs (2)
93throw new InvalidOperationException(); 101throw new InvalidOperationException();
src\Compilers\Core\Portable\Text\TextChangeRangeExtensions.cs (1)
323throw new InvalidOperationException();
src\Dependencies\Collections\Internal\ThrowHelper.cs (4)
181throw new InvalidOperationException(GetResourceString(resource), e); 199throw new InvalidOperationException(SR.InvalidOperation_EnumFailedVersion); 205throw new InvalidOperationException(SR.InvalidOperation_EnumOpCantHappen); 211throw new InvalidOperationException(SR.InvalidOperation_ConcurrentOperationsNotSupported);
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (1)
102throw new InvalidOperationException($"Unexpected concurrent access to {GetType()}");
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+ValueBuilder.cs (1)
68throw new InvalidOperationException($"Unexpected concurrent access to {GetType()}");
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+ValueBuilder.cs (1)
78throw new InvalidOperationException($"Unexpected concurrent access to {GetType()}");
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Enumerator.cs (2)
24public object? Current => throw new InvalidOperationException(); 33throw new InvalidOperationException();
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Enumerator`1.cs (1)
24public new T Current => throw new InvalidOperationException();
src\Dependencies\Contracts\Contract.cs (1)
161throw new InvalidOperationException($"{message} - file {fileName} line {lineNumber}");
src\Dependencies\Contracts\ExceptionUtilities.cs (2)
27return new InvalidOperationException(output); 31=> new InvalidOperationException($"This program location is thought to be unreachable. File='{path}' Line={line}");
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EditorConfig\Parsing\EditorConfigFile.cs (2)
62throw new InvalidOperationException("No path was given for this editorconfig file"); 78throw new InvalidOperationException("No path was given for this editorconfig file");
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EditorConfig\Parsing\Sections\Section.cs (1)
142throw new InvalidOperationException("No path given for editorconfig");
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SemanticModelExtensions.cs (7)
37=> semanticModel.AnalyzeDataFlow(statementOrExpression) ?? throw new InvalidOperationException(); 40=> semanticModel.AnalyzeDataFlow(firstStatement, lastStatement) ?? throw new InvalidOperationException(); 43=> semanticModel.AnalyzeControlFlow(statement) ?? throw new InvalidOperationException(); 46=> semanticModel.AnalyzeControlFlow(firstStatement, lastStatement) ?? throw new InvalidOperationException(); 51?? throw new InvalidOperationException(); 57?? throw new InvalidOperationException(); 63?? throw new InvalidOperationException();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (1)
24=> node.Parent ?? throw new InvalidOperationException("Node's parent was null");
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTokenExtensions.cs (2)
22=> GetAncestor(token, predicate) ?? throw new InvalidOperationException("Could not find a valid ancestor"); 154=> token.Parent ?? throw new InvalidOperationException("Token's parent was null");
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser.cs (1)
89trimmedDictionary[key.Trim()] = allRawConventions.TryGetValue(key, out var value) ? value : throw new InvalidOperationException();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\NamingStyle.cs (2)
83throw new InvalidOperationException(); 170default: throw new InvalidOperationException();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (1)
482throw new InvalidOperationException();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Serialization\ObjectWriter.cs (1)
286throw new InvalidOperationException($"Unsupported object type: {value.GetType()}");
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\BKTree.Builder.cs (1)
201throw new InvalidOperationException();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\RoslynParallel.NetFramework.cs (2)
596Enumerator = source.GetEnumerator() ?? throw new InvalidOperationException(); 622Enumerator = source.GetAsyncEnumerator(Cancellation.Token) ?? throw new InvalidOperationException();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\StringEscapeEncoder.cs (1)
138throw new InvalidOperationException();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\TaskExtensions.cs (1)
36throw new InvalidOperationException($"{nameof(WaitAndGetResult)} cannot be called from a thread pool thread.");
Microsoft.CodeAnalysis.CodeStyle.Fixes (10)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationConstructedMethodSymbol.cs (1)
85=> throw new System.InvalidOperationException();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationMethodSymbol.cs (1)
110=> throw new InvalidOperationException();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\DocumentExtensions.cs (3)
39return semanticModel ?? throw new InvalidOperationException(string.Format(WorkspaceExtensionsResources.SyntaxTree_is_required_to_accomplish_the_task_but_is_not_supported_by_document_0, document.Name)); 63return syntaxTree ?? throw new InvalidOperationException(string.Format(WorkspaceExtensionsResources.SyntaxTree_is_required_to_accomplish_the_task_but_is_not_supported_by_document_0, document.Name)); 80return root ?? throw new InvalidOperationException(string.Format(WorkspaceExtensionsResources.SyntaxTree_is_required_to_accomplish_the_task_but_is_not_supported_by_document_0, document.Name));
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\ISolutionExtensions.cs (3)
36=> solution.GetDocument(syntaxTree) ?? throw new InvalidOperationException(); 43throw new InvalidOperationException(string.Format(WorkspaceExtensionsResources.Project_of_ID_0_is_required_to_accomplish_the_task_but_is_not_available_from_the_solution, projectId)); 109=> new InvalidOperationException(WorkspaceExtensionsResources.The_solution_does_not_contain_the_specified_document);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\ProjectExtensions.cs (1)
114throw new InvalidOperationException(string.Format(WorkspaceExtensionsResources.Compilation_is_required_to_accomplish_the_task_but_is_not_supported_by_project_0, project.Name));
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\AddImports\AbstractAddImportsService.cs (1)
126throw new InvalidOperationException();
Microsoft.CodeAnalysis.Collections.Package (13)
Internal\ThrowHelper.cs (4)
181throw new InvalidOperationException(GetResourceString(resource), e); 199throw new InvalidOperationException(SR.InvalidOperation_EnumFailedVersion); 205throw new InvalidOperationException(SR.InvalidOperation_EnumOpCantHappen); 211throw new InvalidOperationException(SR.InvalidOperation_ConcurrentOperationsNotSupported);
Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (1)
102throw new InvalidOperationException($"Unexpected concurrent access to {GetType()}");
Segmented\ImmutableSegmentedHashSet`1+ValueBuilder.cs (1)
68throw new InvalidOperationException($"Unexpected concurrent access to {GetType()}");
Segmented\ImmutableSegmentedList`1+ValueBuilder.cs (1)
78throw new InvalidOperationException($"Unexpected concurrent access to {GetType()}");
Specialized\SpecializedCollections.Empty.Enumerator.cs (2)
24public object? Current => throw new InvalidOperationException(); 33throw new InvalidOperationException();
Specialized\SpecializedCollections.Empty.Enumerator`1.cs (1)
24public new T Current => throw new InvalidOperationException();
src\Dependencies\Contracts\Contract.cs (1)
161throw new InvalidOperationException($"{message} - file {fileName} line {lineNumber}");
src\Dependencies\Contracts\ExceptionUtilities.cs (2)
27return new InvalidOperationException(output); 31=> new InvalidOperationException($"This program location is thought to be unreachable. File='{path}' Line={line}");
Microsoft.CodeAnalysis.Compiler.Test.Resources (1)
ResourceLoader.cs (1)
23throw new InvalidOperationException($"Resource '{name}' not found in {assembly.FullName}.");
Microsoft.CodeAnalysis.Contracts.Package (3)
Contract.cs (1)
161throw new InvalidOperationException($"{message} - file {fileName} line {lineNumber}");
ExceptionUtilities.cs (2)
27return new InvalidOperationException(output); 31=> new InvalidOperationException($"This program location is thought to be unreachable. File='{path}' Line={line}");
Microsoft.CodeAnalysis.CSharp (20)
Compilation\CSharpSemanticModel.cs (1)
1386throw new InvalidOperationException(CSharpResources.ChainingSpeculativeModelIsNotSupported);
Emitter\Model\PEModuleBuilder.cs (1)
1130throw new InvalidOperationException(string.Format(CSharpResources.GenericParameterDefinition, param.Name));
Lowering\LocalRewriter\LocalRewriter_BasePatternSwitchLocalRewriter.cs (1)
34throw new InvalidOperationException();
Symbols\MethodSymbol.cs (2)
837throw new InvalidOperationException(); 865throw new InvalidOperationException();
Symbols\NamedTypeSymbol.cs (2)
1206throw new InvalidOperationException(CSharpResources.CannotCreateConstructedFromConstructed); 1211throw new InvalidOperationException(CSharpResources.CannotCreateConstructedFromNongeneric);
Symbols\NamespaceExtent.cs (3)
49throw new InvalidOperationException(); 66throw new InvalidOperationException(); 83throw new InvalidOperationException();
Symbols\ParameterSymbol.cs (1)
240throw new InvalidOperationException();
Symbols\Symbol.cs (1)
428=> TryGetFirstLocation() ?? throw new InvalidOperationException("Symbol has no locations");
Symbols\UnboundGenericType.cs (1)
24throw new InvalidOperationException();
Syntax\CSharpSyntaxRewriter.cs (2)
204throw new InvalidOperationException(CodeAnalysisResources.SeparatorIsExpected); 212throw new InvalidOperationException(CodeAnalysisResources.ElementIsExpected);
Syntax\CSharpSyntaxTree.cs (4)
789throw new InvalidOperationException(); 820throw new InvalidOperationException(); 836throw new InvalidOperationException(); 853throw new InvalidOperationException();
Syntax\SyntaxReplacer.cs (1)
329return new InvalidOperationException(CodeAnalysisResources.MissingListItem);
Microsoft.CodeAnalysis.CSharp.CodeStyle (11)
src\Analyzers\CSharp\Analyzers\UseExpressionBody\Helpers\UseExpressionBodyForIndexersHelper.cs (1)
60throw new InvalidOperationException();
src\Analyzers\CSharp\Analyzers\UseExpressionBody\Helpers\UseExpressionBodyForPropertiesHelper.cs (1)
60throw new InvalidOperationException();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SemanticModelExtensions.cs (8)
463?? throw new InvalidOperationException(); 469?? throw new InvalidOperationException(); 475?? throw new InvalidOperationException(); 481?? throw new InvalidOperationException(); 487?? throw new InvalidOperationException(); 493?? throw new InvalidOperationException(); 499?? throw new InvalidOperationException(); 505?? throw new InvalidOperationException();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxTriviaExtensions.cs (1)
115throw new InvalidOperationException();
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (4)
src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpCollectionExpressionRewriter.cs (1)
815_ => throw new InvalidOperationException(),
src\Analyzers\CSharp\CodeFixes\UseCollectionInitializer\CSharpUseCollectionInitializerCodeFixProvider_CollectionInitializer.cs (1)
103_ => throw new InvalidOperationException(),
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\ExpressionGenerator.cs (1)
238tokenFactory, isNegative: x => false, negate: t => throw new InvalidOperationException(), integerMinValueString: null);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ITypeSymbolExtensions.TypeSyntaxGeneratorVisitor.cs (1)
54throw new InvalidOperationException("This symbol cannot be converted into a NameSyntax");
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (1)
src\Compilers\Test\Resources\Core\ResourceLoader.cs (1)
23throw new InvalidOperationException($"Resource '{name}' not found in {assembly.FullName}.");
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (1)
Semantics\PatternMatchingTests3.cs (1)
5503_ => throw new System.InvalidOperationException(),
Microsoft.CodeAnalysis.CSharp.Features (7)
IntroduceVariable\CSharpIntroduceVariableService_IntroduceLocal.cs (1)
106throw new InvalidOperationException();
InvertIf\CSharpInvertIfCodeRefactoringProvider.cs (1)
64=> ifNode.Else?.Statement ?? throw new InvalidOperationException();
ReverseForStatement\CSharpReverseForStatementCodeRefactoringProvider.cs (1)
299throw new InvalidOperationException();
src\Analyzers\CSharp\Analyzers\UseExpressionBody\Helpers\UseExpressionBodyForIndexersHelper.cs (1)
60throw new InvalidOperationException();
src\Analyzers\CSharp\Analyzers\UseExpressionBody\Helpers\UseExpressionBodyForPropertiesHelper.cs (1)
60throw new InvalidOperationException();
src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpCollectionExpressionRewriter.cs (1)
815_ => throw new InvalidOperationException(),
src\Analyzers\CSharp\CodeFixes\UseCollectionInitializer\CSharpUseCollectionInitializerCodeFixProvider_CollectionInitializer.cs (1)
103_ => throw new InvalidOperationException(),
Microsoft.CodeAnalysis.CSharp.Scripting (1)
ScriptOptionsExtensions.cs (1)
18: (options.ParseOptions is CSharpParseOptions existing) ? existing : throw new InvalidOperationException(string.Format(ScriptingResources.CannotSetLanguageSpecificOption, LanguageNames.CSharp, nameof(LanguageVersion)));
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (17)
SourceGeneration\GeneratorDriverTests.cs (17)
279var exception = new InvalidOperationException("init error"); 302var exception = new InvalidOperationException("init error"); 323var exception = new InvalidOperationException("generate error"); 346var exception = new InvalidOperationException("generate error"); 380var exception = new InvalidOperationException("generate error"); 407var exception = new InvalidOperationException("generate error"); 1003throw new InvalidOperationException("post init error"); 1032throw new InvalidOperationException("init error"); 1447var e = new InvalidOperationException("abc"); 1472var e = new InvalidOperationException("abc"); 1498var e = new InvalidOperationException("abc"); 1540var e = new InvalidOperationException("abc"); 1588var e = new InvalidOperationException("abc"); 1617var e = new InvalidOperationException("abc"); 1684Func<int, CancellationToken, int> throwsFunc = (input, _) => throw new InvalidOperationException("user code exception"); 3479throw new InvalidOperationException(); 4755var generator = new PipelineCallbackGenerator((ctx) => { ctx.RegisterHostOutput(ctx.CompilationProvider, (hostCtx, c) => { throw new InvalidOperationException("failed"); }); });
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (2)
Symbols\MockSymbolTests.cs (2)
121throw new InvalidOperationException("unexpected xml element"); 144throw new InvalidOperationException("Unexpected symbol kind");
Microsoft.CodeAnalysis.CSharp.Test.Utilities (4)
Extensions.cs (2)
182throw new InvalidOperationException("Only records have copy-constructor"); 211throw new InvalidOperationException("Only records have primary deconstructor");
TestOptions.cs (2)
155throw new InvalidOperationException("Need at least one feature to enable"); 164throw new InvalidOperationException($"{feature} is not a valid experimental feature");
Microsoft.CodeAnalysis.CSharp.Workspaces (11)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SemanticModelExtensions.cs (8)
463?? throw new InvalidOperationException(); 469?? throw new InvalidOperationException(); 475?? throw new InvalidOperationException(); 481?? throw new InvalidOperationException(); 487?? throw new InvalidOperationException(); 493?? throw new InvalidOperationException(); 499?? throw new InvalidOperationException(); 505?? throw new InvalidOperationException();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxTriviaExtensions.cs (1)
115throw new InvalidOperationException();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\ExpressionGenerator.cs (1)
238tokenFactory, isNegative: x => false, negate: t => throw new InvalidOperationException(), integerMinValueString: null);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ITypeSymbolExtensions.TypeSyntaxGeneratorVisitor.cs (1)
54throw new InvalidOperationException("This symbol cannot be converted into a NameSyntax");
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (1)
EmbeddedLanguages\VirtualChars\CSharpVirtualCharServiceTests.cs (1)
42throw new InvalidOperationException();
Microsoft.CodeAnalysis.Debugging.Package (16)
CustomDebugInfoReader.cs (13)
76throw new InvalidOperationException("Invalid header."); 92throw new InvalidOperationException("Invalid header."); 110throw new InvalidOperationException("Invalid header."); 364throw new InvalidOperationException(string.Format("Expected at most one Using record for method {0}", FormatMethodToken(methodToken))); 373throw new InvalidOperationException(string.Format("Did not expect both Forward and ForwardToModule records for method {0}", FormatMethodToken(methodToken))); 391throw new InvalidOperationException(string.Format("Expected at most one ForwardToModule record for method {0}", FormatMethodToken(methodToken))); 433throw new InvalidOperationException(string.Format("Group size indicates more imports than there are import strings (method {0}).", FormatMethodToken(methodToken))); 439throw new InvalidOperationException(string.Format("Encountered extern alias info before all import strings were consumed (method {0}).", FormatMethodToken(methodToken))); 459throw new InvalidOperationException(string.Format("Expected only extern alias info strings after consuming the indicated number of imports (method {0}).", FormatMethodToken(methodToken))); 473throw new InvalidOperationException(string.Format("Group size indicates fewer imports than there are import strings (method {0}).", FormatMethodToken(methodToken))); 524throw new InvalidOperationException("Read out of buffer."); 536throw new InvalidOperationException("Read out of buffer."); 548throw new InvalidOperationException("Read out of buffer.");
src\Dependencies\Contracts\Contract.cs (1)
161throw new InvalidOperationException($"{message} - file {fileName} line {lineNumber}");
src\Dependencies\Contracts\ExceptionUtilities.cs (2)
27return new InvalidOperationException(output); 31=> new InvalidOperationException($"This program location is thought to be unreachable. File='{path}' Line={line}");
Microsoft.CodeAnalysis.EditorFeatures (31)
EditorConfigSettings\Updater\NamingStyles\SourceTextExtensions.cs (1)
77throw new InvalidOperationException("Invalid language specified");
InlineRename\InlineRenameService.cs (1)
69throw new InvalidOperationException(EditorFeaturesResources.An_active_inline_rename_session_is_still_active_Complete_it_before_starting_a_new_one);
InlineRename\InlineRenameSession.cs (2)
160throw new InvalidOperationException(EditorFeaturesResources.The_triggerSpan_is_not_included_in_the_given_workspace); 386throw new InvalidOperationException(EditorFeaturesResources.This_session_has_already_been_dismissed);
IntelliSense\AsyncCompletion\CommitManager.cs (3)
203FatalError.ReportAndCatch(new InvalidOperationException("Subject buffer did not provide Edit Access"), ErrorSeverity.Critical); 209FatalError.ReportAndCatch(new InvalidOperationException("Subject buffer is editing by someone else."), ErrorSeverity.Critical); 265FatalError.ReportAndCatch(new InvalidOperationException("The invoked LSP snippet expander came back as false."), ErrorSeverity.Critical);
Interactive\InteractiveEvaluator.cs (2)
150=> _lazyInteractiveWindow ?? throw new InvalidOperationException(EditorFeaturesResources.Engine_must_be_attached_to_an_Interactive_Window); 153=> _lazyInteractiveCommands ?? throw new InvalidOperationException(EditorFeaturesResources.Engine_must_be_attached_to_an_Interactive_Window);
Lightup\LightupHelpers.cs (15)
72throw new InvalidOperationException($"Type '{type}' is not assignable to type '{typeof(T)}'"); 83throw new InvalidOperationException($"Property '{property}' produces a value of type '{property.PropertyType}', which is not assignable to type '{typeof(TResult)}'"); 124throw new InvalidOperationException($"Type '{type}' is not assignable to type '{typeof(T)}'"); 135throw new InvalidOperationException($"Method '{method}' produces an unexpected value of type '{method.ReturnType}'"); 180throw new InvalidOperationException($"Type '{type}' is not assignable to type '{typeof(T)}'"); 197throw new InvalidOperationException($"Type '{argType}' is not assignable to type '{typeof(TArg)}'"); 202throw new InvalidOperationException($"Method '{method}' produces an unexpected value of type '{method.ReturnType}'"); 253throw new InvalidOperationException($"Type '{type}' is not assignable to type '{typeof(T)}'"); 265throw new InvalidOperationException($"Method '{method}' produces a value of type '{method.ReturnType}', which is not assignable to type '{typeof(TResult)}'"); 308throw new InvalidOperationException($"Type '{type}' is not assignable to type '{typeof(T)}'"); 319throw new InvalidOperationException($"Method '{method}' produces a value of type '{method.ReturnType}', which is not assignable to type '{typeof(TResult)}'"); 367throw new InvalidOperationException($"Type '{type}' is not assignable to type '{typeof(T)}'"); 384throw new InvalidOperationException($"Method '{method}' produces a value of type '{method.ReturnType}', which is not assignable to type '{typeof(TResult)}'"); 448throw new InvalidOperationException($"Type '{type}' is not assignable to type '{typeof(T)}'"); 469throw new InvalidOperationException($"Method '{method}' produces a value of type '{method.ReturnType}', which is not assignable to type '{typeof(TResult)}'");
QuickInfo\OnTheFlyDocsViewFactory.cs (2)
50throw new InvalidOperationException("TView must be UIElement"); 61throw new InvalidOperationException("QuickInfoSession is null");
RenameTracking\RenameTrackingTaggerProvider.cs (1)
74var ex = new InvalidOperationException(string.Format(
Shared\Utilities\CaretPreservingEditTransaction.cs (2)
57throw new InvalidOperationException(EditorFeaturesResources.The_transaction_is_already_complete); 70throw new InvalidOperationException(EditorFeaturesResources.The_transaction_is_already_complete);
Shared\Utilities\VirtualTreePoint.cs (1)
55throw new InvalidOperationException(EditorFeaturesResources.Can_t_compare_positions_from_different_text_snapshots);
Suggestions\SuggestedActionWithNestedActions.cs (1)
66FatalError.ReportAndCatch(new InvalidOperationException($"{nameof(InnerInvokeAsync)} should not be called on a {nameof(SuggestedActionWithNestedActions)}"), ErrorSeverity.Critical);
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (4)
Diagnostics\DiagnosticTaggerWrapper.cs (1)
68throw new InvalidOperationException();
MoveStaticMembers\TestMoveStaticMembersService.cs (1)
48throw new InvalidOperationException(errMsg);
NavigateTo\NavigateToTestAggregator.Callback.cs (1)
41=> throw new InvalidOperationException("Unexpected call to Invalidate.");
Threading\WpfTestRunner.cs (1)
93throw new InvalidOperationException($"This test requires {nameof(WpfFactAttribute)} because '{reason}' but is missing {nameof(WpfFactAttribute)}. Either the attribute should be changed, or the reason it needs an STA thread audited.");
Microsoft.CodeAnalysis.EditorFeatures.Text (2)
Shared\Extensions\ITextSnapshotExtensions.cs (2)
40=> TryGetPosition(snapshot, lineNumber, columnIndex) ?? throw new InvalidOperationException(TextEditorResources.The_snapshot_does_not_contain_the_specified_position); 91=> TryGetSpan(snapshot, startLine, startIndex, endLine, endIndex) ?? throw new InvalidOperationException(TextEditorResources.The_snapshot_does_not_contain_the_specified_span);
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (1)
Completion\CompletionServiceTests.cs (1)
47var caretPosition = workspace.DocumentWithCursor.CursorPosition ?? throw new InvalidOperationException();
Microsoft.CodeAnalysis.ExpressionEvaluator.FunctionResolver (5)
CSharp\Scanner.cs (1)
75throw new InvalidOperationException();
src\Dependencies\Contracts\Contract.cs (1)
161throw new InvalidOperationException($"{message} - file {fileName} line {lineNumber}");
src\Dependencies\Contracts\ExceptionUtilities.cs (2)
27return new InvalidOperationException(output); 31=> new InvalidOperationException($"This program location is thought to be unreachable. File='{path}' Line={line}");
VisualBasic\Scanner.cs (1)
70throw new InvalidOperationException();
Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider (3)
src\Dependencies\Contracts\Contract.cs (1)
161throw new InvalidOperationException($"{message} - file {fileName} line {lineNumber}");
src\Dependencies\Contracts\ExceptionUtilities.cs (2)
27return new InvalidOperationException(output); 31=> new InvalidOperationException($"This program location is thought to be unreachable. File='{path}' Line={line}");
Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider.Utilities (10)
Debugger\Engine\DkmClrValue.cs (6)
86throw new InvalidOperationException("Cannot dereference invalid value"); 122throw new InvalidOperationException(); 389throw new InvalidOperationException(); 667throw new InvalidOperationException(); 764throw new InvalidOperationException("Dereferencing null"); 771throw new InvalidOperationException();
Debugger\Engine\DkmInspectionSession.cs (1)
90throw new InvalidOperationException();
src\Dependencies\Contracts\Contract.cs (1)
161throw new InvalidOperationException($"{message} - file {fileName} line {lineNumber}");
src\Dependencies\Contracts\ExceptionUtilities.cs (2)
27return new InvalidOperationException(output); 31=> new InvalidOperationException($"This program location is thought to be unreachable. File='{path}' Line={line}");
Microsoft.CodeAnalysis.Extensions.Package (13)
src\Dependencies\Collections\Internal\ThrowHelper.cs (4)
181throw new InvalidOperationException(GetResourceString(resource), e); 199throw new InvalidOperationException(SR.InvalidOperation_EnumFailedVersion); 205throw new InvalidOperationException(SR.InvalidOperation_EnumOpCantHappen); 211throw new InvalidOperationException(SR.InvalidOperation_ConcurrentOperationsNotSupported);
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (1)
102throw new InvalidOperationException($"Unexpected concurrent access to {GetType()}");
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+ValueBuilder.cs (1)
68throw new InvalidOperationException($"Unexpected concurrent access to {GetType()}");
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+ValueBuilder.cs (1)
78throw new InvalidOperationException($"Unexpected concurrent access to {GetType()}");
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Enumerator.cs (2)
24public object? Current => throw new InvalidOperationException(); 33throw new InvalidOperationException();
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Enumerator`1.cs (1)
24public new T Current => throw new InvalidOperationException();
src\Dependencies\Contracts\Contract.cs (1)
161throw new InvalidOperationException($"{message} - file {fileName} line {lineNumber}");
src\Dependencies\Contracts\ExceptionUtilities.cs (2)
27return new InvalidOperationException(output); 31=> new InvalidOperationException($"This program location is thought to be unreachable. File='{path}' Line={line}");
Microsoft.CodeAnalysis.ExternalAccess.Extensions (4)
Internal\ExtensionMessageHandlerFactory.cs (2)
59throw new InvalidOperationException(string.Format(ExternalAccessExtensionsResources.Type_0_implements_interface_1_more_than_once, candidateType.FullName, unboundInterfaceType.Name)); 69?? throw new InvalidOperationException(string.Format(ExternalAccessExtensionsResources.Cannot_create_0, candidateType.FullName));
Internal\ExtensionMessageHandlerWrapper.cs (2)
45throw new InvalidOperationException(string.Format(ExternalAccessExtensionsResources.The_message_type_0_is_not_assignable_to_1, message?.GetType().FullName ?? "null", MessageType.FullName)); 54throw new InvalidOperationException(string.Format(ExternalAccessExtensionsResources.The_message_type_0_is_not_assignable_to_1, response?.GetType().FullName ?? "null", ResponseType.FullName));
Microsoft.CodeAnalysis.ExternalAccess.Razor.Features (2)
RazorUri.cs (1)
27throw new InvalidOperationException($"Could not deserialize Uri into a source generated Uri: {generatedDocumentUri}");
Testing\RazorTestLanguageServerFactory.cs (1)
96throw new InvalidOperationException("Could not deserialize server capabilities as VSInternalServerCapabilities");
Microsoft.CodeAnalysis.ExternalAccess.Xaml (1)
Internal\ClientCapabilityProvider.cs (1)
85throw new InvalidOperationException($"Unsupported dynamic registration method: {methodName}");
Microsoft.CodeAnalysis.Features (92)
CodeFixes\Service\CodeFixService.cs (1)
870throw new InvalidOperationException(
CodeRefactorings\SyncNamespace\AbstractChangeNamespaceService.cs (1)
796?? throw new InvalidOperationException("Can't get SyntaxNode from GetCurrentNode.")));
EditAndContinue\ActiveStatementsMap.cs (1)
113throw new InvalidOperationException($"Multiple active statements with the same instruction id returned by Active Statement Provider");
EditAndContinue\DebuggingSession.cs (3)
187throw new InvalidOperationException($"Pending update has not been committed or discarded."); 204throw new InvalidOperationException($"Previous update has not been committed or discarded."); 213throw new InvalidOperationException($"No pending update.");
EmbeddedLanguages\Json\JsonNodes.cs (5)
80_ => throw new InvalidOperationException(), 182_ => throw new InvalidOperationException(), 199_ => throw new InvalidOperationException(), 226_ => throw new InvalidOperationException(), 260_ => throw new InvalidOperationException(),
EmbeddedLanguages\RegularExpressions\LanguageServices\RegexDocumentHighlighter.cs (1)
123_ => throw new InvalidOperationException(),
EmbeddedLanguages\RegularExpressions\RegexNodes.cs (39)
37_ => throw new InvalidOperationException(), 88_ => throw new InvalidOperationException(), 131_ => throw new InvalidOperationException(), 162_ => throw new InvalidOperationException(), 198_ => throw new InvalidOperationException(), 232_ => throw new InvalidOperationException(), 281_ => throw new InvalidOperationException(), 324_ => throw new InvalidOperationException(), 356_ => throw new InvalidOperationException(), 388_ => throw new InvalidOperationException(), 423_ => throw new InvalidOperationException(), 471_ => throw new InvalidOperationException(), 505_ => throw new InvalidOperationException(), 543_ => throw new InvalidOperationException(), 570_ => throw new InvalidOperationException(), 643_ => throw new InvalidOperationException(), 694_ => throw new InvalidOperationException(), 731_ => throw new InvalidOperationException(), 767_ => throw new InvalidOperationException(), 803_ => throw new InvalidOperationException(), 839_ => throw new InvalidOperationException(), 890_ => throw new InvalidOperationException(), 927_ => throw new InvalidOperationException(), 963_ => throw new InvalidOperationException(), 1005_ => throw new InvalidOperationException(), 1054_ => throw new InvalidOperationException(), 1109_ => throw new InvalidOperationException(), 1145_ => throw new InvalidOperationException(), 1198_ => throw new InvalidOperationException(), 1217_ => throw new InvalidOperationException(), 1236_ => throw new InvalidOperationException(), 1258_ => throw new InvalidOperationException(), 1280_ => throw new InvalidOperationException(), 1302_ => throw new InvalidOperationException(), 1328_ => throw new InvalidOperationException(), 1356_ => throw new InvalidOperationException(), 1380throw new InvalidOperationException(); 1401_ => throw new InvalidOperationException(), 1440_ => throw new InvalidOperationException(),
EmbeddedLanguages\RegularExpressions\RegexParser.cs (2)
1216throw new InvalidOperationException(); 1432throw new InvalidOperationException();
EmbeddedLanguages\StackFrame\StackFrameCompilationUnit.cs (1)
49_ => throw new InvalidOperationException()
EmbeddedLanguages\StackFrame\StackFrameLexer.cs (2)
509'\n' => throw new InvalidOperationException(), 510'\r' => throw new InvalidOperationException(),
EmbeddedLanguages\StackFrame\StackFrameNodeDefinitions.cs (10)
53_ => throw new InvalidOperationException(), 126_ => throw new InvalidOperationException() 144_ => throw new InvalidOperationException() 159_ => throw new InvalidOperationException() 196_ => throw new InvalidOperationException() 241_ => throw new InvalidOperationException() 295_ => throw new InvalidOperationException() 424throw new InvalidOperationException(); 465_ => throw new InvalidOperationException() 541_ => throw new InvalidOperationException()
Emit\CompilationOutputs.cs (1)
124throw new InvalidOperationException(string.Format(FeaturesResources.MethodMustReturnStreamThatSupportsReadAndSeek, methodName));
Extensions\ExtensionFolder.cs (3)
122throw new InvalidOperationException(string.Format(FeaturesResources.Extension_0_is_already_registered, assemblyFilePath)); 145throw new InvalidOperationException(string.Format(FeaturesResources.Extension_0_was_not_registered, assemblyFilePath)); 160throw new InvalidOperationException(string.Format(FeaturesResources.Extension_0_was_not_registered, assemblyFilePath));
Extensions\ExtensionMessageHandlerService.cs (5)
63?? throw new InvalidOperationException(string.Format(FeaturesResources.Unable_to_get_the_directory_name_for_0, assemblyFilePath)); 117throw new InvalidOperationException(string.Format(FeaturesResources.No_extension_registered_as_0, assemblyFolderPath)); 177throw new InvalidOperationException(string.Format(FeaturesResources.No_extensions_registered_at_0, assemblyFolderPath)); 222throw new InvalidOperationException(string.Format(FeaturesResources.No_handler_found_for_message_0, messageName)); 229throw new InvalidOperationException(string.Format(FeaturesResources.Multiple_handlers_found_for_message_0, messageName));
ExtractInterface\AbstractExtractInterfaceService.cs (1)
169default: throw new InvalidOperationException($"Unable to extract interface for operation of type {extractInterfaceOptions.GetType()}");
LanguageServiceIndexFormat\SymbolMoniker.cs (1)
50throw new InvalidOperationException($"'{symbol}' does not have a moniker.");
MetadataAsSource\MetadataAsSourceFileService.cs (1)
222throw new InvalidOperationException(
MoveToNamespace\AbstractMoveToNamespaceService.cs (1)
182_ => throw new InvalidOperationException(),
src\Dependencies\CodeAnalysis.Debugging\CustomDebugInfoReader.cs (13)
76throw new InvalidOperationException("Invalid header."); 92throw new InvalidOperationException("Invalid header."); 110throw new InvalidOperationException("Invalid header."); 364throw new InvalidOperationException(string.Format("Expected at most one Using record for method {0}", FormatMethodToken(methodToken))); 373throw new InvalidOperationException(string.Format("Did not expect both Forward and ForwardToModule records for method {0}", FormatMethodToken(methodToken))); 391throw new InvalidOperationException(string.Format("Expected at most one ForwardToModule record for method {0}", FormatMethodToken(methodToken))); 433throw new InvalidOperationException(string.Format("Group size indicates more imports than there are import strings (method {0}).", FormatMethodToken(methodToken))); 439throw new InvalidOperationException(string.Format("Encountered extern alias info before all import strings were consumed (method {0}).", FormatMethodToken(methodToken))); 459throw new InvalidOperationException(string.Format("Expected only extern alias info strings after consuming the indicated number of imports (method {0}).", FormatMethodToken(methodToken))); 473throw new InvalidOperationException(string.Format("Group size indicates fewer imports than there are import strings (method {0}).", FormatMethodToken(methodToken))); 524throw new InvalidOperationException("Read out of buffer."); 536throw new InvalidOperationException("Read out of buffer."); 548throw new InvalidOperationException("Read out of buffer.");
Microsoft.CodeAnalysis.Features.UnitTests (2)
EditAndContinue\EditAndContinueWorkspaceServiceTests.cs (1)
1908throw new InvalidOperationException("Source generator failed");
EditAndContinue\WatchHotReloadServiceTests.cs (1)
194throw new InvalidOperationException("Source generator failed");
Microsoft.CodeAnalysis.InteractiveHost (14)
src\Dependencies\Collections\Internal\ThrowHelper.cs (4)
181throw new InvalidOperationException(GetResourceString(resource), e); 199throw new InvalidOperationException(SR.InvalidOperation_EnumFailedVersion); 205throw new InvalidOperationException(SR.InvalidOperation_EnumOpCantHappen); 211throw new InvalidOperationException(SR.InvalidOperation_ConcurrentOperationsNotSupported);
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (1)
102throw new InvalidOperationException($"Unexpected concurrent access to {GetType()}");
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+ValueBuilder.cs (1)
68throw new InvalidOperationException($"Unexpected concurrent access to {GetType()}");
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+ValueBuilder.cs (1)
78throw new InvalidOperationException($"Unexpected concurrent access to {GetType()}");
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Enumerator.cs (2)
24public object? Current => throw new InvalidOperationException(); 33throw new InvalidOperationException();
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Enumerator`1.cs (1)
24public new T Current => throw new InvalidOperationException();
src\Dependencies\Contracts\Contract.cs (1)
161throw new InvalidOperationException($"{message} - file {fileName} line {lineNumber}");
src\Dependencies\Contracts\ExceptionUtilities.cs (2)
27return new InvalidOperationException(output); 31=> new InvalidOperationException($"This program location is thought to be unreachable. File='{path}' Line={line}");
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\TaskExtensions.cs (1)
36throw new InvalidOperationException($"{nameof(WaitAndGetResult)} cannot be called from a thread pool thread.");
Microsoft.CodeAnalysis.LanguageServer (7)
DotnetCliHelper.cs (1)
66throw new InvalidOperationException("Failed to get dotnet SDK folder from dotnet --info");
HostWorkspace\WorkspaceProject.cs (1)
246throw new InvalidOperationException("The batch has already been applied.");
Program.cs (1)
44throw new InvalidOperationException("Server cannot be started with both --stdio and --pipe options.");
ServerConfigurationFactory.cs (1)
27public ServerConfiguration ServerConfiguration => _serverConfiguration ?? throw new InvalidOperationException($"{nameof(ServerConfiguration)} has not been initialized");
Services\ExtensionAssemblyManagerProvider.cs (1)
26public ExtensionAssemblyManager ExtensionAssemblyManager => _extensionAssemblyManager ?? throw new InvalidOperationException($"{nameof(ExtensionAssemblyManager)} is not initialized");
Testing\RunTestsHandler.cs (2)
144throw new InvalidOperationException("Failed to run build, see test output for details"); 166_ => throw new InvalidOperationException($"Unexpected log level {level}"),
Microsoft.CodeAnalysis.LanguageServer.Protocol (52)
Extensions\ProtocolConversions.cs (1)
978_ => throw new InvalidOperationException($"{language} is not supported"),
Handler\IDocumentChangeTracker.cs (3)
29throw new InvalidOperationException("Mutating documents not allowed in a non-mutating request handler"); 34throw new InvalidOperationException("Mutating documents not allowed in a non-mutating request handler"); 39throw new InvalidOperationException("Mutating documents not allowed in a non-mutating request handler");
Handler\InitializeManager.cs (1)
22throw new InvalidOperationException($"Tried to get required {nameof(ClientCapabilities)} before it was set");
Handler\InlineCompletions\XmlSnippetParser.CodeSnippet.cs (2)
38throw new InvalidOperationException("snippet element is missing header."); 140throw new InvalidOperationException("snippet is missing code element.");
Handler\InlineCompletions\XmlSnippetParser.cs (2)
74throw new InvalidOperationException(); 94throw new InvalidOperationException($"Snippet {snippetInfo.Title} has an invalid file path: {snippetInfo.Path}");
Handler\RequestContext.cs (4)
76return _lspSolution.Value.Workspace ?? throw new InvalidOperationException(); 95return _lspSolution.Value.Solution ?? throw new InvalidOperationException(); 118throw new InvalidOperationException("Attempted to retrieve a Document but a TextDocument was found instead."); 141throw new InvalidOperationException();
Handler\RequestContextFactory.cs (2)
31throw new InvalidOperationException($"ClientCapabilities was null for a request other than {Methods.InitializeName}."); 68throw new InvalidOperationException($"{nameof(IMethodHandler)} implementation {methodHandler.GetType()} does not implement {nameof(ISolutionRequiredHandler)}");
Handler\ServerLifetime\InitializeHandler.cs (1)
30throw new InvalidOperationException($"{nameof(Methods.InitializeName)} called multiple times");
LspServices\LspServices.cs (1)
219throw new InvalidOperationException($"Could not construct service: {typeName}");
Protocol\Converters\StringEnumConverter.cs (1)
30throw new InvalidOperationException(string.Format(CultureInfo.InvariantCulture, LanguageServerProtocolResources.StringEnumMissingConstructor, typeof(TStringEnumType).FullName));
Protocol\Internal\VSInternalLocation.cs (1)
39throw new InvalidOperationException($"{value?.GetType()} is an invalid type.");
Protocol\Internal\VSInternalReferenceItem.cs (2)
78throw new InvalidOperationException($"{value.GetType()} is an invalid type."); 166throw new InvalidOperationException($"{value?.GetType()} is an invalid type.");
src\LanguageServer\Microsoft.CommonLanguageServerProtocol.Framework\AbstractLanguageServer.cs (4)
128throw new InvalidOperationException($"Language specific handlers for {methodGroup.Key} have mis-matched number of parameters:{Environment.NewLine}{string.Join(Environment.NewLine, methodGroup)}"); 133throw new InvalidOperationException($"Language specific handlers for {methodGroup.Key} have mis-matched number of returns:{Environment.NewLine}{string.Join(Environment.NewLine, methodGroup)}"); 232throw new InvalidOperationException("The language server has not yet been asked to shutdown."); 284throw new InvalidOperationException("The language server has not yet been asked to shutdown or has not finished shutting down.");
src\LanguageServer\Microsoft.CommonLanguageServerProtocol.Framework\HandlerProvider.cs (5)
33throw new InvalidOperationException($"Missing handler for {requestHandlerMetadata.MethodName}"); 108?? throw new InvalidOperationException($"Could not load type: '{handlerTypeRef}'"); 112throw new InvalidOperationException($"{handlerTypeRef} could not be retrieved from service"); 123throw new InvalidOperationException($"Method {methodName} was implemented more than once."); 132throw new InvalidOperationException($"Language Server is missing required methods {string.Join(",", missingMethods)}");
src\LanguageServer\Microsoft.CommonLanguageServerProtocol.Framework\Handlers\InitializedHandler.cs (1)
25throw new InvalidOperationException("initialized was called twice");
src\LanguageServer\Microsoft.CommonLanguageServerProtocol.Framework\MethodHandlerDetails.cs (3)
94throw new InvalidOperationException($"Provided handler type {handlerType.FullName} does not implement {nameof(IMethodHandler)}"); 110throw new InvalidOperationException($"{handlerType.FullName} is missing {nameof(LanguageServerEndpointAttribute)}"); 129throw new InvalidOperationException("Somehow we are missing the method for our registered handler");
src\LanguageServer\Microsoft.CommonLanguageServerProtocol.Framework\NewtonsoftLanguageServer.cs (3)
35throw new InvalidOperationException($"Handler {metadata.HandlerDescription} requires request parameters but received none"); 45throw new InvalidOperationException($"Handler {metadata.HandlerDescription} does not accept parameters, but received some."); 51?? throw new InvalidOperationException($"Unable to deserialize {request} into {requestTypeRef} for {metadata.HandlerDescription}");
src\LanguageServer\Microsoft.CommonLanguageServerProtocol.Framework\QueueItem.cs (4)
128throw new InvalidOperationException("Cancellation exception is not expected here"); 183_completionSource.TrySetException(new InvalidOperationException($"Unable to create request context for {MethodName}")); 187throw new InvalidOperationException($"{nameof(StartRequestAsync)} cannot be called before {nameof(CreateRequestContextAsync)} has been called."); 255throw new InvalidOperationException("Cannot manually fail queue item after it has started");
src\LanguageServer\Microsoft.CommonLanguageServerProtocol.Framework\RequestExecutionQueue.cs (7)
185return Task.FromException<object?>(new InvalidOperationException("Server was requested to shut down.")); 264throw new InvalidOperationException(message); 318throw new InvalidOperationException($"ProcessQueueCoreAsync result task cannot be null"); 384throw new InvalidOperationException($"unexpected null value for {nameof(currentWorkCts)}"); 389throw new InvalidOperationException($"unable to add {nameof(currentWorkTask)} into {nameof(concurrentlyExecutingTasks)}"); 396throw new InvalidOperationException($"unexpected failure to remove task from {nameof(concurrentlyExecutingTasks)}"); 422throw new InvalidOperationException($"Missing default or language handler for {work.MethodName} and language {language}");
src\LanguageServer\Microsoft.CommonLanguageServerProtocol.Framework\SystemTextJsonLanguageServer.cs (3)
33throw new InvalidOperationException($"Handler {metadata.HandlerDescription} requires request parameters but received none"); 44throw new InvalidOperationException($"Handler {metadata.HandlerDescription} does not accept parameters, but received some."); 50?? throw new InvalidOperationException($"Unable to deserialize {request} into {typeof(TRequest)} for {metadata.HandlerDescription}");
src\LanguageServer\Microsoft.CommonLanguageServerProtocol.Framework\TypeRef.DefaultResolver.cs (1)
27?? throw new InvalidOperationException($"Could not load type: '{typeName}'");
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (9)
Diagnostics\PullDiagnosticTests.cs (1)
1060ExecuteImpl = context => throw new InvalidOperationException("Source generator failed")
HandlerTests.cs (2)
159var response = Task.FromException<TestConfigurableResponse>(new InvalidOperationException(nameof(HandlerTests))); 215var response = Task.FromException<TestConfigurableResponse>(new InvalidOperationException(nameof(HandlerTests)));
InlineCompletions\TestSnippetInfoService.cs (1)
31throw new InvalidOperationException($"Could not find test snippets file at {snippetsFile}");
Ordering\FailingMutatingRequestHandler.cs (1)
34throw new InvalidOperationException();
Ordering\FailingRequestHandler.cs (1)
34throw new InvalidOperationException();
TestConfigurableDocumentHandler.cs (3)
34public bool MutatesSolutionState => _mutatesSolutionState ?? throw new InvalidOperationException($"{nameof(ConfigureHandler)} has not been called"); 35public bool RequiresLSPSolution => _requiresLSPSolution ?? throw new InvalidOperationException($"{nameof(ConfigureHandler)} has not been called"); 41throw new InvalidOperationException($"{nameof(ConfigureHandler)} has already been called");
Microsoft.CodeAnalysis.LanguageServer.UnitTests (2)
Utilities\AbstractLanguageServerClientTests.TestLspClient.cs (1)
124internal ServerCapabilities ServerCapabilities => _serverCapabilities ?? throw new InvalidOperationException("Initialize has not been called");
Utilities\AbstractLanguageServerHostTests.cs (1)
64internal ServerCapabilities ServerCapabilities => _serverCapabilities ?? throw new InvalidOperationException("Initialize has not been called");
Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers (54)
src\Compilers\Core\Portable\InternalUtilities\ReaderWriterLockSlimExtensions.cs (2)
93throw new InvalidOperationException(); 101throw new InvalidOperationException();
src\Compilers\Core\Portable\Text\TextChangeRangeExtensions.cs (1)
323throw new InvalidOperationException();
src\Dependencies\Collections\Internal\ThrowHelper.cs (4)
181throw new InvalidOperationException(GetResourceString(resource), e); 199throw new InvalidOperationException(SR.InvalidOperation_EnumFailedVersion); 205throw new InvalidOperationException(SR.InvalidOperation_EnumOpCantHappen); 211throw new InvalidOperationException(SR.InvalidOperation_ConcurrentOperationsNotSupported);
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (1)
102throw new InvalidOperationException($"Unexpected concurrent access to {GetType()}");
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+ValueBuilder.cs (1)
68throw new InvalidOperationException($"Unexpected concurrent access to {GetType()}");
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+ValueBuilder.cs (1)
78throw new InvalidOperationException($"Unexpected concurrent access to {GetType()}");
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Enumerator.cs (2)
24public object? Current => throw new InvalidOperationException(); 33throw new InvalidOperationException();
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Enumerator`1.cs (1)
24public new T Current => throw new InvalidOperationException();
src\Dependencies\Contracts\Contract.cs (1)
161throw new InvalidOperationException($"{message} - file {fileName} line {lineNumber}");
src\Dependencies\Contracts\ExceptionUtilities.cs (2)
27return new InvalidOperationException(output); 31=> new InvalidOperationException($"This program location is thought to be unreachable. File='{path}' Line={line}");
src\RoslynAnalyzers\Utilities\Compiler\Extensions\IOperationExtensions.cs (1)
532throw new InvalidOperationException();
src\RoslynAnalyzers\Utilities\Compiler\Lightup\LightupHelpers.cs (2)
171throw new InvalidOperationException(); 187throw new InvalidOperationException();
src\RoslynAnalyzers\Utilities\Compiler\SmallDictionary.cs (2)
306throw new InvalidOperationException(); 573throw new InvalidOperationException();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EditorConfig\Parsing\EditorConfigFile.cs (2)
62throw new InvalidOperationException("No path was given for this editorconfig file"); 78throw new InvalidOperationException("No path was given for this editorconfig file");
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EditorConfig\Parsing\Sections\Section.cs (1)
142throw new InvalidOperationException("No path given for editorconfig");
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SemanticModelExtensions.cs (7)
37=> semanticModel.AnalyzeDataFlow(statementOrExpression) ?? throw new InvalidOperationException(); 40=> semanticModel.AnalyzeDataFlow(firstStatement, lastStatement) ?? throw new InvalidOperationException(); 43=> semanticModel.AnalyzeControlFlow(statement) ?? throw new InvalidOperationException(); 46=> semanticModel.AnalyzeControlFlow(firstStatement, lastStatement) ?? throw new InvalidOperationException(); 51?? throw new InvalidOperationException(); 57?? throw new InvalidOperationException(); 63?? throw new InvalidOperationException();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (1)
24=> node.Parent ?? throw new InvalidOperationException("Node's parent was null");
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTokenExtensions.cs (2)
22=> GetAncestor(token, predicate) ?? throw new InvalidOperationException("Could not find a valid ancestor"); 154=> token.Parent ?? throw new InvalidOperationException("Token's parent was null");
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser.cs (1)
89trimmedDictionary[key.Trim()] = allRawConventions.TryGetValue(key, out var value) ? value : throw new InvalidOperationException();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\NamingStyle.cs (2)
83throw new InvalidOperationException(); 170default: throw new InvalidOperationException();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (1)
482throw new InvalidOperationException();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Serialization\ObjectWriter.cs (1)
286throw new InvalidOperationException($"Unsupported object type: {value.GetType()}");
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\BKTree.Builder.cs (1)
201throw new InvalidOperationException();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\RoslynParallel.NetFramework.cs (2)
596Enumerator = source.GetEnumerator() ?? throw new InvalidOperationException(); 622Enumerator = source.GetAsyncEnumerator(Cancellation.Token) ?? throw new InvalidOperationException();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\StringEscapeEncoder.cs (1)
138throw new InvalidOperationException();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\TaskExtensions.cs (1)
36throw new InvalidOperationException($"{nameof(WaitAndGetResult)} cannot be called from a thread pool thread.");
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationConstructedMethodSymbol.cs (1)
85=> throw new System.InvalidOperationException();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationMethodSymbol.cs (1)
110=> throw new InvalidOperationException();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\DocumentExtensions.cs (3)
39return semanticModel ?? throw new InvalidOperationException(string.Format(WorkspaceExtensionsResources.SyntaxTree_is_required_to_accomplish_the_task_but_is_not_supported_by_document_0, document.Name)); 63return syntaxTree ?? throw new InvalidOperationException(string.Format(WorkspaceExtensionsResources.SyntaxTree_is_required_to_accomplish_the_task_but_is_not_supported_by_document_0, document.Name)); 80return root ?? throw new InvalidOperationException(string.Format(WorkspaceExtensionsResources.SyntaxTree_is_required_to_accomplish_the_task_but_is_not_supported_by_document_0, document.Name));
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\ISolutionExtensions.cs (3)
36=> solution.GetDocument(syntaxTree) ?? throw new InvalidOperationException(); 43throw new InvalidOperationException(string.Format(WorkspaceExtensionsResources.Project_of_ID_0_is_required_to_accomplish_the_task_but_is_not_available_from_the_solution, projectId)); 109=> new InvalidOperationException(WorkspaceExtensionsResources.The_solution_does_not_contain_the_specified_document);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\ProjectExtensions.cs (1)
114throw new InvalidOperationException(string.Format(WorkspaceExtensionsResources.Compilation_is_required_to_accomplish_the_task_but_is_not_supported_by_project_0, project.Name));
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\AddImports\AbstractAddImportsService.cs (1)
126throw new InvalidOperationException();
Microsoft.CodeAnalysis.PooledObjects.Package (3)
src\Dependencies\Contracts\Contract.cs (1)
161throw new InvalidOperationException($"{message} - file {fileName} line {lineNumber}");
src\Dependencies\Contracts\ExceptionUtilities.cs (2)
27return new InvalidOperationException(output); 31=> new InvalidOperationException($"This program location is thought to be unreachable. File='{path}' Line={line}");
Microsoft.CodeAnalysis.PublicApiAnalyzers (45)
DeclarePublicApiAnalyzer.Impl.cs (1)
38throw new InvalidOperationException();
src\Compilers\Core\Portable\InternalUtilities\ReaderWriterLockSlimExtensions.cs (2)
93throw new InvalidOperationException(); 101throw new InvalidOperationException();
src\Compilers\Core\Portable\Text\TextChangeRangeExtensions.cs (1)
323throw new InvalidOperationException();
src\Dependencies\Collections\Internal\ThrowHelper.cs (4)
181throw new InvalidOperationException(GetResourceString(resource), e); 199throw new InvalidOperationException(SR.InvalidOperation_EnumFailedVersion); 205throw new InvalidOperationException(SR.InvalidOperation_EnumOpCantHappen); 211throw new InvalidOperationException(SR.InvalidOperation_ConcurrentOperationsNotSupported);
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (1)
102throw new InvalidOperationException($"Unexpected concurrent access to {GetType()}");
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+ValueBuilder.cs (1)
68throw new InvalidOperationException($"Unexpected concurrent access to {GetType()}");
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+ValueBuilder.cs (1)
78throw new InvalidOperationException($"Unexpected concurrent access to {GetType()}");
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Enumerator.cs (2)
24public object? Current => throw new InvalidOperationException(); 33throw new InvalidOperationException();
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Enumerator`1.cs (1)
24public new T Current => throw new InvalidOperationException();
src\Dependencies\Contracts\Contract.cs (1)
161throw new InvalidOperationException($"{message} - file {fileName} line {lineNumber}");
src\Dependencies\Contracts\ExceptionUtilities.cs (2)
27return new InvalidOperationException(output); 31=> new InvalidOperationException($"This program location is thought to be unreachable. File='{path}' Line={line}");
src\RoslynAnalyzers\Utilities\Compiler\Extensions\IOperationExtensions.cs (1)
532throw new InvalidOperationException();
src\RoslynAnalyzers\Utilities\Compiler\Lightup\LightupHelpers.cs (2)
171throw new InvalidOperationException(); 187throw new InvalidOperationException();
src\RoslynAnalyzers\Utilities\Compiler\SmallDictionary.cs (2)
306throw new InvalidOperationException(); 573throw new InvalidOperationException();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EditorConfig\Parsing\EditorConfigFile.cs (2)
62throw new InvalidOperationException("No path was given for this editorconfig file"); 78throw new InvalidOperationException("No path was given for this editorconfig file");
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EditorConfig\Parsing\Sections\Section.cs (1)
142throw new InvalidOperationException("No path given for editorconfig");
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SemanticModelExtensions.cs (7)
37=> semanticModel.AnalyzeDataFlow(statementOrExpression) ?? throw new InvalidOperationException(); 40=> semanticModel.AnalyzeDataFlow(firstStatement, lastStatement) ?? throw new InvalidOperationException(); 43=> semanticModel.AnalyzeControlFlow(statement) ?? throw new InvalidOperationException(); 46=> semanticModel.AnalyzeControlFlow(firstStatement, lastStatement) ?? throw new InvalidOperationException(); 51?? throw new InvalidOperationException(); 57?? throw new InvalidOperationException(); 63?? throw new InvalidOperationException();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (1)
24=> node.Parent ?? throw new InvalidOperationException("Node's parent was null");
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTokenExtensions.cs (2)
22=> GetAncestor(token, predicate) ?? throw new InvalidOperationException("Could not find a valid ancestor"); 154=> token.Parent ?? throw new InvalidOperationException("Token's parent was null");
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser.cs (1)
89trimmedDictionary[key.Trim()] = allRawConventions.TryGetValue(key, out var value) ? value : throw new InvalidOperationException();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\NamingStyle.cs (2)
83throw new InvalidOperationException(); 170default: throw new InvalidOperationException();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (1)
482throw new InvalidOperationException();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Serialization\ObjectWriter.cs (1)
286throw new InvalidOperationException($"Unsupported object type: {value.GetType()}");
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\BKTree.Builder.cs (1)
201throw new InvalidOperationException();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\RoslynParallel.NetFramework.cs (2)
596Enumerator = source.GetEnumerator() ?? throw new InvalidOperationException(); 622Enumerator = source.GetAsyncEnumerator(Cancellation.Token) ?? throw new InvalidOperationException();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\StringEscapeEncoder.cs (1)
138throw new InvalidOperationException();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\TaskExtensions.cs (1)
36throw new InvalidOperationException($"{nameof(WaitAndGetResult)} cannot be called from a thread pool thread.");
Microsoft.CodeAnalysis.Rebuild (9)
CompilationFactory.cs (2)
136pdbFilePath = codeView.Path ?? throw new InvalidOperationException(RebuildResources.Could_not_get_PDB_file_path); 202throw new InvalidOperationException();
CompilationOptionsReader.cs (6)
68throw new InvalidOperationException(RebuildResources.Does_not_contain_metadata_compilation_options); 215using var algorithm = CryptographicHashProvider.TryGetAlgorithm(sourceTextInfo.HashAlgorithm) ?? throw new InvalidOperationException(); 311throw new InvalidOperationException(); 330throw new InvalidOperationException(); 338throw new InvalidOperationException(); 352throw new InvalidOperationException();
MetadataCompilationOptions.cs (1)
54throw new InvalidOperationException(string.Format(RebuildResources._0_exists_1_times_in_compilation_options, optionName, optionValues.Length));
Microsoft.CodeAnalysis.Rebuild.UnitTests (5)
DeterministicKeyBuilderTests.cs (3)
129throw new InvalidOperationException(); 581_ => throw new InvalidOperationException(), 729_ => throw new InvalidOperationException(),
RoundTripUtil.cs (2)
87_ => throw new InvalidOperationException(), 118rebuildPdbReader = rebuildReader.GetEmbeddedPdbMetadataReader() ?? throw new InvalidOperationException();
Microsoft.CodeAnalysis.Remote.ServiceHub (5)
Host\RemoteExportProviderBuilder.cs (1)
33=> s_instance ?? throw new InvalidOperationException($"Default export provider not initialized. Call {nameof(InitializeAsync)} first.");
Host\ThrowingTraceListener.cs (1)
14throw new InvalidOperationException(
Services\StackTraceExplorer\RemoteStackTraceExplorerService.cs (1)
32throw new InvalidOperationException();
Services\ValueTracking\RemoteValueTrackingService.cs (2)
34throw new InvalidOperationException(); 53throw new InvalidOperationException();
Microsoft.CodeAnalysis.Remote.Workspaces (2)
RemoteSerializationOptions.cs (1)
53_ => throw new InvalidOperationException()
SolutionAssetStorage.cs (1)
41throw new InvalidOperationException($"Request for solution-checksum '{solutionChecksum}' that was not pinned on the host side.");
Microsoft.CodeAnalysis.ResxSourceGenerator (50)
AbstractResxGenerator.cs (6)
485throw new InvalidOperationException(); 548throw new InvalidOperationException(); 572throw new InvalidOperationException(); 621throw new InvalidOperationException(); 646throw new InvalidOperationException(); 703throw new InvalidOperationException();
src\Compilers\Core\Portable\InternalUtilities\ReaderWriterLockSlimExtensions.cs (2)
93throw new InvalidOperationException(); 101throw new InvalidOperationException();
src\Compilers\Core\Portable\Text\TextChangeRangeExtensions.cs (1)
323throw new InvalidOperationException();
src\Dependencies\Collections\Internal\ThrowHelper.cs (4)
181throw new InvalidOperationException(GetResourceString(resource), e); 199throw new InvalidOperationException(SR.InvalidOperation_EnumFailedVersion); 205throw new InvalidOperationException(SR.InvalidOperation_EnumOpCantHappen); 211throw new InvalidOperationException(SR.InvalidOperation_ConcurrentOperationsNotSupported);
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (1)
102throw new InvalidOperationException($"Unexpected concurrent access to {GetType()}");
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+ValueBuilder.cs (1)
68throw new InvalidOperationException($"Unexpected concurrent access to {GetType()}");
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+ValueBuilder.cs (1)
78throw new InvalidOperationException($"Unexpected concurrent access to {GetType()}");
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Enumerator.cs (2)
24public object? Current => throw new InvalidOperationException(); 33throw new InvalidOperationException();
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Enumerator`1.cs (1)
24public new T Current => throw new InvalidOperationException();
src\Dependencies\Contracts\Contract.cs (1)
161throw new InvalidOperationException($"{message} - file {fileName} line {lineNumber}");
src\Dependencies\Contracts\ExceptionUtilities.cs (2)
27return new InvalidOperationException(output); 31=> new InvalidOperationException($"This program location is thought to be unreachable. File='{path}' Line={line}");
src\RoslynAnalyzers\Utilities\Compiler\Extensions\IOperationExtensions.cs (1)
532throw new InvalidOperationException();
src\RoslynAnalyzers\Utilities\Compiler\Lightup\LightupHelpers.cs (2)
171throw new InvalidOperationException(); 187throw new InvalidOperationException();
src\RoslynAnalyzers\Utilities\Compiler\SmallDictionary.cs (2)
306throw new InvalidOperationException(); 573throw new InvalidOperationException();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EditorConfig\Parsing\EditorConfigFile.cs (2)
62throw new InvalidOperationException("No path was given for this editorconfig file"); 78throw new InvalidOperationException("No path was given for this editorconfig file");
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EditorConfig\Parsing\Sections\Section.cs (1)
142throw new InvalidOperationException("No path given for editorconfig");
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SemanticModelExtensions.cs (7)
37=> semanticModel.AnalyzeDataFlow(statementOrExpression) ?? throw new InvalidOperationException(); 40=> semanticModel.AnalyzeDataFlow(firstStatement, lastStatement) ?? throw new InvalidOperationException(); 43=> semanticModel.AnalyzeControlFlow(statement) ?? throw new InvalidOperationException(); 46=> semanticModel.AnalyzeControlFlow(firstStatement, lastStatement) ?? throw new InvalidOperationException(); 51?? throw new InvalidOperationException(); 57?? throw new InvalidOperationException(); 63?? throw new InvalidOperationException();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (1)
24=> node.Parent ?? throw new InvalidOperationException("Node's parent was null");
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTokenExtensions.cs (2)
22=> GetAncestor(token, predicate) ?? throw new InvalidOperationException("Could not find a valid ancestor"); 154=> token.Parent ?? throw new InvalidOperationException("Token's parent was null");
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser.cs (1)
89trimmedDictionary[key.Trim()] = allRawConventions.TryGetValue(key, out var value) ? value : throw new InvalidOperationException();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\NamingStyle.cs (2)
83throw new InvalidOperationException(); 170default: throw new InvalidOperationException();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (1)
482throw new InvalidOperationException();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Serialization\ObjectWriter.cs (1)
286throw new InvalidOperationException($"Unsupported object type: {value.GetType()}");
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\BKTree.Builder.cs (1)
201throw new InvalidOperationException();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\RoslynParallel.NetFramework.cs (2)
596Enumerator = source.GetEnumerator() ?? throw new InvalidOperationException(); 622Enumerator = source.GetAsyncEnumerator(Cancellation.Token) ?? throw new InvalidOperationException();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\StringEscapeEncoder.cs (1)
138throw new InvalidOperationException();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\TaskExtensions.cs (1)
36throw new InvalidOperationException($"{nameof(WaitAndGetResult)} cannot be called from a thread pool thread.");
Microsoft.CodeAnalysis.ResxSourceGenerator.UnitTests (4)
Verifiers\CSharpSourceGeneratorVerifier`1+Test.cs (2)
104throw new InvalidOperationException($"Unexpected test resource: {name.Substring(currentTestPrefix.Length)}"); 121using var resourceStream = Assembly.GetExecutingAssembly().GetManifestResourceStream(resourceName) ?? throw new InvalidOperationException();
Verifiers\VisualBasicSourceGeneratorVerifier`1+Test.cs (2)
89throw new InvalidOperationException($"Unexpected test resource: {name.Substring(currentTestPrefix.Length)}"); 106using var resourceStream = typeof(ResxGeneratorTests).Assembly.GetManifestResourceStream(resourceName) ?? throw new InvalidOperationException();
Microsoft.CodeAnalysis.Scripting (2)
ScriptVariable.cs (2)
62throw new InvalidOperationException(ScriptingResources.CannotSetReadOnlyVariable); 67throw new InvalidOperationException(ScriptingResources.CannotSetConstantVariable);
Microsoft.CodeAnalysis.Scripting.TestUtilities (1)
ObjectFormatterFixtures\MockDesktopSpinLock.cs (1)
31=> IsThreadOwnerTrackingEnabled ? true : throw new InvalidOperationException("Error");
Microsoft.CodeAnalysis.Test.Utilities (30)
Assert\TestExceptionUtilities.cs (1)
17return new InvalidOperationException(output);
Compilation\MetadataReferenceExtensions.cs (2)
26: throw new InvalidOperationException(); 44throw new InvalidOperationException();
CompilationVerifier.cs (2)
66private EmitData GetEmitData() => _emitData ?? throw new InvalidOperationException("Must call Emit first"); 795throw new InvalidOperationException("IL visualization function is not set");
Diagnostics\CommonDiagnosticAnalyzers.cs (6)
3143throw new InvalidOperationException("Mismatched FilterTree"); 3146throw new InvalidOperationException("Mismatched FilterSpan"); 3168throw new InvalidOperationException("Mismatched FilterTree"); 3171throw new InvalidOperationException("Mismatched FilterSpan"); 3201throw new InvalidOperationException("Mismatched FilterTree"); 3204throw new InvalidOperationException("Mismatched FilterSpan");
MarkedSource\MarkupTestFile.cs (1)
160throw new InvalidOperationException();
ObjectReference.cs (2)
124throw new InvalidOperationException($"The strong reference being held by the {nameof(ObjectReference<T>)} was retrieved via a call to {nameof(GetReference)}. Since the CLR might have cached a temporary somewhere in your stack, assertions can no longer be made about the correctness of lifetime."); 208throw new InvalidOperationException($"The type has already been released due to a call to {nameof(AssertReleased)}.");
Platform\Custom\MetadataSignatureHelper.cs (6)
227throw new InvalidOperationException(); 273throw new InvalidOperationException(); 321throw new InvalidOperationException(); 361throw new InvalidOperationException(); 372throw new InvalidOperationException(); 383throw new InvalidOperationException();
Platform\Desktop\RuntimeAssemblyManager.cs (1)
320throw new InvalidOperationException();
ResourceLoader.cs (1)
23throw new InvalidOperationException($"Resource '{name}' not found in {assembly.FullName}.");
TargetFrameworkUtil.cs (1)
330_ => throw new InvalidOperationException($"Unexpected target framework {targetFramework}"),
TempFiles\DisposableFile.cs (1)
44throw new InvalidOperationException(string.Format(@"
TestableFile.cs (1)
86throw new InvalidOperationException();
TestableFileSystem.cs (4)
20public OpenFileFunc OpenFileFunc { get; private set; } = delegate { throw new InvalidOperationException(); }; 21public OpenFileExFunc OpenFileExFunc { get; private set; } = (string _, FileMode _, FileAccess _, FileShare _, int _, FileOptions _, out string _) => throw new InvalidOperationException(); 22public Func<string, bool> FileExistsFunc { get; private set; } = delegate { throw new InvalidOperationException(); }; 24public Dictionary<string, TestableFile> Map => _map ?? throw new InvalidOperationException();
ThrowingTraceListener.cs (1)
26throw new InvalidOperationException(
Microsoft.CodeAnalysis.Threading.Package (13)
src\Dependencies\Collections\Internal\ThrowHelper.cs (4)
181throw new InvalidOperationException(GetResourceString(resource), e); 199throw new InvalidOperationException(SR.InvalidOperation_EnumFailedVersion); 205throw new InvalidOperationException(SR.InvalidOperation_EnumOpCantHappen); 211throw new InvalidOperationException(SR.InvalidOperation_ConcurrentOperationsNotSupported);
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (1)
102throw new InvalidOperationException($"Unexpected concurrent access to {GetType()}");
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+ValueBuilder.cs (1)
68throw new InvalidOperationException($"Unexpected concurrent access to {GetType()}");
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+ValueBuilder.cs (1)
78throw new InvalidOperationException($"Unexpected concurrent access to {GetType()}");
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Enumerator.cs (2)
24public object? Current => throw new InvalidOperationException(); 33throw new InvalidOperationException();
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Enumerator`1.cs (1)
24public new T Current => throw new InvalidOperationException();
src\Dependencies\Contracts\Contract.cs (1)
161throw new InvalidOperationException($"{message} - file {fileName} line {lineNumber}");
src\Dependencies\Contracts\ExceptionUtilities.cs (2)
27return new InvalidOperationException(output); 31=> new InvalidOperationException($"This program location is thought to be unreachable. File='{path}' Line={line}");
Microsoft.CodeAnalysis.UnitTests (10)
Collections\DebuggerAttributes.cs (8)
37var fieldInfo = GetField(obj, fieldName) ?? throw new InvalidOperationException(); 110throw new InvalidOperationException($"Expected one DebuggerTypeProxyAttribute on {type}."); 118throw new InvalidOperationException("Expected a non-null proxy type"); 138throw new InvalidOperationException($"Expected one DebuggerDisplayAttribute on {objType}."); 143string attrText = (string?)cad.ConstructorArguments[0].Value ?? throw new InvalidOperationException("Expected a non-null text"); 149throw new InvalidOperationException($"The DebuggerDisplayAttribute for {objType} lacks a closing brace."); 154throw new InvalidOperationException($"The DebuggerDisplayAttribute for {objType} doesn't reference any expressions."); 174throw new InvalidOperationException($"The DebuggerDisplayAttribute for {objType} contains the expression \"{reference}\".");
Collections\ImmutableSegmentedDictionaryTest.cs (1)
251object rootNode = DebuggerAttributes.GetFieldValue(ImmutableSegmentedDictionary.Create<string, string>(), "_root") ?? throw new InvalidOperationException();
Text\TextChangeTests.cs (1)
578throw new InvalidOperationException("Failed to GC old edit");
Microsoft.CodeAnalysis.Workspaces (124)
CodeActions\CodeAction.cs (1)
364return solution ?? throw new InvalidOperationException(string.Format(WorkspacesResources.CodeAction_0_did_not_produce_a_changed_solution, this.Title));
CodeFixes\CodeFixContext.cs (1)
36throw new InvalidOperationException(WorkspacesResources.Use_TextDocument_property_instead_of_Document_property_as_the_provider_supports_non_source_text_documents);
CodeRefactorings\CodeRefactoringContext.cs (1)
31throw new InvalidOperationException(WorkspacesResources.Use_TextDocument_property_instead_of_Document_property_as_the_provider_supports_non_source_text_documents);
CodeStyle\CodeStyleOption.cs (2)
43set => throw new InvalidOperationException(); 56set => throw new InvalidOperationException();
CodeStyle\NotificationOption.cs (3)
23set => throw new InvalidOperationException(); 32set => throw new InvalidOperationException(); 39set => throw new InvalidOperationException();
Differencing\Match.cs (1)
85throw new InvalidOperationException(string.Format(WorkspacesResources.Label_for_node_0_is_invalid_it_must_be_within_bracket_0_1, node, labelCount));
Editing\SyntaxEditor.cs (1)
259=> root ?? throw new InvalidOperationException("Tree root deleted");
Editing\SyntaxGenerator.cs (1)
1413=> root.RemoveNode(node, options) ?? throw new InvalidOperationException($"Can't remove root node.");
FindSymbols\SymbolTree\SymbolTreeInfo.cs (1)
161_ => throw new InvalidOperationException(),
FindSymbols\TopLevelSyntaxTree\DeclaredSymbolInfo.cs (1)
238FatalError.ReportAndCatch(new InvalidOperationException(message));
ReassignedVariable\AbstractReassignedVariableService.cs (1)
277FatalError.ReportAndCatch(new InvalidOperationException("Local did not come from same file that we were analyzing?"));
Remote\RemoteArguments.cs (1)
115throw new InvalidOperationException(
Rename\Renamer.RenameDocumentActionSet.cs (1)
142?? throw new InvalidOperationException(WorkspaceExtensionsResources.The_solution_does_not_contain_the_specified_document);
Serialization\SerializerService.cs (1)
74throw new InvalidOperationException("Clients can already get a checksum directly from a SerializableSourceText");
Shared\Extensions\ISolutionExtensions.cs (1)
71throw new InvalidOperationException(WorkspaceExtensionsResources.The_solution_does_not_contain_the_specified_document);
Shared\Extensions\ProjectExtensions.cs (6)
35=> project.GetDocument(documentId) ?? throw new InvalidOperationException(WorkspaceExtensionsResources.The_solution_does_not_contain_the_specified_document); 38=> project.GetDocument(tree) ?? throw new InvalidOperationException(WorkspaceExtensionsResources.The_solution_does_not_contain_the_specified_document); 41=> project.GetAdditionalDocument(documentId) ?? throw new InvalidOperationException(WorkspaceExtensionsResources.The_solution_does_not_contain_the_specified_document); 44=> project.GetAnalyzerConfigDocument(documentId) ?? throw new InvalidOperationException(WorkspaceExtensionsResources.The_solution_does_not_contain_the_specified_document); 47=> project.GetTextDocument(documentId) ?? throw new InvalidOperationException(WorkspaceExtensionsResources.The_solution_does_not_contain_the_specified_document); 52return document ?? throw new InvalidOperationException(WorkspaceExtensionsResources.The_solution_does_not_contain_the_specified_document);
Shared\TestHooks\AsynchronousOperationListener+AsyncToken.cs (1)
34throw new InvalidOperationException("Double disposing of an async token");
src\Compilers\Core\Portable\DiagnosticAnalyzer\AnalyzerAssemblyLoader.cs (1)
238throw new InvalidOperationException($"Unable to load {assemblyName.Name}: {ex.Message}", ex);
src\Compilers\Core\Portable\InternalUtilities\ReaderWriterLockSlimExtensions.cs (2)
93throw new InvalidOperationException(); 101throw new InvalidOperationException();
src\Compilers\Core\Portable\Text\TextChangeRangeExtensions.cs (1)
323throw new InvalidOperationException();
src\Dependencies\Collections\Internal\ThrowHelper.cs (4)
181throw new InvalidOperationException(GetResourceString(resource), e); 199throw new InvalidOperationException(SR.InvalidOperation_EnumFailedVersion); 205throw new InvalidOperationException(SR.InvalidOperation_EnumOpCantHappen); 211throw new InvalidOperationException(SR.InvalidOperation_ConcurrentOperationsNotSupported);
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (1)
102throw new InvalidOperationException($"Unexpected concurrent access to {GetType()}");
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+ValueBuilder.cs (1)
68throw new InvalidOperationException($"Unexpected concurrent access to {GetType()}");
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+ValueBuilder.cs (1)
78throw new InvalidOperationException($"Unexpected concurrent access to {GetType()}");
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Enumerator.cs (2)
24public object? Current => throw new InvalidOperationException(); 33throw new InvalidOperationException();
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Enumerator`1.cs (1)
24public new T Current => throw new InvalidOperationException();
src\Dependencies\Contracts\Contract.cs (1)
161throw new InvalidOperationException($"{message} - file {fileName} line {lineNumber}");
src\Dependencies\Contracts\ExceptionUtilities.cs (2)
27return new InvalidOperationException(output); 31=> new InvalidOperationException($"This program location is thought to be unreachable. File='{path}' Line={line}");
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EditorConfig\Parsing\EditorConfigFile.cs (2)
62throw new InvalidOperationException("No path was given for this editorconfig file"); 78throw new InvalidOperationException("No path was given for this editorconfig file");
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EditorConfig\Parsing\Sections\Section.cs (1)
142throw new InvalidOperationException("No path given for editorconfig");
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SemanticModelExtensions.cs (7)
37=> semanticModel.AnalyzeDataFlow(statementOrExpression) ?? throw new InvalidOperationException(); 40=> semanticModel.AnalyzeDataFlow(firstStatement, lastStatement) ?? throw new InvalidOperationException(); 43=> semanticModel.AnalyzeControlFlow(statement) ?? throw new InvalidOperationException(); 46=> semanticModel.AnalyzeControlFlow(firstStatement, lastStatement) ?? throw new InvalidOperationException(); 51?? throw new InvalidOperationException(); 57?? throw new InvalidOperationException(); 63?? throw new InvalidOperationException();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (1)
24=> node.Parent ?? throw new InvalidOperationException("Node's parent was null");
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTokenExtensions.cs (2)
22=> GetAncestor(token, predicate) ?? throw new InvalidOperationException("Could not find a valid ancestor"); 154=> token.Parent ?? throw new InvalidOperationException("Token's parent was null");
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser.cs (1)
89trimmedDictionary[key.Trim()] = allRawConventions.TryGetValue(key, out var value) ? value : throw new InvalidOperationException();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\NamingStyle.cs (2)
83throw new InvalidOperationException(); 170default: throw new InvalidOperationException();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (1)
482throw new InvalidOperationException();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Serialization\ObjectWriter.cs (1)
286throw new InvalidOperationException($"Unsupported object type: {value.GetType()}");
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\BKTree.Builder.cs (1)
201throw new InvalidOperationException();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\RoslynParallel.NetFramework.cs (2)
596Enumerator = source.GetEnumerator() ?? throw new InvalidOperationException(); 622Enumerator = source.GetAsyncEnumerator(Cancellation.Token) ?? throw new InvalidOperationException();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\StringEscapeEncoder.cs (1)
138throw new InvalidOperationException();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\TaskExtensions.cs (1)
36throw new InvalidOperationException($"{nameof(WaitAndGetResult)} cannot be called from a thread pool thread.");
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationConstructedMethodSymbol.cs (1)
85=> throw new System.InvalidOperationException();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationMethodSymbol.cs (1)
110=> throw new InvalidOperationException();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\DocumentExtensions.cs (6)
39return semanticModel ?? throw new InvalidOperationException(string.Format(WorkspaceExtensionsResources.SyntaxTree_is_required_to_accomplish_the_task_but_is_not_supported_by_document_0, document.Name)); 52return semanticModel ?? throw new InvalidOperationException(string.Format(WorkspaceExtensionsResources.SyntaxTree_is_required_to_accomplish_the_task_but_is_not_supported_by_document_0, document.Name)); 63return syntaxTree ?? throw new InvalidOperationException(string.Format(WorkspaceExtensionsResources.SyntaxTree_is_required_to_accomplish_the_task_but_is_not_supported_by_document_0, document.Name)); 70return syntaxTree ?? throw new InvalidOperationException(string.Format(WorkspaceExtensionsResources.SyntaxTree_is_required_to_accomplish_the_task_but_is_not_supported_by_document_0, document.Name)); 80return root ?? throw new InvalidOperationException(string.Format(WorkspaceExtensionsResources.SyntaxTree_is_required_to_accomplish_the_task_but_is_not_supported_by_document_0, document.Name)); 87return root ?? throw new InvalidOperationException(string.Format(WorkspaceExtensionsResources.SyntaxTree_is_required_to_accomplish_the_task_but_is_not_supported_by_document_0, document.Name));
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\ISolutionExtensions.cs (3)
36=> solution.GetDocument(syntaxTree) ?? throw new InvalidOperationException(); 43throw new InvalidOperationException(string.Format(WorkspaceExtensionsResources.Project_of_ID_0_is_required_to_accomplish_the_task_but_is_not_available_from_the_solution, projectId)); 109=> new InvalidOperationException(WorkspaceExtensionsResources.The_solution_does_not_contain_the_specified_document);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\ProjectExtensions.cs (1)
114throw new InvalidOperationException(string.Format(WorkspaceExtensionsResources.Compilation_is_required_to_accomplish_the_task_but_is_not_supported_by_project_0, project.Name));
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\AddImports\AbstractAddImportsService.cs (1)
126throw new InvalidOperationException();
Storage\SQLite\v2\Interop\SqlConnection.cs (2)
235throw new InvalidOperationException("Nested transactions not currently supported"); 374throw new InvalidOperationException("Must read blobs within a transaction to prevent corruption!");
Storage\SQLite\v2\SQLitePersistentStorage.Accessor.cs (1)
388throw new InvalidOperationException("Must flush tables within a transaction to ensure consistency");
Storage\SQLite\v2\SQLitePersistentStorage_StringIds.cs (2)
111throw new InvalidOperationException("Must call this while connection has transaction open"); 170throw new InvalidOperationException();
Storage\SQLite\v2\SQLitePersistentStorage+PooledConnection.cs (1)
44throw new InvalidOperationException($"Cannot get a connection to the DB unless running on one of {nameof(SQLitePersistentStorage)}'s schedulers");
Workspace\Host\HostLanguageServices.cs (1)
67throw new InvalidOperationException(
Workspace\Host\HostWorkspaceServices.cs (1)
87throw new InvalidOperationException(
Workspace\Host\PersistentStorage\NoOpPersistentStorage.cs (1)
20? throw new InvalidOperationException("Database was not supported")
Workspace\Host\PersistentStorage\NoOpPersistentStorageService.cs (1)
22? throw new InvalidOperationException("Database was not supported")
Workspace\Host\TemporaryStorage\LegacyTemporaryStorageService.cs (5)
46var stream = _stream ?? throw new InvalidOperationException(); 65throw new InvalidOperationException(WorkspacesResources.Temporary_storage_cannot_be_written_more_than_once); 80throw new InvalidOperationException(WorkspacesResources.Temporary_storage_cannot_be_written_more_than_once); 93=> _sourceText ?? throw new InvalidOperationException(); 106throw new InvalidOperationException(WorkspacesResources.Temporary_storage_cannot_be_written_more_than_once);
Workspace\ProjectSystem\ProjectSystemProject.BatchingDocumentCollection.cs (1)
542throw new InvalidOperationException($"The file '{filePath}' does not exist in the project.");
Workspace\ProjectSystem\ProjectSystemProject.cs (4)
1180throw new InvalidOperationException($"Multiple redirectors disagree on the path to redirect '{fullPath}' to ('{redirectedPath}' vs '{currentlyRedirectedPath}')."); 1234throw new InvalidOperationException("The metadata reference has already been added to the project."); 1280throw new InvalidOperationException("The metadata reference does not exist in this project."); 1380throw new InvalidOperationException("The project has already been removed.");
Workspace\Solution\Document.cs (1)
302return semanticModel ?? throw new InvalidOperationException(string.Format(WorkspaceExtensionsResources.SyntaxTree_is_required_to_accomplish_the_task_but_is_not_supported_by_document_0, this.Name));
Workspace\Solution\DocumentState.cs (1)
490throw new InvalidOperationException();
Workspace\Solution\Solution.cs (16)
634throw new InvalidOperationException(WorkspacesResources.The_project_already_references_the_target_project); 730throw new InvalidOperationException(WorkspacesResources.The_project_already_contains_the_specified_reference); 754throw new InvalidOperationException(WorkspacesResources.Project_does_not_contain_specified_reference); 812throw new InvalidOperationException(WorkspacesResources.The_project_already_contains_the_specified_reference); 841throw new InvalidOperationException(WorkspacesResources.Project_does_not_contain_specified_reference); 897throw new InvalidOperationException(WorkspacesResources.The_solution_already_contains_the_specified_reference); 916throw new InvalidOperationException(WorkspacesResources.Solution_does_not_contain_specified_reference); 1129=> this.SolutionState.GetProjectState(projectId) ?? throw new InvalidOperationException(string.Format(WorkspacesResources._0_is_not_part_of_the_workspace, projectId)); 1750throw new InvalidOperationException(WorkspacesResources.The_solution_does_not_contain_the_specified_project); 1772throw new InvalidOperationException(WorkspaceExtensionsResources.The_solution_does_not_contain_the_specified_document); 1806throw new InvalidOperationException(WorkspaceExtensionsResources.The_solution_does_not_contain_the_specified_document); 1832throw new InvalidOperationException(WorkspaceExtensionsResources.The_solution_does_not_contain_the_specified_document); 1859throw new InvalidOperationException(WorkspacesResources.A_project_may_not_reference_itself); 1864throw new InvalidOperationException( 1893throw new InvalidOperationException(WorkspacesResources.Only_submission_project_can_reference_submission_projects); 1898throw new InvalidOperationException(WorkspacesResources.This_submission_already_references_another_submission_project);
Workspace\Solution\SolutionCompilationState.SymbolToProjectId.cs (2)
90throw new InvalidOperationException( 101throw new InvalidOperationException(
Workspace\Solution\SolutionState.cs (3)
845throw new InvalidOperationException($"The document '{id}' does not exist in the project."); 1374throw new InvalidOperationException(WorkspacesResources.The_solution_already_contains_the_specified_project); 1382throw new InvalidOperationException(WorkspacesResources.The_solution_does_not_contain_the_specified_project);
Workspace\Solution\SourceGeneratorExecutionVersion.cs (1)
77=> throw new InvalidOperationException();
Workspace\Solution\StateChecksums.cs (2)
453var compilationOptions = state.CompilationOptions ?? throw new InvalidOperationException("We should not be trying to serialize a project with no compilation options; RemoteSupportedLanguages.IsSupported should have filtered it out."); 459var parseOptions = state.ParseOptions ?? throw new InvalidOperationException("We should not be trying to serialize a project with no parse options; RemoteSupportedLanguages.IsSupported should have filtered it out.");
Microsoft.CodeAnalysis.Workspaces.MSBuild (2)
MSBuild\DiagnosticReporter.cs (1)
33throw new InvalidOperationException(message);
MSBuild\MSBuildWorkspace.cs (1)
563return s_frameworkRoot ?? throw new InvalidOperationException($"Unable to get {nameof(FrameworkRoot)}");
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (19)
Build\ProjectBuildManager.cs (3)
69throw new InvalidOperationException($"{nameof(ProjectBuildManager)}.{nameof(EndBatchBuild)} not called."); 221throw new InvalidOperationException(); 262throw new InvalidOperationException();
MSBuild\ProjectFile\ProjectFile.cs (1)
469throw new InvalidOperationException($"Unable to find reference item '{shortAssemblyName}'");
src\Compilers\Core\Portable\InternalUtilities\ReaderWriterLockSlimExtensions.cs (2)
93throw new InvalidOperationException(); 101throw new InvalidOperationException();
src\Dependencies\Collections\Internal\ThrowHelper.cs (4)
181throw new InvalidOperationException(GetResourceString(resource), e); 199throw new InvalidOperationException(SR.InvalidOperation_EnumFailedVersion); 205throw new InvalidOperationException(SR.InvalidOperation_EnumOpCantHappen); 211throw new InvalidOperationException(SR.InvalidOperation_ConcurrentOperationsNotSupported);
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (1)
102throw new InvalidOperationException($"Unexpected concurrent access to {GetType()}");
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+ValueBuilder.cs (1)
68throw new InvalidOperationException($"Unexpected concurrent access to {GetType()}");
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+ValueBuilder.cs (1)
78throw new InvalidOperationException($"Unexpected concurrent access to {GetType()}");
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Enumerator.cs (2)
24public object? Current => throw new InvalidOperationException(); 33throw new InvalidOperationException();
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Enumerator`1.cs (1)
24public new T Current => throw new InvalidOperationException();
src\Dependencies\Contracts\Contract.cs (1)
161throw new InvalidOperationException($"{message} - file {fileName} line {lineNumber}");
src\Dependencies\Contracts\ExceptionUtilities.cs (2)
27return new InvalidOperationException(output); 31=> new InvalidOperationException($"This program location is thought to be unreachable. File='{path}' Line={line}");
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (3)
NewlyCreatedProjectsFromDotNetNew.cs (2)
195throw new InvalidOperationException($"The '{templateName}' template requires additional dotnet workloads to be installed. It should be excluded during template discovery. " + ex.Message); 255throw new InvalidOperationException(string.Join(Environment.NewLine,
TestFiles\Resources.cs (1)
26throw new InvalidOperationException($"Cannot find resource named: '{resourceName}'");
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (6)
MEF\ExportProviderCache.cs (3)
139throw new InvalidOperationException($"{nameof(ExportProviderCache)} may only be used from tests marked with {nameof(UseExportProviderAttribute)}"); 168throw new InvalidOperationException( 226throw new InvalidOperationException($"Only one {_scope.Name} {nameof(ExportProvider)} can be created in the context of a single test.");
MEF\UseExportProviderAttribute.cs (1)
213throw new InvalidOperationException("Cannot create host services after test tear down.");
TestExportJoinableTaskContext+DenyExecutionSynchronizationContext.cs (1)
144=> throw new InvalidOperationException($"Code cannot switch to the main thread without configuring IThreadingContext.");
Workspaces\TestWorkspace`1.cs (1)
107throw new InvalidOperationException($"{severityText} {fullMessage}");
Microsoft.CodeAnalysis.Workspaces.UnitTests (1)
SolutionTests\SolutionWithSourceGeneratorTests.cs (1)
1400=> throw new InvalidOperationException("These tests should not be loading analyzer assemblies in those host workspace, only in the remote one.");
Microsoft.CodeAnalysis.XunitHook (1)
XunitDisposeHook.cs (1)
19throw new InvalidOperationException();
Microsoft.CommonLanguageServerProtocol.Framework.Example (3)
src\Dependencies\Contracts\Contract.cs (1)
161throw new InvalidOperationException($"{message} - file {fileName} line {lineNumber}");
src\Dependencies\Contracts\ExceptionUtilities.cs (2)
27return new InvalidOperationException(output); 31=> new InvalidOperationException($"This program location is thought to be unreachable. File='{path}' Line={line}");
Microsoft.CommonLanguageServerProtocol.Framework.Package (34)
AbstractLanguageServer.cs (4)
128throw new InvalidOperationException($"Language specific handlers for {methodGroup.Key} have mis-matched number of parameters:{Environment.NewLine}{string.Join(Environment.NewLine, methodGroup)}"); 133throw new InvalidOperationException($"Language specific handlers for {methodGroup.Key} have mis-matched number of returns:{Environment.NewLine}{string.Join(Environment.NewLine, methodGroup)}"); 232throw new InvalidOperationException("The language server has not yet been asked to shutdown."); 284throw new InvalidOperationException("The language server has not yet been asked to shutdown or has not finished shutting down.");
HandlerProvider.cs (5)
33throw new InvalidOperationException($"Missing handler for {requestHandlerMetadata.MethodName}"); 108?? throw new InvalidOperationException($"Could not load type: '{handlerTypeRef}'"); 112throw new InvalidOperationException($"{handlerTypeRef} could not be retrieved from service"); 123throw new InvalidOperationException($"Method {methodName} was implemented more than once."); 132throw new InvalidOperationException($"Language Server is missing required methods {string.Join(",", missingMethods)}");
Handlers\InitializedHandler.cs (1)
25throw new InvalidOperationException("initialized was called twice");
MethodHandlerDetails.cs (3)
94throw new InvalidOperationException($"Provided handler type {handlerType.FullName} does not implement {nameof(IMethodHandler)}"); 110throw new InvalidOperationException($"{handlerType.FullName} is missing {nameof(LanguageServerEndpointAttribute)}"); 129throw new InvalidOperationException("Somehow we are missing the method for our registered handler");
NewtonsoftLanguageServer.cs (3)
35throw new InvalidOperationException($"Handler {metadata.HandlerDescription} requires request parameters but received none"); 45throw new InvalidOperationException($"Handler {metadata.HandlerDescription} does not accept parameters, but received some."); 51?? throw new InvalidOperationException($"Unable to deserialize {request} into {requestTypeRef} for {metadata.HandlerDescription}");
QueueItem.cs (4)
128throw new InvalidOperationException("Cancellation exception is not expected here"); 183_completionSource.TrySetException(new InvalidOperationException($"Unable to create request context for {MethodName}")); 187throw new InvalidOperationException($"{nameof(StartRequestAsync)} cannot be called before {nameof(CreateRequestContextAsync)} has been called."); 255throw new InvalidOperationException("Cannot manually fail queue item after it has started");
RequestExecutionQueue.cs (7)
185return Task.FromException<object?>(new InvalidOperationException("Server was requested to shut down.")); 264throw new InvalidOperationException(message); 318throw new InvalidOperationException($"ProcessQueueCoreAsync result task cannot be null"); 384throw new InvalidOperationException($"unexpected null value for {nameof(currentWorkCts)}"); 389throw new InvalidOperationException($"unable to add {nameof(currentWorkTask)} into {nameof(concurrentlyExecutingTasks)}"); 396throw new InvalidOperationException($"unexpected failure to remove task from {nameof(concurrentlyExecutingTasks)}"); 422throw new InvalidOperationException($"Missing default or language handler for {work.MethodName} and language {language}");
src\Dependencies\Contracts\Contract.cs (1)
161throw new InvalidOperationException($"{message} - file {fileName} line {lineNumber}");
src\Dependencies\Contracts\ExceptionUtilities.cs (2)
27return new InvalidOperationException(output); 31=> new InvalidOperationException($"This program location is thought to be unreachable. File='{path}' Line={line}");
SystemTextJsonLanguageServer.cs (3)
33throw new InvalidOperationException($"Handler {metadata.HandlerDescription} requires request parameters but received none"); 44throw new InvalidOperationException($"Handler {metadata.HandlerDescription} does not accept parameters, but received some."); 50?? throw new InvalidOperationException($"Unable to deserialize {request} into {typeof(TRequest)} for {metadata.HandlerDescription}");
TypeRef.DefaultResolver.cs (1)
27?? throw new InvalidOperationException($"Could not load type: '{typeName}'");
Microsoft.CommonLanguageServerProtocol.Framework.UnitTests (1)
Mocks\TestLspServices.cs (1)
32=> TryGetService(typeof(T), out var service) ? (T)service : throw new InvalidOperationException($"{typeof(T).Name} did not have a service");
Microsoft.Data.Analysis (2)
TextFieldParser.cs (2)
947throw new InvalidOperationException(Strings.NullFieldWidths); 951throw new InvalidOperationException(Strings.EmptyFieldWidths);
Microsoft.Data.Analysis.Tests (2)
src\Microsoft.Data.Analysis\TextFieldParser.cs (2)
947throw new InvalidOperationException(Strings.NullFieldWidths); 951throw new InvalidOperationException(Strings.EmptyFieldWidths);
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.ArcadeAzureIntegration (3)
AzureCliCredentialWithAzNoUpdateWrapper.cs (2)
91throw new InvalidOperationException("Failed to start process to disable auto update of Azure CLI"); 102throw new InvalidOperationException("Could not finish az config command to disable auto update on time");
DefaultIdentityTokenCredential.cs (1)
107throw new InvalidOperationException("No valid credential class detected and configured for authentication to Azure services.");
Microsoft.DotNet.Build.Tasks.Feed (2)
src\common\CreateAzureContainerIfNotExists.cs (1)
26throw new System.InvalidOperationException($"Container {ContainerName} already exists in storage account {AccountName}.");
src\GetEnvProxy.cs (1)
21throw new InvalidOperationException($"Required Environment variable {key} not found.");
Microsoft.DotNet.Build.Tasks.Installers (9)
src\ArReader.cs (1)
109throw new InvalidOperationException("Unexpected end of stream");
src\RpmHeader.cs (7)
142throw new InvalidOperationException("Invalid immutable region tag"); 153throw new InvalidOperationException("Null entry should not be present in RPM header"); 161throw new InvalidOperationException("Invalid RPM header entry string (no null terminator found)"); 175throw new InvalidOperationException("Invalid RPM header entry string (no null terminator found)"); 192_ => throw new InvalidOperationException("Invalid RPM header entry type") 264throw new InvalidOperationException("Null entry should not be present in RPM header"); 300_ => throw new InvalidOperationException("Invalid RPM header entry type")
src\StreamHelpers.cs (1)
18throw new InvalidOperationException("Unexpected end of stream");
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)
30throw new InvalidOperationException($"Required environment variable {name} not set.");
ProvisioningProfileProvider.cs (1)
227?? throw new InvalidOperationException("Failed to get provision profile file name");
Microsoft.DotNet.Internal.SymbolHelper (1)
SymbolUploadHelperFactory.cs (1)
178throw new InvalidOperationException("Symbol publishing currently relies on Windows x64 hosting");
Microsoft.DotNet.NuGetRepack.Tasks (2)
src\NuGetVersionUpdater.cs (2)
175throw new InvalidOperationException($"Can only update pre-release packages: '{packagePath}' has release version"); 349errors.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 (2)
RemoteExecutor.cs (1)
486throw new InvalidOperationException("RuntimeConfigurationOptions are only supported on .NET Core");
RemoteInvokeHandle.cs (1)
97throw new InvalidOperationException($"A test {AssemblyName}!{ClassName}.{MethodName} forgot to Dispose() the result of RemoteInvoke()");
Microsoft.DotNet.SignTool (3)
src\BatchSignUtil.cs (1)
349throw new InvalidOperationException("No progress made on signing which indicates a bug");
src\SignTool.cs (2)
89throw new InvalidOperationException($"Failed to zip file {file.FullPath} to {zipFilePath}"); 122throw new InvalidOperationException($"Failed to unzip file {item.Value} to {item.Key}");
Microsoft.DotNet.StrongName (6)
Signing.cs (5)
162throw new InvalidOperationException("Cannot strong name sign binary without metadata."); 171throw new InvalidOperationException($"Failed to parse strong name '{keyFile}'. Key must be a full public/private keypair"); 178throw new InvalidOperationException("Strong name directory is not present. Binary is not signed or delay-signed."); 192throw new InvalidOperationException("Failed to parse the public key of the assembly."); 197throw new InvalidOperationException("Public key of the assembly does not match the public key of the provided key file.");
Utils.cs (1)
121throw new InvalidOperationException("Failed to read the full PE file.");
Microsoft.DotNet.SwaggerGenerator.CodeGenerator (5)
Modeler\ServiceClientModelFactory.cs (4)
72throw new InvalidOperationException( 86throw new InvalidOperationException( 100throw new InvalidOperationException( 114throw new InvalidOperationException(
ServiceClientCodeFactory.cs (1)
47throw new InvalidOperationException($"File '{filePath}' was already generated.");
Microsoft.DotNet.XliffTasks (4)
Model\Document.cs (1)
118throw new InvalidOperationException("Document has no content loaded.");
Model\UnstructuredDocument.cs (2)
38throw new InvalidOperationException($"No end of span marker '{TranslatableSpanMarker}' found."); 47throw new InvalidOperationException($"No span separator '{TranslatableSpanSeparator}' found.");
Release.cs (1)
17throw new InvalidOperationException("Assertion failure.");
Microsoft.DotNet.XUnitAssert.Tests (10)
AsyncCollectionAssertsTests.cs (1)
1594 throw new InvalidOperationException(message);
CollectionAssertsTests.cs (1)
2631 throw new InvalidOperationException(message);
EqualityAssertsTests.cs (2)
4400 throw new InvalidOperationException(); 4439 throw new InvalidOperationException();
TypeAssertsTests.cs (6)
70 () => Assert.IsAssignableFrom<InvalidCastException>(new InvalidOperationException()) 139 () => Assert.IsAssignableFrom(typeof(InvalidCastException), new InvalidOperationException()) 212 Assert.IsNotAssignableFrom<InvalidCastException>(new InvalidOperationException()); 275 Assert.IsNotAssignableFrom(typeof(InvalidCastException), new InvalidOperationException()); 366 var result = Record.Exception(() => Assert.IsType<InvalidCastException>(new InvalidOperationException())); 428 var result = Record.Exception(() => Assert.IsType(typeof(InvalidCastException), new InvalidOperationException()));
Microsoft.DotNet.XUnitExtensions (4)
src\Microsoft.DotNet.XUnitExtensions.Shared\DiscovererHelpers.cs (1)
56throw new InvalidOperationException($"Unable to get member, please check input for {entry}.");
src\Microsoft.DotNet.XUnitExtensions.Shared\XunitParallelTheoryTestCaseRunner.cs (3)
76Aggregator.Add(new InvalidOperationException($"Data discoverer specified for {reflectionAttribute.Attribute.GetType()} on {TestCase.TestMethod.TestClass.Class.Name}.{TestCase.TestMethod.Method.Name} does not implement IDataDiscoverer.")); 78Aggregator.Add(new InvalidOperationException($"A data discoverer specified on {TestCase.TestMethod.TestClass.Class.Name}.{TestCase.TestMethod.Method.Name} does not implement IDataDiscoverer.")); 86Aggregator.Add(new InvalidOperationException($"Test data returned null for {TestCase.TestMethod.TestClass.Class.Name}.{TestCase.TestMethod.Method.Name}. Make sure it is statically initialized before this test method is called."));
Microsoft.DotNet.XUnitV3Extensions (1)
src\Microsoft.DotNet.XUnitExtensions.Shared\DiscovererHelpers.cs (1)
56throw new InvalidOperationException($"Unable to get member, please check input for {entry}.");
Microsoft.Extensions.AI (9)
ChatCompletion\ChatResponse{T}.cs (3)
65FailureReason.ResultDidNotContainJson => throw new InvalidOperationException("The response did not contain JSON to be deserialized."), 66FailureReason.DeserializationProducedNull => throw new InvalidOperationException("The deserialized response is null."), 67FailureReason.ResultDidNotContainDataProperty => throw new InvalidOperationException("The response did not contain the expected 'data' property."),
EmptyServiceProvider.cs (1)
24throw new InvalidOperationException($"No service for type '{serviceType}' and key '{serviceKey}' has been registered.");
SpeechToText\SpeechToTextClientBuilder.cs (1)
52throw new InvalidOperationException(
src\Shared\EmptyCollections\EmptyReadOnlyList.cs (2)
55public T Current => throw new InvalidOperationException(); 56object IEnumerator.Current => throw new InvalidOperationException();
src\Shared\Throw\Throw.cs (2)
398=> throw new InvalidOperationException(message); 410=> throw new InvalidOperationException(message, innerException);
Microsoft.Extensions.AI.Abstractions (8)
Contents\FunctionCallContent.cs (1)
93parsingException = new InvalidOperationException("Error parsing function call arguments.", ex);
Functions\AIFunctionFactory.cs (1)
1016static object ThrowIfNullResult(object? result) => result ?? throw new InvalidOperationException("Function returned null unexpectedly.");
src\Shared\EmptyCollections\EmptyReadOnlyList.cs (2)
55public T Current => throw new InvalidOperationException(); 56object IEnumerator.Current => throw new InvalidOperationException();
src\Shared\JsonSchemaExporter\JsonSchemaExporter.cs (1)
794throw new InvalidOperationException("The depth of the generated JSON schema exceeds the JsonSerializerOptions.MaxDepth setting.");
src\Shared\Throw\Throw.cs (2)
398=> throw new InvalidOperationException(message); 410=> throw new InvalidOperationException(message, innerException);
Throw.cs (1)
12new InvalidOperationException(serviceKey is null ?
Microsoft.Extensions.AI.Abstractions.Tests (5)
ChatCompletion\DelegatingChatClientTests.cs (1)
143: throw new InvalidOperationException("Unexpected call")
Contents\FunctionCallContentTests..cs (1)
80var ex = new InvalidOperationException("hello", new NullReferenceException("bye"));
Contents\FunctionResultContentTests.cs (1)
82var sut = new FunctionResultContent("callId1", null) { Exception = new InvalidOperationException("hello") };
Embeddings\DelegatingEmbeddingGeneratorTests.cs (1)
104: throw new InvalidOperationException("Unexpected call")
SpeechToText\DelegatingSpeechToTextClientTests.cs (1)
144: throw new InvalidOperationException("Unexpected call")
Microsoft.Extensions.AI.AzureAIInference (6)
AzureAIInferenceChatClient.cs (2)
289throw new InvalidOperationException("No model id was provided when either constructing the client or in the chat options.") 304throw new InvalidOperationException("No model id was provided when either constructing the client or in the chat options.");
src\Shared\EmptyCollections\EmptyReadOnlyList.cs (2)
55public T Current => throw new InvalidOperationException(); 56object IEnumerator.Current => throw new InvalidOperationException();
src\Shared\Throw\Throw.cs (2)
398=> throw new InvalidOperationException(message); 410=> throw new InvalidOperationException(message, innerException);
Microsoft.Extensions.AI.Evaluation (4)
CompositeEvaluator.cs (2)
54throw new InvalidOperationException( 153throw new InvalidOperationException(
src\Shared\Throw\Throw.cs (2)
398=> throw new InvalidOperationException(message); 410=> throw new InvalidOperationException(message, innerException);
Microsoft.Extensions.AI.Evaluation.Console (5)
Commands\CleanCacheCommand.cs (1)
40throw new InvalidOperationException("Either --path or --endpoint must be specified");
Commands\CleanResultsCommand.cs (1)
44throw new InvalidOperationException("Either --path or --endpoint must be specified");
Commands\ReportCommand.cs (1)
49throw new InvalidOperationException("Either --path or --endpoint must be specified");
src\Shared\Throw\Throw.cs (2)
398=> throw new InvalidOperationException(message); 410=> throw new InvalidOperationException(message, innerException);
Microsoft.Extensions.AI.Evaluation.Console.Tests (5)
ExceptionUtilitiesTests.cs (5)
17var exception = new InvalidOperationException(); 77var exception = new AggregateException(new InvalidOperationException(), new ArgumentException()); 85var exception = new AggregateException(new OperationCanceledException(), new InvalidOperationException()); 107var exception1 = new AggregateException(new TaskCanceledException(), new InvalidOperationException()); 136var exception2 = new AggregateException(new InvalidOperationException(), new OperationCanceledException());
Microsoft.Extensions.AI.Evaluation.Integration.Tests (4)
AgentQualityEvaluatorTests.cs (2)
235throw new InvalidOperationException($"Account number {accountNumber} is not valid."); 254throw new InvalidOperationException($"Order with ID {orderId} not found.");
ResultsTests.cs (2)
61throw new InvalidOperationException(); 101throw new InvalidOperationException();
Microsoft.Extensions.AI.Evaluation.NLP (2)
src\Shared\Throw\Throw.cs (2)
398=> throw new InvalidOperationException(message); 410=> throw new InvalidOperationException(message, innerException);
Microsoft.Extensions.AI.Evaluation.Quality (2)
src\Shared\Throw\Throw.cs (2)
398=> throw new InvalidOperationException(message); 410=> throw new InvalidOperationException(message, innerException);
Microsoft.Extensions.AI.Evaluation.Reporting (5)
Formats\Html\HtmlReportWriter.cs (2)
83?? throw new InvalidOperationException("Failed to load HTML template."); 95throw new InvalidOperationException($"Placeholder '{SearchString}' not found in the HTML template.");
ScenarioRun.cs (1)
154throw new InvalidOperationException(
src\Shared\Throw\Throw.cs (2)
398=> throw new InvalidOperationException(message); 410=> throw new InvalidOperationException(message, innerException);
Microsoft.Extensions.AI.Evaluation.Reporting.Azure (2)
src\Shared\Throw\Throw.cs (2)
398=> throw new InvalidOperationException(message); 410=> throw new InvalidOperationException(message, innerException);
Microsoft.Extensions.AI.Evaluation.Safety (11)
ContentSafetyService.cs (7)
209throw new InvalidOperationException( 228throw new InvalidOperationException( 257throw new InvalidOperationException( 284throw new InvalidOperationException( 312throw new InvalidOperationException( 332throw new InvalidOperationException( 370throw new InvalidOperationException(
GroundednessProEvaluator.cs (1)
89throw new InvalidOperationException(
src\Shared\Throw\Throw.cs (2)
398=> throw new InvalidOperationException(message); 410=> throw new InvalidOperationException(message, innerException);
UngroundedAttributesEvaluator.cs (1)
93throw new InvalidOperationException(
Microsoft.Extensions.AI.Integration.Tests (3)
src\Shared\Throw\Throw.cs (2)
398=> throw new InvalidOperationException(message); 410=> throw new InvalidOperationException(message, innerException);
VerbatimMultiPartHttpHandler.cs (1)
66throw new InvalidOperationException("Boundary not found.");
Microsoft.Extensions.AI.Ollama (8)
OllamaChatClient.cs (1)
110throw new InvalidOperationException($"Ollama error: {response.Error}");
OllamaEmbeddingGenerator.cs (2)
131throw new InvalidOperationException($"Ollama error: {response.Error}"); 136throw new InvalidOperationException($"Ollama generated {response.Embeddings?.Length ?? 0} embeddings but {inputs.Length} were expected.");
OllamaUtilities.cs (1)
70throw new InvalidOperationException($"Ollama error: {errorContent}");
src\Shared\EmptyCollections\EmptyReadOnlyList.cs (2)
55public T Current => throw new InvalidOperationException(); 56object IEnumerator.Current => throw new InvalidOperationException();
src\Shared\Throw\Throw.cs (2)
398=> throw new InvalidOperationException(message); 410=> throw new InvalidOperationException(message, innerException);
Microsoft.Extensions.AI.OpenAI (5)
src\Shared\EmptyCollections\EmptyReadOnlyList.cs (2)
55public T Current => throw new InvalidOperationException(); 56object IEnumerator.Current => throw new InvalidOperationException();
src\Shared\ServerSentEvents\ThrowHelper.cs (1)
21throw new InvalidOperationException("The enumerable may be enumerated only once.");
src\Shared\Throw\Throw.cs (2)
398=> throw new InvalidOperationException(message); 410=> throw new InvalidOperationException(message, innerException);
Microsoft.Extensions.AI.OpenAI.Tests (1)
IntegrationTestHelpers.cs (1)
27?? throw new InvalidOperationException("To use AzureOpenAI, set a value for OpenAI:Endpoint");
Microsoft.Extensions.AI.Templates.Tests (6)
Infrastructure\DotNetNewCommand.cs (1)
34throw new InvalidOperationException($"A {nameof(DotNetNewCommand)} should specify a custom hive with '{nameof(WithCustomHive)}()'.");
Infrastructure\TemplateExecutionTestClassFixtureBase.cs (1)
115throw new InvalidOperationException(
Infrastructure\TestCommand.cs (1)
30throw new InvalidOperationException($"The {nameof(TestCommand)} did not specify an executable file name.");
Infrastructure\WellKnownPaths.cs (2)
63throw new InvalidOperationException("Failed to establish root of the repository"); 76throw new InvalidOperationException($"Expected to find '{dotNetExeName}' at '{dotNetExePath}', but it was not found.");
ProjectRootHelper.cs (1)
30throw new InvalidOperationException("Could not determine the root of the test project.");
Microsoft.Extensions.AI.Tests (3)
ChatCompletion\FunctionInvokingChatClientTests.cs (3)
510AIFunctionFactory.Create(string () => throw new InvalidOperationException("Oh no!"), "Func1"), 902throw new InvalidOperationException("Unexpected iteration"); 1192throw new InvalidOperationException("This enumerable can only be enumerated once.");
Microsoft.Extensions.AmbientMetadata.Application (2)
src\Shared\Throw\Throw.cs (2)
398=> throw new InvalidOperationException(message); 410=> throw new InvalidOperationException(message, innerException);
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.ApiDescription.Tool.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.AsyncState (3)
AsyncState.cs (1)
76throw new InvalidOperationException("Context is not initialized");
src\Shared\Throw\Throw.cs (2)
398=> throw new InvalidOperationException(message); 410=> throw new InvalidOperationException(message, innerException);
Microsoft.Extensions.Caching.Abstractions (1)
DistributedCacheEntryOptions.cs (1)
86static void ThrowFrozen() => throw new InvalidOperationException("This instance has been frozen and cannot be mutated");
Microsoft.Extensions.Caching.Hybrid (10)
Internal\DefaultHybridCache.L2.cs (1)
258throw new InvalidOperationException($"Maximum cache length ({MaximumPayloadBytes} bytes) exceeded");
Internal\DefaultHybridCache.Serialization.cs (1)
46throw new InvalidOperationException($"No {nameof(IHybridCacheSerializer<T>)} configured for type '{typeof(T).Name}'");
Internal\DefaultHybridCache.Stampede.cs (1)
100throw new InvalidOperationException(
Internal\DefaultHybridCache.StampedeStateT.cs (3)
132new InvalidOperationException("Task should not be accessed for non-shared instances")); 162private static CacheItem<T> ThrowUnexpectedCacheItem() => throw new InvalidOperationException("Unexpected cache item"); 409throw new InvalidOperationException("Internal HybridCache failure: unable to reserve cache item to assign result");
Internal\RecyclableArrayBufferWriter.cs (2)
104=> throw new InvalidOperationException("Max length exceeded"); 203static void ThrowOutOfMemoryException() => throw new InvalidOperationException("Unable to grow buffer as requested");
src\Shared\Throw\Throw.cs (2)
398=> throw new InvalidOperationException(message); 410=> throw new InvalidOperationException(message, innerException);
Microsoft.Extensions.Caching.Memory (1)
MemoryCache.cs (1)
117throw new InvalidOperationException(SR.Format(SR.CacheEntryHasEmptySize, nameof(entry.Size), nameof(_options.SizeLimit)));
Microsoft.Extensions.Caching.SqlServer (2)
DatabaseOperations.cs (2)
383throw new InvalidOperationException("The absolute expiration value must be in the future."); 395throw new InvalidOperationException("Either absolute or sliding expiration needs " +
Microsoft.Extensions.Caching.StackExchangeRedis (1)
RedisCache.cs (1)
366_ = connection ?? throw new InvalidOperationException($"{nameof(connection)} cannot be null.");
Microsoft.Extensions.Compliance.Abstractions (2)
src\Shared\Throw\Throw.cs (2)
398=> throw new InvalidOperationException(message); 410=> throw new InvalidOperationException(message, innerException);
Microsoft.Extensions.Compliance.Redaction (8)
RedactorProvider.cs (1)
73throw new InvalidOperationException($"Couldn't find redactor of type {defaultRedactorType} in the dependency injection container.");
src\Shared\Data.Validation\LengthAttribute.cs (3)
98throw new InvalidOperationException($"{nameof(LengthAttribute)} requires a minimum length >= 0 (see field {validationContext.GetDisplayName()})"); 103throw new InvalidOperationException($"{nameof(LengthAttribute)} requires the minimum length to be less than maximum length (see field {validationContext.GetDisplayName()})"); 140throw new InvalidOperationException($"{nameof(LengthAttribute)} is not supported for fields of type {value.GetType()} (see field {validationContext.GetDisplayName()})");
src\Shared\Data.Validation\TimeSpanAttribute.cs (2)
121throw new InvalidOperationException($"{nameof(TimeSpanAttribute)} requires that the minimum value be less than the maximum value (see field {validationContext.GetDisplayName()})"); 158throw new InvalidOperationException($"{nameof(TimeSpanAttribute)} can only be used with fields of type TimeSpan (see field {validationContext.GetDisplayName()})");
src\Shared\Throw\Throw.cs (2)
398=> throw new InvalidOperationException(message); 410=> throw new InvalidOperationException(message, innerException);
Microsoft.Extensions.Compliance.Testing (2)
src\Shared\Throw\Throw.cs (2)
398=> throw new InvalidOperationException(message); 410=> throw new InvalidOperationException(message, innerException);
Microsoft.Extensions.Configuration (3)
ConfigurationRoot.cs (1)
133throw new InvalidOperationException(SR.Error_NoSources);
StreamConfigurationProvider.cs (2)
48throw new InvalidOperationException(SR.StreamConfigurationProvidersAlreadyLoaded); 53throw new InvalidOperationException(SR.StreamConfigurationSourceStreamCannotBeNull);
Microsoft.Extensions.Configuration.Abstractions (1)
ConfigurationExtensions.cs (1)
108throw new InvalidOperationException(SR.Format(SR.InvalidSectionName, key));
Microsoft.Extensions.Configuration.Binder (18)
ConfigurationBinder.cs (18)
243throw new InvalidOperationException(SR.Format(SR.Error_MissingConfig, 506throw new InvalidOperationException(SR.Format(SR.Error_FailedBinding, configValue, section.Path, type)); 562throw new InvalidOperationException(SR.Format(SR.Error_CannotActivateAbstractOrInterface, type)); 572throw new InvalidOperationException(SR.Format(SR.Error_MissingPublicInstanceConstructor, type)); 577throw new InvalidOperationException(SR.Format(SR.Error_MultipleParameterizedConstructors, type)); 587throw new InvalidOperationException(SR.Format(SR.Error_CannotBindToConstructorParameter, type, nameOfInvalidParameter)); 595throw new InvalidOperationException(SR.Format(SR.Error_ConstructorParametersDoNotMatchProperties, type, nameOfInvalidParameters)); 617throw new InvalidOperationException(SR.Format(SR.Error_FailedToActivate, type), ex); 620return instance ?? throw new InvalidOperationException(SR.Format(SR.Error_FailedToActivate, type)); 797throw new InvalidOperationException(SR.Format(SR.Error_GeneralErrorWhenBinding, 836throw new InvalidOperationException(SR.Format(SR.Error_GeneralErrorWhenBinding, 853throw new InvalidOperationException(SR.Format(SR.Error_UnsupportedMultidimensionalArray, type)); 892throw new InvalidOperationException(SR.Format(SR.Error_GeneralErrorWhenBinding, 963throw new InvalidOperationException(SR.Format(SR.Error_GeneralErrorWhenBinding, 1007error = new InvalidOperationException(SR.Format(SR.Error_FailedBinding, value, path, type), ex); 1023error = new InvalidOperationException(SR.Format(SR.Error_FailedBinding, value, path, type), ex); 1135throw new InvalidOperationException(SR.Format(SR.Error_ParameterBeingBoundToIsUnnamed, type)); 1155throw 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)
51throw new InvalidOperationException( 72throw 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 (18)
ServiceLookup\CallSiteChain.cs (1)
24throw new InvalidOperationException(CreateCircularDependencyExceptionMessage(serviceIdentifier));
ServiceLookup\CallSiteFactory.cs (9)
279throw new InvalidOperationException(SR.Format(SR.AotCannotCreateEnumerableValueType, itemType)); 495throw new InvalidOperationException(SR.InvalidServiceDescriptor); 575throw new InvalidOperationException(SR.Format(SR.NoConstructorMatch, implementationType)); 638throw new InvalidOperationException(string.Join( 651throw new InvalidOperationException( 694throw new InvalidOperationException(SR.InvalidServiceKeyType); 734throw new InvalidOperationException(SR.Format(SR.CannotResolveService, 762throw new InvalidOperationException(SR.Format(SR.AotCannotCreateGenericValueType, serviceType, typeArg)); 883throw 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])));
ServiceLookup\ThrowHelper.cs (3)
23throw new InvalidOperationException(SR.Format(SR.KeyedServiceAnyKeyUsedToResolveService, nameof(IServiceProvider), nameof(IServiceScopeFactory))); 30throw new InvalidOperationException(SR.Format(SR.NoServiceRegistered, serviceType)); 37throw new InvalidOperationException(SR.Format(SR.NoKeyedServiceRegistered, serviceType, keyType));
ServiceProvider.cs (1)
236throw new InvalidOperationException($"Error while validating the service descriptor '{descriptor}': {e.Message}", e);
Microsoft.Extensions.DependencyInjection.Abstractions (17)
ActivatorUtilities.cs (11)
56throw new InvalidOperationException(SR.CannotCreateAbstractClasses); 162throw new InvalidOperationException(SR.Format(SR.MultipleCtorsFoundWithBestLength, instanceType, bestLength)); 389throw new InvalidOperationException(SR.Format(SR.UnableToResolveService, type, requiredBy)); 569throw new InvalidOperationException(SR.Format(SR.CtorNotLocated, instanceType)); 607throw new InvalidOperationException(SR.Format(SR.MultipleCtorsFound, instanceType)); 763throw new InvalidOperationException(SR.KeyedServicesNotSupported); 783throw new InvalidOperationException(SR.KeyedServicesNotSupported); 864throw new InvalidOperationException(SR.Format(SR.UnableToResolveService, _constructor.Parameters[index].ParameterType, _constructor.Info.DeclaringType)); 908throw new InvalidOperationException(SR.Format(SR.MultipleCtorsMarkedWithAttribute, nameof(ActivatorUtilitiesConstructorAttribute))); 913throw new InvalidOperationException(SR.Format(SR.MarkedCtorMissingArgumentTypes, nameof(ActivatorUtilitiesConstructorAttribute))); 1216throw new InvalidOperationException(SR.KeyedServicesNotSupported);
ServiceCollection.cs (1)
124throw new InvalidOperationException(SR.ServiceCollectionReadOnly);
ServiceDescriptor.cs (1)
1076private static void ThrowNonKeyedDescriptor() => throw new InvalidOperationException(SR.NonKeyedDescriptorMisuse);
ServiceProviderKeyedServiceExtensions.cs (3)
31throw new InvalidOperationException(SR.KeyedServicesNotSupported); 51throw new InvalidOperationException(SR.KeyedServicesNotSupported); 72throw new InvalidOperationException(SR.KeyedServicesNotSupported);
ServiceProviderServiceExtensions.cs (1)
48throw new InvalidOperationException(SR.Format(SR.NoServiceRegistered, serviceType));
Microsoft.Extensions.DependencyInjection.AutoActivation (2)
src\Shared\Throw\Throw.cs (2)
398=> throw new InvalidOperationException(message); 410=> throw new InvalidOperationException(message, innerException);
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)
25throw new InvalidOperationException(SR.InvalidScope);
Metrics\ListenerSubscription.cs (1)
179throw new InvalidOperationException(SR.MoreThanOneWildcard);
Microsoft.Extensions.Diagnostics.ExceptionSummarization (2)
src\Shared\Throw\Throw.cs (2)
398=> throw new InvalidOperationException(message); 410=> throw new InvalidOperationException(message, innerException);
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.Common (2)
src\Shared\Throw\Throw.cs (2)
398=> throw new InvalidOperationException(message); 410=> throw new InvalidOperationException(message, innerException);
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.Diagnostics.Probes (7)
src\Shared\Data.Validation\LengthAttribute.cs (3)
98throw new InvalidOperationException($"{nameof(LengthAttribute)} requires a minimum length >= 0 (see field {validationContext.GetDisplayName()})"); 103throw new InvalidOperationException($"{nameof(LengthAttribute)} requires the minimum length to be less than maximum length (see field {validationContext.GetDisplayName()})"); 140throw new InvalidOperationException($"{nameof(LengthAttribute)} is not supported for fields of type {value.GetType()} (see field {validationContext.GetDisplayName()})");
src\Shared\Data.Validation\TimeSpanAttribute.cs (2)
121throw new InvalidOperationException($"{nameof(TimeSpanAttribute)} requires that the minimum value be less than the maximum value (see field {validationContext.GetDisplayName()})"); 158throw new InvalidOperationException($"{nameof(TimeSpanAttribute)} can only be used with fields of type TimeSpan (see field {validationContext.GetDisplayName()})");
src\Shared\Throw\Throw.cs (2)
398=> throw new InvalidOperationException(message); 410=> throw new InvalidOperationException(message, innerException);
Microsoft.Extensions.Diagnostics.ResourceMonitoring (11)
Linux\LinuxUtilizationParserCgroupV1.cs (1)
297_ => throw new InvalidOperationException(
Linux\LinuxUtilizationParserCgroupV2.cs (1)
442_ => throw new InvalidOperationException(
src\Shared\Data.Validation\LengthAttribute.cs (3)
98throw new InvalidOperationException($"{nameof(LengthAttribute)} requires a minimum length >= 0 (see field {validationContext.GetDisplayName()})"); 103throw new InvalidOperationException($"{nameof(LengthAttribute)} requires the minimum length to be less than maximum length (see field {validationContext.GetDisplayName()})"); 140throw new InvalidOperationException($"{nameof(LengthAttribute)} is not supported for fields of type {value.GetType()} (see field {validationContext.GetDisplayName()})");
src\Shared\Data.Validation\TimeSpanAttribute.cs (2)
121throw new InvalidOperationException($"{nameof(TimeSpanAttribute)} requires that the minimum value be less than the maximum value (see field {validationContext.GetDisplayName()})"); 158throw new InvalidOperationException($"{nameof(TimeSpanAttribute)} can only be used with fields of type TimeSpan (see field {validationContext.GetDisplayName()})");
src\Shared\Throw\Throw.cs (2)
398=> throw new InvalidOperationException(message); 410=> throw new InvalidOperationException(message, innerException);
Windows\Network\WindowsTcpStateInfo.cs (2)
127throw new InvalidOperationException( 134throw new InvalidOperationException(
Microsoft.Extensions.Diagnostics.ResourceMonitoring.Tests (9)
Linux\Disk\FakeDiskStatsReader.cs (1)
18throw new InvalidOperationException("No more values available.");
Linux\LinuxUtilizationProviderTests.cs (1)
361throw new InvalidOperationException("Simulated unhandled exception");
Providers\ConditionallyFaultProvider.cs (1)
31throw new InvalidOperationException(_errorGuid.ToString());
Providers\FaultProvider.cs (1)
21throw new InvalidOperationException();
Publishers\FaultPublisher.cs (1)
19throw new InvalidOperationException();
Windows\FakePerformanceCounter.cs (1)
23throw new InvalidOperationException("No more values available.");
Windows\WindowsContainerSnapshotProviderTests.cs (3)
210.Throws(new InvalidOperationException("We shouldn't hit here...")); 276.Throws(new InvalidOperationException("We shouldn't hit here...")); 281.Throws(new InvalidOperationException("We shouldn't hit here..."));
Microsoft.Extensions.Diagnostics.Testing (4)
Logging\FakeLoggerServiceProviderExtensions.cs (1)
21=> services.GetService<FakeLogCollector>() ?? throw new InvalidOperationException("No fake log collector registered");
Metrics\MetricCollector.cs (1)
113throw new InvalidOperationException($"MetricCollector can only be created for the following types: {str}.");
src\Shared\Throw\Throw.cs (2)
398=> throw new InvalidOperationException(message); 410=> throw new InvalidOperationException(message, innerException);
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)
238throw new InvalidOperationException(SR.BuildCalled);
HostBuilder.cs (2)
156throw new InvalidOperationException(SR.BuildCalled); 370throw new InvalidOperationException(SR.NullIServiceProvider);
Internal\ServiceFactoryAdapter.cs (2)
41throw new InvalidOperationException(SR.ResolverReturnedNull); 51throw new InvalidOperationException(SR.CreateBuilderCallBeforeCreateServiceProvider);
Microsoft.Extensions.Hosting.Testing (2)
src\Shared\Throw\Throw.cs (2)
398=> throw new InvalidOperationException(message); 410=> throw new InvalidOperationException(message, innerException);
Microsoft.Extensions.Hosting.WindowsServices (1)
WindowsServiceLifetime.cs (1)
104_delayStart.TrySetException(new InvalidOperationException("Stopped without starting"));
Microsoft.Extensions.Http (8)
DefaultHttpMessageHandlerBuilder.cs (1)
50throw new InvalidOperationException(message);
DefaultTypedHttpClientFactory.cs (1)
46throw new InvalidOperationException(SR.Format(SR.TypedClient_NoHttpClientCtor, typeof(TClient).Name), iox);
DependencyInjection\HttpClientBuilderExtensions.cs (2)
759throw new InvalidOperationException($"{nameof(AddTypedClient)} isn't supported with {nameof(HttpClientFactoryServiceCollectionExtensions.ConfigureHttpClientDefaults)}."); 777throw 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.Diagnostics (2)
src\Shared\EmptyCollections\EmptyReadOnlyList.cs (2)
55public T Current => throw new InvalidOperationException(); 56object IEnumerator.Current => throw new InvalidOperationException();
Microsoft.Extensions.Http.Diagnostics.Tests (3)
Logging\HttpClientLoggerTest.cs (3)
520var exception = new InvalidOperationException("test"); 973var exception = new InvalidOperationException("Test exception"); 1006Assert.Throws<NotSupportedException>(() => logger.LogRequestFailed(null, httpRequestMessage, null, new InvalidOperationException(), TimeSpan.Zero));
Microsoft.Extensions.Http.Polly (2)
PolicyHttpMessageHandler.cs (1)
183throw 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.Http.Resilience (9)
Resilience\Internal\ByAuthorityPipelineKeyProvider.cs (1)
16var url = requestMessage.RequestUri ?? throw new InvalidOperationException("The request message must have a URL specified.");
Routing\Internal\RoutingHelper.cs (1)
36throw new InvalidOperationException($"The item cannot be selected because the weights are not correctly calculated.");
src\Shared\Data.Validation\LengthAttribute.cs (3)
98throw new InvalidOperationException($"{nameof(LengthAttribute)} requires a minimum length >= 0 (see field {validationContext.GetDisplayName()})"); 103throw new InvalidOperationException($"{nameof(LengthAttribute)} requires the minimum length to be less than maximum length (see field {validationContext.GetDisplayName()})"); 140throw new InvalidOperationException($"{nameof(LengthAttribute)} is not supported for fields of type {value.GetType()} (see field {validationContext.GetDisplayName()})");
src\Shared\Data.Validation\TimeSpanAttribute.cs (2)
121throw new InvalidOperationException($"{nameof(TimeSpanAttribute)} requires that the minimum value be less than the maximum value (see field {validationContext.GetDisplayName()})"); 158throw new InvalidOperationException($"{nameof(TimeSpanAttribute)} can only be used with fields of type TimeSpan (see field {validationContext.GetDisplayName()})");
src\Shared\Throw\Throw.cs (2)
398=> throw new InvalidOperationException(message); 410=> throw new InvalidOperationException(message, innerException);
Microsoft.Extensions.Http.Resilience.Tests (5)
Hedging\HttpClientHedgingResiliencePredicatesTests.cs (2)
23Assert.False(HttpClientHedgingResiliencePredicates.IsTransientHttpException(new InvalidOperationException())); 32Assert.False(HttpClientHedgingResiliencePredicates.IsTransient(Outcome.FromException<HttpResponseMessage>(new InvalidOperationException())));
Polly\HttpRetryStrategyOptionsTests.cs (2)
28[new OperationCanceledExceptionMock(new InvalidOperationException()), default(CancellationToken), false], 121Outcome.FromException<HttpResponseMessage>(new InvalidOperationException()),
Resilience\ResilienceHandlerTest.cs (1)
157handler.InnerHandler = new TestHandlerStub((_, _) => throw 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); 843throw new InvalidOperationException(Resources.NullSecurityStamp); 2408throw 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.ML (4)
ModelLoaders\FileModelLoader.cs (2)
97if (_reloadToken == null) throw new InvalidOperationException("Start must be called on a ModelLoader before it can be used."); 103if (_model == null) throw new InvalidOperationException("Start must be called on a ModelLoader before it can be used.");
ModelLoaders\UriModelLoader.cs (2)
166if (!_started) throw new InvalidOperationException("Start must be called on a ModelLoader before it can be used."); 173if (!_started) throw new InvalidOperationException("Start must be called on a ModelLoader before it can be used.");
Microsoft.Extensions.ObjectPool.DependencyInjection (2)
src\Shared\Throw\Throw.cs (2)
398=> throw new InvalidOperationException(message); 410=> throw new InvalidOperationException(message, innerException);
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.Contextual (2)
src\Shared\Throw\Throw.cs (2)
398=> throw new InvalidOperationException(message); 410=> throw new InvalidOperationException(message, innerException);
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.Resilience (2)
src\Shared\Throw\Throw.cs (2)
398=> throw new InvalidOperationException(message); 410=> throw new InvalidOperationException(message, innerException);
Microsoft.Extensions.Resilience.Tests (2)
Resilience\ResilienceMetricsEnricherTests.cs (2)
41CreateSut().Enrich(CreateEnrichmentContext<string>(Outcome.FromException<string>(new InvalidOperationException { Source = "my-source" }))); 51CreateSut().Enrich(CreateEnrichmentContext<string>(Outcome.FromException<string>(new InvalidOperationException { Source = "my-source" })));
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.Extensions.ServiceDiscovery (8)
Http\HttpServiceEndpointResolver.cs (2)
37throw new InvalidOperationException("Cannot resolve an endpoint for a request which has no RequestUri"); 55throw new InvalidOperationException($"Unable to resolve endpoint for service {resolver.ServiceName}");
Http\ResolvingHttpDelegatingHandler.cs (2)
98throw new InvalidOperationException($"Endpoints of type {endPoint.GetType()} are not supported"); 121throw new InvalidOperationException($"The scheme '{scheme}' is not allowed.");
LoadBalancing\RoundRobinServiceEndpointSelector.cs (1)
25throw new InvalidOperationException("The endpoint collection contains no endpoints");
ServiceEndpointResolver.cs (1)
63throw new InvalidOperationException($"Unable to resolve endpoints for service {resolver.ServiceName}");
ServiceEndpointWatcher.cs (1)
301private static void ThrowNoProvidersConfigured() => throw new InvalidOperationException("No service endpoint providers are configured.");
ServiceEndpointWatcherFactory.cs (1)
50throw new InvalidOperationException($"No provider which supports the provided service name, '{serviceName}', has been configured.");
Microsoft.Extensions.ServiceDiscovery.Dns (2)
DnsServiceEndpointProvider.cs (1)
46throw new InvalidOperationException($"No DNS records were found for service '{ServiceName}' (DNS name: '{hostName}').");
Resolver\DnsResolver.cs (1)
845throw new InvalidOperationException("Buffer too small");
Microsoft.Extensions.ServiceDiscovery.Dns.Tests (11)
Resolver\LoopbackDnsServer.cs (10)
162throw new InvalidOperationException("Failed to write header"); 171throw new InvalidOperationException("Failed to encode domain name"); 175throw new InvalidOperationException("Failed to write question"); 184throw new InvalidOperationException("Failed to write answer"); 192throw new InvalidOperationException("Failed to write authority"); 200throw new InvalidOperationException("Failed to write additional records"); 246throw new InvalidOperationException("Failed to encode domain name"); 263throw new InvalidOperationException("Failed to encode SRV record"); 285throw new InvalidOperationException("Failed to encode SOA record"); 318throw new InvalidOperationException("Label length exceeds maximum of 63 bytes");
Resolver\TcpFailoverTests.cs (1)
56throw new InvalidOperationException("This forces closing the socket without writing any data");
Microsoft.Extensions.ServiceDiscovery.Dns.Tests.Fuzzing (2)
Fuzzers\WriteDomainNameRoundTripFuzzer.cs (2)
33throw new InvalidOperationException($"Read {read} bytes, but wrote {written} bytes"); 40throw new InvalidOperationException($"Domain name mismatch: {readName} != {domainName}");
Microsoft.Extensions.ServiceDiscovery.Tests (1)
ServiceEndpointResolverTests.cs (1)
227throw new InvalidOperationException("throwing");
Microsoft.Extensions.ServiceDiscovery.Yarp (1)
ServiceDiscoveryDestinationResolver.cs (1)
121throw new InvalidOperationException($"None of the specified schemes ('{string.Join(", ", specifiedSchemes)}') are allowed by configuration.");
Microsoft.Extensions.Telemetry (11)
Http\HttpRouteFormatter.cs (1)
152throw new InvalidOperationException(TelemetryCommonExtensions.UnsupportedEnumValueExceptionMessage);
Http\HttpRouteParser.cs (1)
260_ => throw new InvalidOperationException(TelemetryCommonExtensions.UnsupportedEnumValueExceptionMessage)
Logging\Import\LoggerRuleSelector.cs (1)
63throw new InvalidOperationException("Only one wildcard character is allowed in category name.");
Sampling\LogSamplingRuleSelector.cs (1)
44throw new InvalidOperationException("Only one wildcard character is allowed in category name.");
src\Shared\Data.Validation\LengthAttribute.cs (3)
98throw new InvalidOperationException($"{nameof(LengthAttribute)} requires a minimum length >= 0 (see field {validationContext.GetDisplayName()})"); 103throw new InvalidOperationException($"{nameof(LengthAttribute)} requires the minimum length to be less than maximum length (see field {validationContext.GetDisplayName()})"); 140throw new InvalidOperationException($"{nameof(LengthAttribute)} is not supported for fields of type {value.GetType()} (see field {validationContext.GetDisplayName()})");
src\Shared\Data.Validation\TimeSpanAttribute.cs (2)
121throw new InvalidOperationException($"{nameof(TimeSpanAttribute)} requires that the minimum value be less than the maximum value (see field {validationContext.GetDisplayName()})"); 158throw new InvalidOperationException($"{nameof(TimeSpanAttribute)} can only be used with fields of type TimeSpan (see field {validationContext.GetDisplayName()})");
src\Shared\Throw\Throw.cs (2)
398=> throw new InvalidOperationException(message); 410=> throw new InvalidOperationException(message, innerException);
Microsoft.Extensions.Telemetry.Abstractions (2)
src\Shared\Throw\Throw.cs (2)
398=> throw new InvalidOperationException(message); 410=> throw new InvalidOperationException(message, innerException);
Microsoft.Extensions.Telemetry.Tests (10)
Logging\ExtendedLoggerTests.cs (7)
473throw new InvalidOperationException("EM3"); 840var exception = logException ? new InvalidOperationException() : null; 880var exception = logException ? new InvalidOperationException() : null; 909throw new InvalidOperationException($"Uknown state type: {stateType}"); 1070throw new InvalidOperationException($"{_name}-Error occurred while creating scope."); 1082throw new InvalidOperationException($"{_name}-Error occurred while checking if logger is enabled."); 1102throw new InvalidOperationException($"{_name}-Error occurred while logging data.");
Logging\SerialExtendedLoggerTests.cs (1)
85throw new InvalidOperationException("I'M ANGRY!");
Sampling\RandomProbabilisticSamplerTests.cs (1)
16private readonly InvalidOperationException _dummyException = new("test.");
Sampling\TraceBasedSamplerTests.cs (1)
16private readonly InvalidOperationException _dummyException = new("test.");
Microsoft.Extensions.TimeProvider.Testing (2)
src\Shared\Throw\Throw.cs (2)
398=> throw new InvalidOperationException(message); 410=> throw new InvalidOperationException(message, innerException);
Microsoft.Extensions.TimeProvider.Testing.Tests (1)
FakeTimeProviderTests.cs (1)
550throw new InvalidOperationException();
Microsoft.Extensions.Validation (4)
RuntimeValidatableParameterInfoResolver.cs (1)
28throw new InvalidOperationException($"Encountered a parameter of type '{parameterInfo.ParameterType}' without a name. Parameters must have a name.");
ValidatablePropertyInfo.cs (2)
63var property = DeclaringType.GetProperty(Name) ?? throw new InvalidOperationException($"Property '{Name}' not found on type '{DeclaringType.Name}'."); 100throw new InvalidOperationException(
ValidatableTypeInfo.cs (1)
55throw new InvalidOperationException(
Microsoft.Extensions.Validation.GeneratorTests (7)
ValidationsGeneratorTestBase.cs (7)
93throw new InvalidOperationException("Could not resolve services from compilation."); 101var optionsInstance = services.GetService(optionsType) ?? throw new InvalidOperationException("Could not resolve IOptions<ValidationOptions>."); 105var service = (ValidationOptions)valueProperty.GetValue(optionsInstance) ?? throw new InvalidOperationException("Could not resolve ValidationOptions."); 113throw new InvalidOperationException("Could not resolve services from compilation."); 115var service = services.GetService(serviceType) ?? throw new InvalidOperationException("Could not resolve EndpointDataSource."); 442_hostTcs.TrySetException(new InvalidOperationException("The entry point exited without ever building an IHost.")); 481throw 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.");
Microsoft.Extensions.Validation.Tests (1)
ValidatableParameterInfoTests.cs (1)
429throw new InvalidOperationException("Test exception");
Microsoft.Extensions.Validation.ValidationsGenerator (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.Gen.ComplianceReports.Unit.Tests (2)
src\Shared\EmptyCollections\EmptyReadOnlyList.cs (2)
55public T Current => throw new InvalidOperationException(); 56object IEnumerator.Current => throw new InvalidOperationException();
Microsoft.Gen.ContextualOptions.Unit.Tests (2)
src\Shared\EmptyCollections\EmptyReadOnlyList.cs (2)
55public T Current => throw new InvalidOperationException(); 56object IEnumerator.Current => throw new InvalidOperationException();
Microsoft.Gen.Logging (1)
src\Generators\Shared\RoslynExtensions.cs (1)
139_ => throw new InvalidOperationException("Unreachable"),
Microsoft.Gen.Logging.Generated.Tests (5)
LogMethodTests.cs (5)
130ArgTestExtensions.Method4(logger, new InvalidOperationException("A")); 136ArgTestExtensions.Method5(logger, new InvalidOperationException("A"), new InvalidOperationException("B")); 142ArgTestExtensions.Method6(logger, new InvalidOperationException("A"), 2); 148ArgTestExtensions.Method7(logger, 1, new InvalidOperationException("B"));
Microsoft.Gen.Logging.Unit.Tests (3)
CompilationHelper.cs (1)
60throw new InvalidOperationException();
src\Shared\EmptyCollections\EmptyReadOnlyList.cs (2)
55public T Current => throw new InvalidOperationException(); 56object IEnumerator.Current => throw new InvalidOperationException();
Microsoft.Gen.MetadataExtractor (1)
src\Generators\Microsoft.Gen.MetricsReports\MetricDefinitionEmitter.cs (1)
143throw new InvalidOperationException($"An exception occurred during metric report generation {e.GetType()}:{e.Message}.");
Microsoft.Gen.MetadataExtractor.Unit.Tests (2)
src\Shared\EmptyCollections\EmptyReadOnlyList.cs (2)
55public T Current => throw new InvalidOperationException(); 56object IEnumerator.Current => throw new InvalidOperationException();
Microsoft.Gen.Metrics (1)
src\Generators\Shared\RoslynExtensions.cs (1)
139_ => throw new InvalidOperationException("Unreachable"),
Microsoft.Gen.Metrics.Unit.Tests (2)
src\Shared\EmptyCollections\EmptyReadOnlyList.cs (2)
55public T Current => throw new InvalidOperationException(); 56object IEnumerator.Current => throw new InvalidOperationException();
Microsoft.Gen.MetricsReports (1)
MetricDefinitionEmitter.cs (1)
143throw new InvalidOperationException($"An exception occurred during metric report generation {e.GetType()}:{e.Message}.");
Microsoft.Gen.MetricsReports.Unit.Tests (2)
src\Shared\EmptyCollections\EmptyReadOnlyList.cs (2)
55public T Current => throw new InvalidOperationException(); 56object IEnumerator.Current => throw new InvalidOperationException();
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.LibraryImportGenerator.Downlevel (1)
src\libraries\Common\src\Roslyn\GetBestTypeByMetadataName.cs (1)
184_ => throw new InvalidOperationException("Unreachable"),
Microsoft.Interop.SourceGeneration (11)
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)
192throw new InvalidOperationException(SR.GraphHasCycles);
Marshalling\MarshallingGeneratorExtensions.cs (3)
27_ => throw new InvalidOperationException() 100_ => 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()
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."); 417throw new InvalidOperationException($"The type {type.Name} contains more than one " + 456throw new InvalidOperationException($"The assembly '{assemblyKey.AssemblyName}' contains more than one " +
JSRuntime.cs (1)
357throw new InvalidOperationException($"{dotNetObjectReference.GetType().Name} is already being tracked by a different instance of {nameof(JSRuntime)}." +
Microsoft.JSInterop.Tests (1)
Infrastructure\DotNetDispatcherTest.cs (1)
936=> throw new InvalidOperationException("Shouldn't be called");
Microsoft.Maui (44)
Converters\CornerRadiusTypeConverter.cs (1)
69 throw new InvalidOperationException($"Cannot convert \"{strValue}\" into {typeof(CornerRadius)}");
Converters\EasingTypeConverter.cs (1)
46 _ => throw new InvalidOperationException($"Cannot convert \"{strValue}\" into {typeof(Easing)}")
Converters\FlexEnumsConverters.cs (7)
36 throw new InvalidOperationException(string.Format("Cannot convert \"{0}\" into {1}", strValue, typeof(FlexJustify))); 71 throw new InvalidOperationException(string.Format("Cannot convert \"{0}\" into {1}", strValue, typeof(FlexDirection))); 110 throw new InvalidOperationException(string.Format("Cannot convert \"{0}\" into {1}", strValue, typeof(FlexAlignContent))); 145 throw new InvalidOperationException(string.Format("Cannot convert \"{0}\" into {1}", strValue, typeof(FlexAlignItems))); 180 throw new InvalidOperationException(string.Format("Cannot convert \"{0}\" into {1}", strValue, typeof(FlexAlignSelf))); 213 throw new InvalidOperationException(string.Format("Cannot convert \"{0}\" into {1}", strValue, typeof(FlexWrap))); 255 throw new InvalidOperationException(string.Format("Cannot convert \"{0}\" into {1}", strValue, typeof(FlexBasis)));
Converters\KeyboardTypeConverter.cs (1)
41 throw new InvalidOperationException(string.Format("Cannot convert \"{0}\" into {1}", strValue, typeof(Keyboard)));
Converters\ThicknessTypeConverter.cs (1)
90 throw new InvalidOperationException($"Cannot convert \"{strValue}\" into {typeof(Thickness)}");
Fonts\FileSystemEmbeddedFontLoader.cs (1)
63 throw new InvalidOperationException("ResourceStream was null.");
Fonts\FontRegistrar.cs (2)
82 throw new InvalidOperationException("Font loader was not set on the font registrar."); 94 throw new InvalidOperationException("Font loader was not set on the font registrar.");
Handlers\Element\ElementHandlerOfT.cs (2)
21 get => (TPlatformView?)base.PlatformView ?? throw new InvalidOperationException($"PlatformView cannot be null here"); 27 get => (TVirtualView?)base.VirtualView ?? throw new InvalidOperationException($"VirtualView cannot be null here");
Handlers\ElementHandlerExtensions.cs (3)
23 throw new InvalidOperationException($"Unable to convert {elementHandler} to {typeof(PlatformView)}"); 28 throw new InvalidOperationException($"Unable to find the context. The {nameof(ElementHandler.MauiContext)} property should have been set by the host."); 31 throw new InvalidOperationException($"Unable to find the service provider. The {nameof(ElementHandler.MauiContext)} property should have been set by the host.");
Handlers\HybridWebView\HybridWebViewHandler.cs (4)
175 var invokeTarget = VirtualView.InvokeJavaScriptTarget ?? throw new InvalidOperationException($"The {nameof(IHybridWebView)}.{nameof(IHybridWebView.InvokeJavaScriptTarget)} property must have a value in order to invoke a .NET method from JavaScript."); 176 var invokeTargetType = VirtualView.InvokeJavaScriptType ?? throw new InvalidOperationException($"The {nameof(IHybridWebView)}.{nameof(IHybridWebView.InvokeJavaScriptType)} property must have a value in order to invoke a .NET method from JavaScript."); 243 throw new InvalidOperationException($"The method {requestMethodName} couldn't be found on the {nameof(jsInvokeTarget)} of type {jsInvokeTarget.GetType().FullName}."); 248 throw new InvalidOperationException($"The number of parameters on {nameof(jsInvokeTarget)}'s method {requestMethodName} ({dotnetParams.Length}) doesn't match the number of values passed from JavaScript code ({requestParams.Length}).");
Handlers\HybridWebView\HybridWebViewTaskManager.cs (1)
23 throw new InvalidOperationException($"Unable to add a new task with new ID {taskIdString} to the task manager.");
Handlers\View\ViewHandlerOfT.cs (2)
36 get => (TPlatformView?)base.PlatformView ?? throw new InvalidOperationException($"PlatformView cannot be null here"); 42 get => (TVirtualView?)base.VirtualView ?? throw new InvalidOperationException($"VirtualView cannot be null here");
Hosting\ImageSources\ImageSourceServiceProvider.cs (1)
81 throw new InvalidOperationException($"Unable to find the image source type because none of the interfaces on {type.Name} were derived from {nameof(IImageSource)}.");
Hosting\ImageSources\ImageSourceServiceProviderExtensions.cs (1)
28 throw new InvalidOperationException($"Unable to find a image source service for {imageSourceType}.");
Hosting\ImageSources\ImageSourceToImageSourceServiceTypeMapping.cs (2)
44 ?? throw new InvalidOperationException($"Unable to find a {nameof(IImageSourceService)} corresponding to {type}. Please register a service for {type} using `ImageSourceServiceCollectionExtensions.AddService`"); 74 throw new InvalidOperationException($"Unable to find a single {nameof(IImageSourceService)} corresponding to {type}. There is an ambiguous match between {bestImageSourceService} ({bestImageSource}) and {imageSourceService} ({imageSource}).");
Hosting\Internal\MauiFactory.cs (1)
63 throw new InvalidOperationException($"You need to provide an {nameof(item.ImplementationType)}, an {nameof(item.ImplementationFactory)} or an {nameof(item.ImplementationInstance)}.");
Hosting\Internal\RegisteredHandlerServiceTypeSet.cs (1)
70 throw new InvalidOperationException($"Unable to find a single {nameof(IElementHandler)} corresponding to {type}. There is an ambiguous match between {bestVirtualViewHandlerServiceType} and {registeredViewHandlerServiceType}.");
Hosting\MauiHandlersCollectionExtensions.cs (2)
24 throw new InvalidOperationException($"Unable to add handler mapping for {viewType} and {handlerType}. Please ensure that {viewType} implements {nameof(IElement)} and {handlerType} implements {nameof(IElementHandler)}."); 82 throw new InvalidOperationException($"Unable to add handler mapping for {viewType} and {handlerType}. Please ensure that {viewType} implements {nameof(IElement)} and {handlerType} implements {nameof(IElementHandler)}.");
Layouts\Flex.cs (3)
432 throw new InvalidOperationException("Layout() must be called on a root item (that hasn't been added to another item)"); 434 throw new InvalidOperationException("Layout() must be called on an item that has proper values for the Width and Height properties"); 436 throw new InvalidOperationException("Layout() cannot be called on an item that has the SelfSizing property set");
Platform\ElementExtensions.cs (4)
110 _ = view.Handler ?? throw new InvalidOperationException($"{nameof(MauiContext)} should have been set on parent."); 121 return (view.Handler?.PlatformView as PlatformView) ?? throw new InvalidOperationException($"Unable to convert {view} to {typeof(PlatformView)}"); 131 throw new InvalidOperationException($"Unable to convert {view} to {typeof(PlatformView)}"); 134 return view.ToPlatform() ?? throw new InvalidOperationException($"Unable to convert {view} to {typeof(PlatformView)}");
Primitives\LockableObservableListWrapper.cs (1)
33 throw new InvalidOperationException("The Items list cannot be manipulated if the ItemsSource property is set");
Primitives\RetrievePlatformValueRequest.cs (2)
17 public T Result => _hasResult ? _result! : throw new InvalidOperationException("No result value was set."); 27 throw new InvalidOperationException("Request already had a result value set.");
Microsoft.Maui.Controls (147)
Application\Application.cs (2)
319 throw new InvalidOperationException("Setting a Parent on Application is invalid."); 451 throw new InvalidOperationException($"Both {nameof(MainPage)} was set and {nameof(Application.CreateWindow)} was overridden to provide a page.");
BindableObject.cs (1)
819 throw new InvalidOperationException($"The BindableProperty \"{property.PropertyName}\" is readonly.");
BindableObjectExtensions.cs (2)
143 throw new InvalidOperationException($"Call to SetBinding<{typeof(TSource)}, {typeof(TProperty)}> could not be intercepted because the feature has been disabled. Consider removing the DisableMauiAnalyzers property from your project file or set the _MauiBindingInterceptorsSupport property to true instead."); 146 throw new InvalidOperationException($"Call to SetBinding<{typeof(TSource)}, {typeof(TProperty)}> was not intercepted.");
Binding.cs (1)
141 throw new InvalidOperationException(message);
BindingBase.Create.cs (2)
33 throw new InvalidOperationException($"Call to Create<{typeof(TSource)}, {typeof(TProperty)}> could not be intercepted because the feature has been disabled. Consider removing the DisableMauiAnalyzers property from your project file or set the _MauiBindingInterceptorsSupport property to true instead."); 36 throw new InvalidOperationException($"Call to Create<{typeof(TSource)}, {typeof(TProperty)}>() was not intercepted.");
BindingBase.cs (1)
125 throw new InvalidOperationException("Cannot change a binding while it's applied");
BindingExpression.cs (2)
86 throw new InvalidOperationException("Binding instances cannot be reused"); 89 throw new InvalidOperationException("Binding instances cannot be reused");
Button\Button.cs (2)
585 throw new InvalidOperationException($"Cannot convert null into {typeof(ButtonContentLayout)}"); 590 throw new InvalidOperationException($"Cannot convert \"{strValue}\" into {typeof(ButtonContentLayout)}");
ColumnDefinitionCollectionTypeConverter.cs (1)
34 throw new InvalidOperationException(string.Format("Cannot convert \"{0}\" into {1}", strValue, typeof(ColumnDefinitionCollection)));
CompressedLayout.cs (1)
30 throw new InvalidOperationException("IsHeadless cannot be modified when the view is rendered");
DataTemplate.cs (1)
84 throw new InvalidOperationException("Binding and Value found for " + kvp.Key.PropertyName);
DecorableTextElement.cs (2)
29 throw new InvalidOperationException(string.Format("Cannot convert \"{0}\" into {1}", strValue, typeof(TextDecorations))); 43 throw new InvalidOperationException(string.Format("Cannot convert \"{0}\" into {1}", item, typeof(TextDecorations)));
DispatcherExtensions.cs (2)
47 throw new InvalidOperationException("BindableObject was not instantiated on a thread with a dispatcher nor does the current application have a dispatcher."); 104 throw new InvalidOperationException("The dispatcher was not found and the current application does not have a dispatcher.");
DoubleCollectionConverter.cs (1)
41 throw new InvalidOperationException(string.Format("Cannot convert \"{0}\" into {1}", d, typeof(double)));
EffectiveFlowDirectionExtensions.cs (2)
38 throw new InvalidOperationException($"Cannot convert {self} to {nameof(EffectiveFlowDirection)}."); 49 throw new InvalidOperationException($"Cannot convert {self} to {nameof(FlowDirection)}.");
Element\Element.cs (6)
88 throw new InvalidOperationException($"{nameof(AutomationId)} may only be set one time."); 519 throw new InvalidOperationException("this element is not in a namescope"); 526 var namescope = GetNameScope() ?? throw new InvalidOperationException("this element is not in a namescope"); 533 var namescope = GetNameScope() ?? throw new InvalidOperationException("this element is not in a namescope"); 828 throw new InvalidOperationException("Cannot attach Effect to multiple sources"); 1012 throw new InvalidOperationException("Handler is already being set elsewhere");
ElementTemplate.cs (1)
85 throw new InvalidOperationException("Cannot call CreateContent directly on a DataTemplateSelector");
FileImageSourceConverter.cs (1)
23 throw new InvalidOperationException(string.Format("Cannot convert \"{0}\" into {1}", strValue, typeof(FileImageSource)));
FlowDirectionConverter.cs (1)
32 throw new InvalidOperationException($"Cannot convert \"{strValue}\" into {typeof(FlowDirection)}");
FlyoutPage\FlyoutPage.cs (9)
53 throw new InvalidOperationException("Detail must not already have a parent."); 101 throw new InvalidOperationException("Title property must be set on Flyout page"); 107 throw new InvalidOperationException("Flyout must not already have a parent."); 148 throw new InvalidOperationException("Detail must be set before using a FlyoutPage"); 160 throw new InvalidOperationException("Flyout must be set before using a FlyoutPage"); 201 throw new InvalidOperationException("Flyout and Detail must be set before using a FlyoutPage"); 255 throw new InvalidOperationException("Flyout and Detail must be set before adding FlyoutPage to a container"); 287 throw new InvalidOperationException(string.Format("Can't change IsPresented when setting {0}", fp.FlyoutLayoutBehavior)); 293 throw new InvalidOperationException(string.Format("Can't change IsPresented when setting {0}", fp.FlyoutLayoutBehavior));
FontAttributes.cs (1)
63 throw new InvalidOperationException(string.Format("Cannot convert \"{0}\" into {1}", originalvalue, typeof(FontAttributes)));
FontSizeConverter.cs (2)
62 throw new InvalidOperationException(string.Format("Cannot convert \"{0}\" into {1}", value, typeof(double))); 100 throw new InvalidOperationException(string.Format("Cannot convert \"{0}\" into {1}", strValue, typeof(double)));
Hosting\Effects\AppHostBuilderExtensions.cs (1)
24 throw new InvalidOperationException(
ImageSourceConverter.cs (1)
31 throw new InvalidOperationException(string.Format("Cannot convert \"{0}\" into {1}", strValue, typeof(ImageSource)));
ImmutableBrush.cs (1)
27 throw new InvalidOperationException("Parent cannot be set on this Brush.");
Interactivity\Behavior.cs (1)
31 throw new InvalidOperationException("bindable not an instance of AssociatedType");
Interactivity\BindingCondition.cs (2)
30 throw new InvalidOperationException("Cannot change Binding once the Condition has been applied."); 44 throw new InvalidOperationException("Cannot change Value once the Condition has been applied.");
Interactivity\Condition.cs (2)
25 throw new InvalidOperationException("The same condition instance cannot be reused"); 38 throw new InvalidOperationException("What is sealed cannot be unsealed.");
Interactivity\DataTrigger.cs (2)
26 throw new InvalidOperationException("Cannot change Binding once the Trigger has been applied."); 48 throw new InvalidOperationException("Cannot change Value once the Trigger has been applied.");
Interactivity\EventTrigger.cs (1)
41 throw new InvalidOperationException("Event cannot be changed once the Trigger has been applied");
Interactivity\PropertyCondition.cs (2)
32 throw new InvalidOperationException("Cannot change Property once the Trigger has been applied."); 63 throw new InvalidOperationException("Cannot change Value once the Trigger has been applied.");
Interactivity\Trigger.cs (2)
26 throw new InvalidOperationException("Cannot change Property once the Trigger has been applied."); 48 throw new InvalidOperationException("Cannot change Value once the Trigger has been applied.");
Interactivity\TriggerBase.cs (9)
43 throw new InvalidOperationException("What is sealed cannot be unsealed."); 64 throw new InvalidOperationException("bindable not an instance of AssociatedType"); 145 throw new InvalidOperationException("This list is ReadOnly"); 152 throw new InvalidOperationException("This list is ReadOnly"); 179 throw new InvalidOperationException("Can't change this back to non readonly"); 187 throw new InvalidOperationException("This list is ReadOnly"); 209 throw new InvalidOperationException("This list is ReadOnly"); 219 throw new InvalidOperationException("This list is ReadOnly"); 227 throw new InvalidOperationException("This list is ReadOnly");
Items\CarouselLayoutTypeConverter.cs (1)
27 throw new InvalidOperationException($"Cannot convert \"{strValue}\" into {typeof(LinearItemsLayout)}");
Items\ItemsLayoutTypeConverter.cs (1)
53 throw new InvalidOperationException($"Cannot convert \"{strValue}\" into {typeof(IItemsLayout)}");
Items\MarshalingObservableCollection.cs (1)
143 throw new InvalidOperationException($"Cannot guarantee collection accuracy for Resets which do not use {nameof(ResetNotifyCollectionChangedEventArgs)}");
Layout\BoundsTypeConverter.cs (1)
53 throw new InvalidOperationException($"Cannot convert \"{value}\" into {typeof(Rect)}");
LayoutOptionsConverter.cs (2)
30 throw new InvalidOperationException($"Cannot convert \"{strValue}\" into {typeof(LayoutOptions)}"); 56 throw new InvalidOperationException($"Cannot convert \"{strValue}\" into {typeof(LayoutOptions)}");
LegacyLayouts\ConstraintTypeConverter.cs (1)
25 throw new InvalidOperationException(string.Format("Cannot convert \"{0}\" into {1}", strValue, typeof(Constraint)));
LegacyLayouts\Layout.cs (1)
652 throw new InvalidOperationException("Cannot add self to own child collection.");
LegacyLayouts\RelativeLayout.cs (1)
265 throw new InvalidOperationException("Views that have relationships to or from them must be kept in the RelativeLayout.");
ListProxy.cs (2)
332 throw new InvalidOperationException("You must call UpdateNonNotifyingList() after updating a list that does not implement INotifyCollectionChanged", ioex); 388 throw new InvalidOperationException();
ListView\ListView.cs (1)
403 throw new InvalidOperationException("Grouping is not enabled");
MultiBinding.cs (2)
139 throw new InvalidOperationException("Bindings is null"); 142 throw new InvalidOperationException("Cannot apply MultiBinding because both Converter and StringFormat are null.");
NavigationPage\NavigationPage.cs (2)
650 throw new InvalidOperationException("Pending Navigations still processing"); 874 throw new InvalidOperationException("Cannot remove root page when it is also the currently displayed page.");
NavigationPage\NavigationPage.Legacy.cs (1)
237 throw new InvalidOperationException("Cannot remove root page when it is also the currently displayed page.");
NavigationProxy.cs (2)
134 throw new InvalidOperationException("Page must not already have a parent."); 148 throw new InvalidOperationException("Page must not already have a parent.");
Page\Page.cs (1)
554 throw new InvalidOperationException("Parent of a Page must also be a Page");
Platform\ModalNavigationManager\ModalNavigationManager.cs (3)
22 _platformModalPages.Count > 0 ? _platformModalPages[_platformModalPages.Count - 1] : (_window.Page ?? throw new InvalidOperationException("Current Window isn't loaded")); 25 _platformModalPages.Count > 0 ? _platformModalPages[_platformModalPages.Count - 1] : throw new InvalidOperationException("Modal Stack is Empty"); 201 throw new InvalidOperationException("PopModalAsync failed because modal stack is currently empty.");
Platform\PlatformEffect.cs (1)
21 _ = Element ?? throw new InvalidOperationException("Element cannot be null here");
PlatformBindingHelpers.cs (1)
86 throw new InvalidOperationException(Format("Native Binding on {0}.{1} failed due to missing or inaccessible property", target.GetType(), targetProperty));
PlatformConfiguration\AndroidSpecific\TabbedPage.cs (1)
144 throw new global::System.InvalidOperationException("Changing the tabs placement after it's been set is not supported.");
Profiler.cs (1)
124 throw new InvalidOperationException(
RadioButton\RadioButton.Mapper.cs (1)
10 IMauiContext MauiContext => Handler?.MauiContext ?? throw new InvalidOperationException("MauiContext not set");
Registrar.cs (1)
522 throw new InvalidOperationException($"{rendererType} will work with AddHandler. Please use AddHandler instead of AddCompatibilityRenderer.");
RelativeBindingSource.cs (2)
25 throw new InvalidOperationException( 109 throw new InvalidOperationException();
ResourceDictionary.cs (2)
39 throw new InvalidOperationException("Source can only be set from XAML."); // through SetSource 61 throw new InvalidOperationException("ResourceDictionary.SetAndLoadSource was not initialized");
RowDefinitionCollectionTypeConverter.cs (1)
34 throw new InvalidOperationException(string.Format("Cannot convert \"{0}\" into {1}", strValue, typeof(RowDefinitionCollection)));
ShadowTypeConverter.cs (5)
127 throw new InvalidOperationException($"Cannot convert \"{strValue}\" into {typeof(Shadow)}.", ex); 130 throw new InvalidOperationException($"Cannot convert \"{strValue}\" into {typeof(IShadow)}."); 160 throw new InvalidOperationException("Cannot convert Shadow to string: Brush is not a valid SolidColorBrush or has no Color."); 166 throw new InvalidOperationException($"Cannot convert \"{value}\" into string."); 183 throw new InvalidOperationException("Cannot convert Shadow to string: Brush is not a valid SolidColorBrush or has no Color.");
Shapes\Matrix.cs (1)
259 throw new InvalidOperationException();
Shapes\PointCollectionConverter.cs (2)
52 throw new InvalidOperationException(string.Format("Cannot convert \"{0}\" into {1}", point, typeof(double))); 56 throw new InvalidOperationException(string.Format("Cannot convert string into PointCollection"));
Shapes\StrokeShapeTypeConverter.cs (1)
134 throw new InvalidOperationException($"Cannot convert \"{strValue}\" into {typeof(Shape)}");
Shell\Shell.cs (1)
1002 throw new InvalidOperationException($"Unable to determine the current Shell instance you want to use. Please access Shell via the Windows property on {Application.Current.GetType()}.");
Shell\ShellContent.cs (2)
96 throw new InvalidOperationException($"No Content found for {nameof(ShellContent)}, Title:{Title}, Route {Route}"); 317 throw new InvalidOperationException($"{nameof(ShellContent)} {nameof(Content)} should be of type {nameof(Page)}. Title {shellContent?.Title}, Route {shellContent?.Route} ");
Shell\ShellNavigatingEventArgs.cs (1)
58 throw new InvalidOperationException("Deferral has already been completed");
Shell\ShellNavigationQueryParameters.cs (1)
38 throw new InvalidOperationException($"ShellNavigationQueryParameters are ReadOnly");
Shell\ShellSection.cs (3)
774 throw new InvalidOperationException("Can't pop last page off stack"); 1245 throw new InvalidOperationException("Pending Navigations still processing"); 1253 _ = _handlerBasedNavigationCompletionSource ?? throw new InvalidOperationException("Mismatched Navigation finished");
Span.cs (1)
190 throw new InvalidOperationException($"{gesture.GetType().Name} is not supported on a {nameof(Span)}");
TemplateBinding.cs (1)
92 throw new InvalidOperationException();
TextAlignment.cs (1)
41 throw new InvalidOperationException(string.Format("Cannot convert \"{0}\" into {1}", strValue, typeof(TextAlignment)));
Toolbar\Toolbar.Mapper.cs (1)
14 IMauiContext MauiContext => Handler?.MauiContext ?? throw new InvalidOperationException("MauiContext not set");
TypeConversionHelper.cs (2)
55 convertedValue = converter.ConvertTo(value, targetType) ?? throw new InvalidOperationException($"The {converter.GetType()} returned null when converting {valueType} to {targetType}"); 61 convertedValue = converter.ConvertFrom(value) ?? throw new InvalidOperationException($"The {converter.GetType()} returned null when converting from {valueType}");
TypedBinding.cs (1)
192 throw new InvalidOperationException(message);
View\View.cs (1)
276 throw new InvalidOperationException($"Only one {nameof(PinchGestureRecognizer)} per view is allowed");
ViewExtensions.cs (1)
305 => element.FindMauiContext(fallbackToAppMauiContext) ?? throw new InvalidOperationException($"{nameof(IMauiContext)} not found.");
VisualElement\VisualElement.cs (2)
2188 throw new InvalidOperationException("Handler must be of type IViewHandler"); 2457 throw new InvalidOperationException(string.Format("Cannot convert \"{0}\" into {1}.", strValue, typeof(bool)));
VisualStateManager.cs (3)
173 throw new InvalidOperationException("VisualStateGroup Names must be unique"); 198 throw new InvalidOperationException("VisualState Names must be unique"); 556 throw new InvalidOperationException("State names may not be null or empty");
WebView\WebViewSourceTypeConverter.cs (1)
23 throw new InvalidOperationException(string.Format("Cannot convert \"{0}\" into {1}", strValue, typeof(UrlWebViewSource)));
Window\Window.cs (13)
317 Handler?.MauiContext ?? throw new InvalidOperationException("MauiContext is null."); 411 set => throw new InvalidOperationException("A window cannot set a window."); 415 Page ?? throw new InvalidOperationException("No page was set on the window."); 490 throw new InvalidOperationException("Window was already created"); 503 throw new InvalidOperationException("Window was already activated"); 513 throw new InvalidOperationException("Window was already deactivated"); 530 throw new InvalidOperationException("Window was already destroyed"); 689 : throw new InvalidOperationException($"{name} cannot be less than zero."); 702 throw new InvalidOperationException("InsertPageBefore is not supported, please use a NavigationPage."); 707 throw new InvalidOperationException("PushAsync is not supported, please use a NavigationPage."); 712 throw new InvalidOperationException("PopAsync is not supported, please use a NavigationPage."); 717 throw new InvalidOperationException("PopToRootAsync is not supported, please use a NavigationPage."); 722 throw new InvalidOperationException("RemovePage is not supported, please use a NavigationPage.");
Microsoft.Maui.Controls.BindingSourceGen (1)
Result.cs (1)
7 public T Value => OptionalValue ?? throw new InvalidOperationException("Result does not contain a value.");
Microsoft.Maui.Controls.Build.Tasks (1)
NodeILExtensions.cs (1)
344 throw new InvalidOperationException();
Microsoft.Maui.Controls.Xaml (4)
MarkupExtensions\AppThemeBindingExtension.cs (1)
73 ?? throw new InvalidOperationException("Cannot determine property to provide the value for.");
MarkupExtensions\ArrayExtension.cs (1)
27 throw new InvalidOperationException("Type argument mandatory for x:Array extension");
MarkupExtensions\OnIdiomExtension.cs (1)
60 ?? throw new InvalidOperationException("Cannot determine property to provide the value for.");
MarkupExtensions\OnPlatformExtension.cs (1)
70 ?? throw new InvalidOperationException("Cannot determine property to provide the value for.");
Microsoft.Maui.Essentials (7)
Accelerometer\Accelerometer.shared.cs (1)
225 throw new InvalidOperationException("Accelerometer has already been started.");
Barometer\Barometer.shared.cs (1)
204 throw new InvalidOperationException("Barometer has already been started.");
Compass\Compass.shared.cs (1)
271 throw new InvalidOperationException("Compass has already been started.");
FileSystem\FileSystem.shared.cs (1)
274 throw new InvalidOperationException($"Unable to determine the file name from '{FullPath}'.");
Gyroscope\Gyroscope.shared.cs (1)
207 throw new InvalidOperationException("Gyroscope has already been started.");
Magnetometer\Magnetometer.shared.cs (1)
211 throw new InvalidOperationException("Magnetometer has already been started.");
OrientationSensor\OrientationSensor.shared.cs (1)
234 throw new InvalidOperationException("Orientation sensor has already been started.");
Microsoft.Maui.Graphics (7)
Color.cs (1)
587 throw new InvalidOperationException($"Cannot convert \"{value}\" into {typeof(Color)}");
Converters\PointFTypeConverter.cs (1)
34 throw new InvalidOperationException(string.Format("Cannot convert \"{0}\" into {1}", value, typeof(PointF)));
Converters\PointTypeConverter.cs (1)
34 throw new InvalidOperationException(string.Format("Cannot convert \"{0}\" into {1}", value, typeof(Point)));
Converters\RectFTypeConverter.cs (1)
28 throw new InvalidOperationException(string.Format("Cannot convert \"{0}\" into {1}", value, typeof(RectF)));
Converters\RectTypeConverter.cs (1)
29 throw new InvalidOperationException(string.Format("Cannot convert \"{0}\" into {1}", value, typeof(Rect)));
Converters\SizeFTypeConverter.cs (1)
27 throw new InvalidOperationException(string.Format("Cannot convert \"{0}\" into {1}", value, typeof(SizeF)));
Converters\SizeTypeConverter.cs (1)
27 throw new InvalidOperationException(string.Format("Cannot convert \"{0}\" into {1}", value, typeof(Size)));
Microsoft.Maui.Graphics.Skia (1)
SkiaBitmapExportContext.cs (1)
39 throw new InvalidOperationException("Unable to create a Skia surface.");
Microsoft.Maui.Graphics.Win2D.WinUI.Desktop (2)
src\Graphics\src\Graphics\Platforms\Windows\AsyncPump.cs (2)
42 throw new InvalidOperationException("No task provided."); 73 throw new InvalidOperationException("No task provided.");
Microsoft.Maui.Resizetizer (2)
SkiaSharpAppIconTools.cs (1)
21 throw new InvalidOperationException("An app icon needs at least one image.");
SkiaSharpTools.cs (1)
164 throw new InvalidOperationException("The canvas size cannot be calculated if there is no size to start from (DPI size, BaseSize or image size).");
Microsoft.ML.AutoML (6)
Experiment\Experiment.cs (1)
191throw new InvalidOperationException($"Training failed with the exception: {_history.Last().Exception}");
Sweepers\SmacSweeper.cs (1)
249throw new InvalidOperationException("SMAC sweeper localSearch threw exception", e);
Sweepers\SweeperProbabilityUtils.cs (1)
114throw new InvalidOperationException("Smart sweeper can only sweep over discrete and numeric parameters");
TrainerExtensions\TrainerExtensionUtil.cs (1)
296throw new InvalidOperationException($"Cannot set parameter {param.Name} for {obj.GetType()}");
Tuner\SmacTuner.cs (1)
254throw new InvalidOperationException("SMAC sweeper localSearch threw exception", e);
Utils\SplitUtil.cs (1)
38throw new InvalidOperationException("All cross validation folds have empty train or test data. " +
Microsoft.ML.Core (12)
Data\ColumnTypeExtensions.cs (2)
136throw new InvalidOperationException($"Bad type in {nameof(ColumnTypeExtensions)}.{nameof(NumberTypeFromType)}: {type}"); 166throw new InvalidOperationException($"Bad data kind in {nameof(ColumnTypeExtensions)}.{nameof(NumberTypeFromKind)}: {kind}");
Utilities\Contracts.cs (10)
256=> Process(new InvalidOperationException()); 258=> Process(new InvalidOperationException(), ctx); 260=> Process(new InvalidOperationException(msg)); 262=> Process(new InvalidOperationException(msg), ctx); 264=> Process(new InvalidOperationException(GetMsg(msg, args))); 266=> Process(new InvalidOperationException(GetMsg(msg, args)), ctx); 268=> Process(new InvalidOperationException(msg, inner)); 270=> Process(new InvalidOperationException(msg, inner), ctx); 272=> Process(new InvalidOperationException(GetMsg(msg, args), inner)); 274=> Process(new InvalidOperationException(GetMsg(msg, args), inner), ctx);
Microsoft.ML.CpuMath (10)
src\Microsoft.ML.Core\Utilities\Contracts.cs (10)
256=> Process(new InvalidOperationException()); 258=> Process(new InvalidOperationException(), ctx); 260=> Process(new InvalidOperationException(msg)); 262=> Process(new InvalidOperationException(msg), ctx); 264=> Process(new InvalidOperationException(GetMsg(msg, args))); 266=> Process(new InvalidOperationException(GetMsg(msg, args)), ctx); 268=> Process(new InvalidOperationException(msg, inner)); 270=> Process(new InvalidOperationException(msg, inner), ctx); 272=> Process(new InvalidOperationException(GetMsg(msg, args), inner)); 274=> Process(new InvalidOperationException(GetMsg(msg, args), inner), ctx);
Microsoft.ML.Data (2)
DataLoadSave\EstimatorChain.cs (1)
113throw new InvalidOperationException("Current estimator chain has no estimator, can't append cache checkpoint.");
Transforms\ValueMapping.cs (1)
202throw new InvalidOperationException($"Unsupported type {type} used in mapping.");
Microsoft.ML.DataView (3)
Contracts.cs (1)
33=> new InvalidOperationException(msg);
DataViewSchema.cs (2)
229throw new InvalidOperationException($"Invalid call to '{nameof(GetGetter)}'"); 241throw new InvalidOperationException($"Invalid call to '{nameof(GetValue)}'");
Microsoft.ML.GenAI.Core (8)
CausalLMPipelineChatClient.cs (1)
45stopSequences: stopSequences.ToArray()) ?? throw new InvalidOperationException("Failed to generate a reply.");
Module\Attention.cs (1)
160throw new InvalidOperationException("Invalid state, either qkv_proj or q_proj, k_proj, v_proj should be initialized");
Pipeline\CausalLMPipeline.cs (6)
160logits = output.Logits?.MoveToOtherDisposeScope(inputIds) ?? throw new InvalidOperationException("Logits is null"); 218return (inputIds, logits ?? throw new InvalidOperationException("Logits is null")); 275SentencePieceTokenizer bpeTokenizer => bpeTokenizer.Decode(tokenIds.Concat(tokenIds), considerSpecialTokens: true) ?? throw new InvalidOperationException("Failed to decode token ids"), 276_ => this.Tokenizer.Decode(tokenIds.Concat(tokenIds)) ?? throw new InvalidOperationException("Failed to decode token ids"), 281SentencePieceTokenizer bpeTokenizer => bpeTokenizer.Decode(tokenIds, considerSpecialTokens: true) ?? throw new InvalidOperationException("Failed to decode token ids"), 282_ => this.Tokenizer.Decode(tokenIds) ?? throw new InvalidOperationException("Failed to decode token ids"),
Microsoft.ML.GenAI.LLaMA (7)
Llama3_1ChatTemplateBuilder.cs (6)
25throw new InvalidOperationException("Please provide a message with content."); 30throw new InvalidOperationException("Please provide a message with a valid role. The valid roles are System, User, and Assistant."); 47_ => throw new InvalidOperationException("Invalid role.") 96throw new InvalidOperationException("Please provide a message with content."); 101throw new InvalidOperationException("Please provide a message with a valid role. The valid roles are System, User, and Assistant."); 115_ => throw new InvalidOperationException("Invalid role.")
LlamaCausalLMAgent.cs (1)
57stopSequences: stopTokenSequence) ?? throw new InvalidOperationException("Failed to generate a reply.");
Microsoft.ML.GenAI.Mistral (6)
Mistral_7B_0_3ChatTemplateBuilder.cs (4)
32throw new InvalidOperationException("Please provide at most one system message."); 60_ => throw new InvalidOperationException("Invalid role.") 100_ => throw new InvalidOperationException("Invalid role.") 177throw new InvalidOperationException("Parameter name cannot be null");
MistralCausalLMAgent.cs (2)
61stopSequences: stopTokenSequence) ?? throw new InvalidOperationException("Failed to generate a reply."); 149var mistralToolCalls = JsonSerializer.Deserialize<List<MistralToolCall>>(json) ?? throw new InvalidOperationException("Failed to deserialize tool calls.");
Microsoft.ML.GenAI.Phi (7)
Phi3\Phi3CausalLMAgent.cs (1)
56stopSequences: stopTokenSequence) ?? throw new InvalidOperationException("Failed to generate a reply.");
Phi3\Phi3ChatTemplateBuilder.cs (6)
30throw new InvalidOperationException("Please provide a message with content."); 35throw new InvalidOperationException("Please provide a message with a valid role. The valid roles are System, User, and Assistant."); 51_ => throw new InvalidOperationException("Invalid role.") 97throw new InvalidOperationException("Please provide a message with content."); 102throw new InvalidOperationException("Please provide a message with a valid role. The valid roles are System, User, and Assistant."); 118_ => throw new InvalidOperationException("Invalid role.")
Microsoft.ML.GenAI.Samples (1)
Llama\SFT_Llama_3_2_1B.cs (1)
65throw new InvalidOperationException("Pipeline is not of type ICausalLMPipeline<Tokenizer, LlamaForCausalLM>");
Microsoft.ML.ImageAnalytics (5)
ImagePixelExtractor.cs (1)
370_ => throw new InvalidOperationException($"Image pixel format is not supported")
ImageResizer.cs (1)
323_ => throw new InvalidOperationException($"Invalid image resizing mode value")
MLImage.cs (3)
279throw new InvalidOperationException("Unsupported image format."); 302throw new InvalidOperationException($"Couldn't resize the image"); 449throw new InvalidOperationException("Object is disposed.");
Microsoft.ML.PerformanceTests (1)
ImageClassificationBench.cs (1)
235throw new InvalidOperationException(string.Format("File {0} already exists.", pathname));
Microsoft.ML.Samples (2)
Dynamic\Transforms\ImageAnalytics\ConvertToGrayScaleInMemory.cs (2)
47_ => throw new InvalidOperationException($"Image pixel format is not supported") 55_ => throw new InvalidOperationException($"Image pixel format is not supported")
Microsoft.ML.TestFrameworkCommon (1)
Utility\NativeLibrary.cs (1)
141throw new InvalidOperationException($"No function was found with the name {name}.");
Microsoft.ML.Tests (26)
ImagesTests.cs (26)
215_ => throw new InvalidOperationException($"Image pixel format is not supported") 265_ => throw new InvalidOperationException($"Image pixel format is not supported") 288_ => throw new InvalidOperationException($"Image pixel format is not supported") 380_ => throw new InvalidOperationException($"Image pixel format is not supported") 388_ => throw new InvalidOperationException($"Image pixel format is not supported") 455_ => throw new InvalidOperationException($"Image pixel format is not supported") 463_ => throw new InvalidOperationException($"Image pixel format is not supported") 531_ => throw new InvalidOperationException($"Image pixel format is not supported") 539_ => throw new InvalidOperationException($"Image pixel format is not supported") 606_ => throw new InvalidOperationException($"Image pixel format is not supported") 614_ => throw new InvalidOperationException($"Image pixel format is not supported") 681_ => throw new InvalidOperationException($"Image pixel format is not supported") 689_ => throw new InvalidOperationException($"Image pixel format is not supported") 757_ => throw new InvalidOperationException($"Image pixel format is not supported") 765_ => throw new InvalidOperationException($"Image pixel format is not supported") 832_ => throw new InvalidOperationException($"Image pixel format is not supported") 840_ => throw new InvalidOperationException($"Image pixel format is not supported") 908_ => throw new InvalidOperationException($"Image pixel format is not supported") 916_ => throw new InvalidOperationException($"Image pixel format is not supported") 982_ => throw new InvalidOperationException($"Image pixel format is not supported") 990_ => throw new InvalidOperationException($"Image pixel format is not supported") 1035_ => throw new InvalidOperationException($"Image pixel format is not supported") 1391public override long Position { get => _stream.Position; set => throw new InvalidOperationException($"The stream is not seekable"); } 1397public override long Seek(long offset, SeekOrigin origin) => throw new InvalidOperationException($"The stream is not seekable"); 1399public override void SetLength(long value) => throw new InvalidOperationException($"The stream is not seekable"); 1401public override void Write(byte[] buffer, int offset, int count) => throw new InvalidOperationException($"The stream is not writable");
Microsoft.ML.TimeSeries (1)
SequentialTransformerBase.cs (1)
454throw new InvalidOperationException("Not a RowToRowMapper.");
Microsoft.ML.Tokenizers (19)
Model\BPETokenizer.cs (13)
62throw new InvalidOperationException($"Unknown Token '{value}' was not present in '{nameof(Vocabulary)}'."); 156throw new InvalidOperationException("The vocabulary cannot be empty."); 168throw new InvalidOperationException("The merge entries cannot be null."); 174throw new InvalidOperationException($"Invalid merger file format"); 320throw new InvalidOperationException($"The beginning of sentence token '{beginningOfSentenceToken}' was not present in the vocabulary."); 331throw new InvalidOperationException($"The end of sentence token '{endOfSentenceToken}' was not present in the vocabulary."); 365throw new InvalidOperationException($"Trying to merge a token '{mergeValues.a}' which not exist in the vocabulary."); 370throw new InvalidOperationException($"Trying to merge a token '{mergeValues.b}' which not exist in the vocabulary."); 375throw new InvalidOperationException($"The merge value '{mergeValues.b}' is too short to be merged with a prefix of length {prefixLen}. This implies that the merge file is either damaged or missing the prefix in its entries."); 381throw new InvalidOperationException($"Trying to merge a token '{newToken}' which not exist in the vocabulary."); 1163throw new InvalidOperationException($"Invalid merger file format at line: {lineNumber}"); 1274throw new InvalidOperationException($"Unknown Token Out Of Vocabulary."); 1283throw new InvalidOperationException($"Unknown Token Out Of Vocabulary.");
Model\TiktokenTokenizer.cs (2)
233throw new InvalidOperationException($"Failed to load from BPE vocab file stream: {ex.Message}", ex); 1243throw new InvalidOperationException($"The tokenizer data file {tiktokenConfiguration.PackageName}.dll could not be loaded. Please reference the package {tiktokenConfiguration.PackageName} in your project.");
Tokenizer.cs (1)
412throw new InvalidOperationException("The provided token IDs could not be decoded.");
Utils\DoubleArrayTrie.cs (3)
363throw new InvalidOperationException("failed to insert key: invalid null character"); 369throw new InvalidOperationException("failed to insert key: wrong key order"); 656throw new InvalidOperationException("failed to modify unit: too large offset");
Microsoft.ML.Tokenizers.Tests (6)
BpeTests.cs (1)
891throw new InvalidOperationException("Invalid model format");
src\Microsoft.ML.Tokenizers\Utils\DoubleArrayTrie.cs (3)
363throw new InvalidOperationException("failed to insert key: invalid null character"); 369throw new InvalidOperationException("failed to insert key: wrong key order"); 656throw new InvalidOperationException("failed to modify unit: too large offset");
UnigramTests.cs (2)
43throw new InvalidOperationException("Invalid model vocabulary format"); 51throw new InvalidOperationException("Invalid model vocabulary format");
Microsoft.ML.TorchSharp (1)
Extensions\TokenizerExtensions.cs (1)
46throw new InvalidOperationException($"The input tokenizer is not using the EnglishRoberta model.");
Microsoft.Net.Http.Headers (1)
HeaderUtilities.cs (1)
736throw new InvalidOperationException("The object cannot be modified because it is read-only.");
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($"Interned string {internedString} should have been {expectedString}");
Microsoft.NET.StringTools.net35 (1)
WeakStringCacheInterner.cs (1)
88throw new InvalidOperationException($"Interned string {internedString} should have been {expectedString}");
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.VisualBasic.Tests (1)
Microsoft\VisualBasic\ApplicationServices\UnhandledExceptionEventArgsTests.cs (1)
11yield return new object[] { false, new InvalidOperationException() };
Microsoft.VisualStudio.LanguageServices (47)
ChangeSignature\ChangeSignatureDialogViewModel.ParameterViewModels.cs (1)
118set => throw new InvalidOperationException();
CommonControls\NewTypeDestinationSelectionViewModel.cs (1)
115throw new InvalidOperationException();
DocumentOutline\DocumentOutlineView.xaml.cs (1)
266_ => throw new InvalidOperationException(),
EditorConfigSettings\Analyzers\ViewModel\SeverityViewModel.cs (2)
56_ => throw new InvalidOperationException(), 77_ => throw new InvalidOperationException(),
EditorConfigSettings\CodeStyle\ViewModel\CodeStyleSeverityViewModel.cs (2)
57_ => throw new InvalidOperationException(), 71_ => throw new InvalidOperationException(),
EditorConfigSettings\Common\SettingsSnapshotFactoryBase.cs (1)
66throw new InvalidOperationException($"Invalid GetSnapshot request. Requested version: {versionNumber}. Current version: {_currentVersionNumber}");
EditorConfigSettings\NamingStyle\View\ColumnDefinitions\NamingStylesSeverityColumnDefinition.cs (1)
55_ => throw new InvalidOperationException(),
EditorConfigSettings\NamingStyle\ViewModel\ColumnViewModels\NamingStylesSeverityViewModel.cs (2)
26_ => throw new InvalidOperationException(), 41_ => throw new InvalidOperationException(),
EditorConfigSettings\SettingsEditorFactory.cs (1)
118throw new InvalidOperationException("unable to acquire text buffer");
FindReferences\Contexts\WithoutReferencesFindUsagesContext.cs (1)
46=> throw new InvalidOperationException();
Interop\CleanableWeakComHandleTable.cs (1)
155throw new InvalidOperationException($"Key already exists in table: {(key != null ? key.ToString() : "<null>")}.");
Interop\ComHandle.cs (2)
99throw new InvalidOperationException("Invalid cast."); 104throw new InvalidOperationException("Invalid cast.");
LanguageService\AbstractLanguageService`2.cs (2)
124throw new InvalidOperationException(); 135throw new InvalidOperationException("TearDown not called!");
Library\ObjectBrowser\Lists\ProjectListItem.cs (1)
30throw new InvalidOperationException("Unsupported language: " + project.Language);
Library\ObjectBrowser\ObjectList.cs (1)
784throw new InvalidOperationException();
ProjectSystem\BrokeredService\WorkspaceProject.cs (1)
203throw new InvalidOperationException("The batch has already been applied.");
ProjectSystem\VisualStudioWorkspaceImpl.cs (8)
325throw new InvalidOperationException(ServicesVSResources.VisualStudioWorkspace_TryApplyChanges_cannot_be_called_from_a_background_thread); 1089throw new InvalidOperationException(ServicesVSResources.This_workspace_only_supports_opening_documents_on_the_UI_thread); 1338throw new InvalidOperationException( 1344throw new InvalidOperationException( 1350throw new InvalidOperationException( 1356throw new InvalidOperationException( 1362throw new InvalidOperationException( 1379_ => throw new InvalidOperationException(),
RoslynPackage.cs (1)
282FatalError.ReportAndCatch(new InvalidOperationException("BulkFileOperation already exist"), ErrorSeverity.General);
Utilities\ComEventSink.cs (3)
16throw new InvalidOperationException(); 27throw new InvalidOperationException("Could not find connection point for " + typeof(T).FullName); 49throw new InvalidOperationException("Already unadvised.");
Utilities\IVsEditorAdaptersFactoryServiceExtensions.cs (1)
37FatalError.ReportAndCatch(new InvalidOperationException("Could not retrieve document. " + message));
ValueTracking\ValueTrackingToolWindow.cs (1)
34throw new InvalidOperationException();
Venus\ContainedLanguage.cs (1)
183FatalError.ReportAndPropagate(new InvalidOperationException("Failed to get an ITextDocument for a contained document"));
Venus\ContainedLanguage.IVsContainedLanguageCodeSupport.cs (1)
226throw new InvalidOperationException();
Venus\ContainedLanguageCodeSupport.cs (9)
93throw new InvalidOperationException(); 99throw new InvalidOperationException(); 105throw new InvalidOperationException(ServicesVSResources.Event_type_is_invalid); 173throw new InvalidOperationException(); 179throw new InvalidOperationException(ServicesVSResources.Event_type_is_invalid); 216throw new InvalidOperationException(ServicesVSResources.Can_t_find_where_to_insert_member); 441throw new InvalidOperationException(ServicesVSResources.Unknown_rename_type); 486throw new InvalidOperationException(); 493throw new InvalidOperationException();
Workspace\VisualStudioFormattingRuleFactoryServiceFactory.cs (1)
85new InvalidOperationException($"Can't find an intersection. Visible spans count: {spans.Count}"));
Microsoft.VisualStudio.LanguageServices.CSharp (7)
CodeModel\CSharpCodeModelService.cs (7)
586throw new InvalidOperationException(); 1826throw new InvalidOperationException(); 1836throw new InvalidOperationException(); 1852throw new InvalidOperationException(); 1862throw new InvalidOperationException(); 1895throw new InvalidOperationException(); 2617throw new InvalidOperationException();
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (1)
DocumentOutline\DocumentOutlineTests.cs (1)
111_ => throw new InvalidOperationException($"The value for {nameof(sortOption)} is invalid: {sortOption}")
Microsoft.VisualStudio.LanguageServices.DevKit (1)
Logging\VSCodeTelemetryLogger.cs (1)
78_ => new InvalidOperationException($"Unknown BlockStart kind: {kind}")
Microsoft.VisualStudio.LanguageServices.Xaml (1)
Implementation\LanguageServer\Handler\Definitions\GoToDefinitionHandler.cs (1)
105throw new InvalidOperationException($"Unexpected {nameof(XamlDefinition)} Type");
Microsoft.Web.Xdt.Extensions (1)
InsertOrAppendAttribute.cs (1)
103throw new InvalidOperationException("No target attribute to append");
MSBuild (6)
CommunicationsUtilities.cs (2)
636throw new InvalidOperationException(); 687throw new InvalidOperationException(String.Format(CultureInfo.InvariantCulture, "Client: rejected old host. Received byte {0} instead of {1}.", bytes[0], byteToAccept));
ErrorUtilities.cs (1)
251throw new InvalidOperationException(ResourceUtilities.FormatResourceStringStripCodeAndKeyword(resourceName, args));
InterningBinaryReader.cs (1)
66throw new InvalidOperationException();
ManagedFileSystem.cs (2)
75throw new InvalidOperationException(ex.Message, ex); 80throw new InvalidOperationException(ex.Message, ex);
MSBuildTaskHost (8)
BinaryTranslator.cs (2)
804throw new InvalidOperationException("Cannot enter recursive intern block."); 1607throw new InvalidOperationException("Cannot enter recursive intern block.");
CommunicationsUtilities.cs (2)
636throw new InvalidOperationException(); 687throw 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)
251throw new InvalidOperationException(ResourceUtilities.FormatResourceStringStripCodeAndKeyword(resourceName, args));
InterningBinaryReader.cs (1)
66throw new InvalidOperationException();
InterningReadTranslator.cs (1)
29throw new InvalidOperationException(
InterningWriteTranslator.cs (1)
160throw 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.");
MyFrontend (1)
Services\CatalogServiceClient.cs (1)
15_ => throw new InvalidOperationException(),
ParameterEndToEnd.AppHost (1)
Program.cs (1)
27var throwing = builder.AddParameter("throwing", () => throw new InvalidOperationException("This is a test exception."));
PresentationBuildTasks (26)
Microsoft\Build\Tasks\Windows\UidManager.cs (2)
1273throw new InvalidOperationException(); 1283throw new InvalidOperationException();
src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\BamlRecords.cs (1)
769throw new InvalidOperationException(SR.ParserMultiBamls);
src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\XamlParseException.cs (1)
467throw new InvalidOperationException(message);
src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\XamlReaderHelper.cs (5)
4357throw new InvalidOperationException(SR.Format(SR.ParserCanOnlyHaveOneChild, 6026throw new InvalidOperationException(SR.Format(SR.ParserAbandonedTypeConverterText,_typeConverterTextWrittenAndNotProcessed)); 6042throw new InvalidOperationException(SR.Format(SR.ParserTypeConverterTextUnusable,initializationText)); 6168throw new InvalidOperationException(SR.Format(SR.ParserTypeConverterTextNeedsEndElement, _typeConverterTextWrittenAndNotProcessed)); 6622throw new InvalidOperationException(SR.Format(SR.ParserCanOnlyHaveOneChild,
src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\XamlSerializer.cs (3)
58throw new InvalidOperationException(SR.InvalidDeSerialize); 100throw new InvalidOperationException(SR.InvalidCustomSerialize); 111throw new InvalidOperationException(SR.InvalidCustomSerialize);
src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\XmlnsCache.cs (1)
393throw new InvalidOperationException(SR.Format(SR.ParserCompatDuplicate, oldXmlns,
src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\XmlnsDictionary.cs (1)
594throw new InvalidOperationException(SR.ParserDictionarySealed);
src\Microsoft.DotNet.Wpf\src\Shared\MS\Internal\TokenizerHelper.cs (8)
102throw new System.InvalidOperationException(SR.Format(SR.TokenizerHelperExtraDataEncountered, _charIndex, _str)); 123throw new System.InvalidOperationException(SR.Format(SR.TokenizerHelperPrematureStringTermination, _str)); 137throw new System.InvalidOperationException(SR.Format(SR.TokenizerHelperPrematureStringTermination, _str)); 229throw new System.InvalidOperationException(SR.Format(SR.TokenizerHelperMissingEndQuote, _str)); 240throw new System.InvalidOperationException(SR.Format(SR.TokenizerHelperEmptyToken, _charIndex, _str)); 260throw new System.InvalidOperationException(SR.Format(SR.TokenizerHelperExtraDataEncountered, _charIndex, _str)); 278throw new System.InvalidOperationException(SR.Format(SR.TokenizerHelperEmptyToken, _charIndex, _str)); 297throw new System.InvalidOperationException(SR.Format(SR.TokenizerHelperEmptyToken, _charIndex, _str));
src\Microsoft.DotNet.Wpf\src\Shared\MS\Internal\Xaml\Parser\SpecialBracketCharacters.cs (4)
51throw new InvalidOperationException(); 76throw new InvalidOperationException("Opening bracket character cannot be the same as closing bracket character."); 80throw new InvalidOperationException("Bracket characters cannot be alpha-numeric or whitespace."); 84throw new InvalidOperationException("Bracket characters cannot be one of the following: '=' , ',', '\'', '\"', '{ ', ' }', '\\'");
PresentationCore (516)
MS\Internal\Automation\ElementUtil.cs (1)
227throw new InvalidOperationException(SR.AutomationDispatcherShutdown);
MS\Internal\Automation\SynchronizedInputAdaptor.cs (3)
46throw new InvalidOperationException(SR.Automation_RecursivePublicCall); 56throw new InvalidOperationException(SR.Automation_RecursivePublicCall); 64throw new InvalidOperationException(SR.Automation_RecursivePublicCall);
MS\Internal\FontCache\FamilyCollection.cs (1)
549throw new InvalidOperationException();
MS\Internal\Ink\ExtendedProperty.cs (1)
204throw new InvalidOperationException(SR.InvalidDataTypeForExtendedProperty);
MS\Internal\Ink\GestureRecognizer\NativeRecognizer.cs (3)
51throw new InvalidOperationException(SR.UnspecifiedGestureConstructionException); 103throw new InvalidOperationException(SR.UnspecifiedSetEnabledGesturesException); 178throw new InvalidOperationException(SR.UnspecifiedGestureException);
MS\Internal\Ink\InkSerializedFormat\Compress.cs (3)
89throw new InvalidOperationException(StrokeCollectionSerializer.ISFDebugMessage(SR.DecompressPacketDataFailed)); 158throw new InvalidOperationException(StrokeCollectionSerializer.ISFDebugMessage(SR.DecompressPropertyFailed)); 288throw new InvalidOperationException(SR.IsfOperationFailed);
MS\Internal\Ink\InkSerializedFormat\CustomAttributeSerializer.cs (3)
292throw new InvalidOperationException(SR.InvalidEpInIsf); 411throw new InvalidOperationException(SR.EmptyDataToLoad); 686throw new InvalidOperationException(SR.InvalidEpInIsf);
MS\Internal\Ink\InkSerializedFormat\DrawingAttributeSerializer.cs (3)
177throw new InvalidOperationException(StrokeCollectionSerializer. ISFDebugMessage("ROP data size was not found")); 532throw new InvalidOperationException(StrokeCollectionSerializer.ISFDebugMessage("ROP data size was not found")); 541throw new InvalidOperationException(StrokeCollectionSerializer.ISFDebugMessage("ROP data was incorrectly serialized"));
MS\Internal\Ink\InkSerializedFormat\GorillaCodec.cs (1)
384throw new InvalidOperationException(StrokeCollectionSerializer.ISFDebugMessage("Transform returned unexpected results"));
MS\Internal\Ink\InkSerializedFormat\InkSerializer.cs (19)
324throw new InvalidOperationException(ISFDebugMessage("ISF decoder cannot operate on non-empty ink container")); 660throw new InvalidOperationException(ISFDebugMessage("Invalid ISF tag logic")); 1740throw new InvalidOperationException(ISFDebugMessage("Calculated ISF stream size != actual stream size")); 1759throw new InvalidOperationException(ISFDebugMessage("Calculated ISF stream size != actual stream size")); 1772throw new InvalidOperationException(ISFDebugMessage("Calculated ISF stream size != actual stream size")); 1784throw new InvalidOperationException(ISFDebugMessage("Calculated ISF stream size != actual stream size")); 1793throw new InvalidOperationException(ISFDebugMessage("Calculated ISF stream size != actual stream size")); 1802throw new InvalidOperationException(ISFDebugMessage("Calculated ISF stream size != actual stream size")); 1811throw new InvalidOperationException(ISFDebugMessage("Calculated ISF stream size != actual stream size")); 1822throw new InvalidOperationException(ISFDebugMessage("Calculated ISF stream size != actual stream size")); 1832throw new InvalidOperationException(ISFDebugMessage("Calculated ISF stream size != actual stream size")); 1853throw new InvalidOperationException(ISFDebugMessage("Calculated ISF stream size != actual stream size")); 1894throw new InvalidOperationException(ISFDebugMessage("Calculated ISF stream size != actual stream size")); 1908throw new InvalidOperationException(ISFDebugMessage("Calculated ISF stream size != actual stream size")); 1922throw new InvalidOperationException(ISFDebugMessage("Calculated ISF stream size != actual stream size")); 1936throw new InvalidOperationException(ISFDebugMessage("Calculated ISF stream size != actual stream size")); 1952throw new InvalidOperationException(ISFDebugMessage("Encoded stroke size != reported size")); 1970throw new InvalidOperationException(ISFDebugMessage("Calculated ISF stream size != actual stream size")); 1973throw new InvalidOperationException(ISFDebugMessage("Calculated ISF stream size != actual stream size"));
MS\Internal\Ink\InkSerializedFormat\StrokeSerializer.cs (1)
320throw new InvalidOperationException(StrokeCollectionSerializer.ISFDebugMessage("ExtendedProperty decoded totalBytesInStrokeBlockOfIsfStream exceeded ISF stream totalBytesInStrokeBlockOfIsfStream"));
MS\Internal\Ink\Renderer.cs (2)
289throw new System.InvalidOperationException(SR.CannotAttachVisualTwice); 325throw new System.InvalidOperationException(SR.VisualCannotBeDetached);
MS\Internal\IO\Packaging\ByteRangeDownloader.cs (3)
302throw new InvalidOperationException(SR.RequestAlreadyStarted); 333throw new InvalidOperationException(SR.RequestAlreadyStarted); 427throw new InvalidOperationException(SR.ByteRangeDownloaderErroredOut, _erroredOutException);
MS\Internal\IO\Packaging\DeobfuscatingStream.cs (1)
203throw new InvalidOperationException(SR.InvalidPartName);
MS\Internal\Media\VisualTreeUtils.cs (1)
253throw new System.InvalidOperationException(SR.Format(SR.Visual_NotAVisual, element.GetType()));
MS\Internal\Text\TextInterface\DWriteLoader.cs (1)
24throw new InvalidOperationException();
MS\Internal\TextFormatting\TextFormatterImp.cs (1)
549throw new InvalidOperationException(SR.TextFormatterReentranceProhibited);
MS\Win32\UnsafeNativeMethodsPenimc.cs (5)
108throw new InvalidOperationException(SR.Format(SR.PenImcSxSRegistrationFailed, ExternDll.Penimc)); 175throw new InvalidOperationException(); 191throw new InvalidOperationException(); 310throw new InvalidOperationException(); 347throw new InvalidOperationException();
src\Microsoft.DotNet.Wpf\src\Common\Graphics\wgx_render.cs (7)
797return new System.InvalidOperationException(SR.Image_WrongState, exceptionForHR); 810return new System.InvalidOperationException(SR.WIC_NotInitialized, exceptionForHR); 822return new System.InvalidOperationException(SR.Image_CodecPresent, exceptionForHR); 828return new System.InvalidOperationException(SR.Image_NoPalette, exceptionForHR); 834return new System.InvalidOperationException(SR.Image_InternalError, exceptionForHR); 860return new System.InvalidOperationException(SR.Image_StreamWrite, exceptionForHR); 908return new System.InvalidOperationException(SR.Image_DisplayStateInvalid, exceptionForHR);
src\Microsoft.DotNet.Wpf\src\Shared\Telemetry\Managed\EventSourceActivity.cs (3)
316throw new InvalidOperationException(); 329throw new InvalidOperationException(); 339throw new InvalidOperationException();
System\IO\Packaging\PackageStore.cs (1)
109throw new InvalidOperationException(SR.PackageAlreadyExists);
System\IO\Packaging\PackWebRequest.cs (1)
164throw new InvalidOperationException(SR.SchemaInvalidForTransport);
System\Windows\Automation\Peers\AutomationPeer.cs (30)
742throw new InvalidOperationException(SR.Automation_RecursivePublicCall); 760throw new InvalidOperationException(SR.Automation_RecursivePublicCall); 780throw new InvalidOperationException(SR.Automation_RecursivePublicCall); 800throw new InvalidOperationException(SR.Automation_RecursivePublicCall); 820throw new InvalidOperationException(SR.Automation_RecursivePublicCall); 838throw new InvalidOperationException(SR.Automation_RecursivePublicCall); 858throw new InvalidOperationException(SR.Automation_RecursivePublicCall); 878throw new InvalidOperationException(SR.Automation_RecursivePublicCall); 897throw new InvalidOperationException(SR.Automation_RecursivePublicCall); 915throw new InvalidOperationException(SR.Automation_RecursivePublicCall); 935throw new InvalidOperationException(SR.Automation_RecursivePublicCall); 955throw new InvalidOperationException(SR.Automation_RecursivePublicCall); 973throw new InvalidOperationException(SR.Automation_RecursivePublicCall); 993throw new InvalidOperationException(SR.Automation_RecursivePublicCall); 1013throw new InvalidOperationException(SR.Automation_RecursivePublicCall); 1033throw new InvalidOperationException(SR.Automation_RecursivePublicCall); 1057throw new InvalidOperationException(SR.Automation_RecursivePublicCall); 1082throw new InvalidOperationException(SR.Automation_RecursivePublicCall); 1102throw new InvalidOperationException(SR.Automation_RecursivePublicCall); 1122throw new InvalidOperationException(SR.Automation_RecursivePublicCall); 1142throw new InvalidOperationException(SR.Automation_RecursivePublicCall); 1162throw new InvalidOperationException(SR.Automation_RecursivePublicCall); 1187throw new InvalidOperationException(SR.Automation_RecursivePublicCall); 1205throw new InvalidOperationException(SR.Automation_RecursivePublicCall); 1229throw new InvalidOperationException(SR.Automation_RecursivePublicCall); 1281throw new InvalidOperationException(SR.Automation_RecursivePublicCall); 1309throw new InvalidOperationException(SR.Automation_RecursivePublicCall); 1379throw new InvalidOperationException(SR.Automation_RecursivePublicCall); 1407throw new InvalidOperationException(SR.Automation_RecursivePublicCall); 1431throw new InvalidOperationException(SR.Automation_RecursivePublicCall);
System\Windows\Automation\Peers\ContentElementAutomationPeer.cs (1)
307throw new InvalidOperationException(SR.SetFocusFailed);
System\Windows\Automation\Peers\UIElement3DAutomationPeer.cs (1)
409throw new InvalidOperationException(SR.SetFocusFailed);
System\Windows\Automation\Peers\UIElementAutomationPeer.cs (1)
517throw new InvalidOperationException(SR.SetFocusFailed);
System\Windows\CoreCompatibilityPreferences.cs (3)
67throw new InvalidOperationException(SR.Format(SR.CompatibilityPreferencesSealed, "IsAltKeyRequiredInAccessKeyDefaultScope", "CoreCompatibilityPreferences")); 107throw new InvalidOperationException(SR.Format(SR.CompatibilityPreferencesSealed, "IncludeAllInkInBoundingBox", "CoreCompatibilityPreferences")); 148throw new InvalidOperationException(SR.Format(SR.CompatibilityPreferencesSealed, "DisableMultimonDisplayClipping", "CoreCompatibilityPreferences"));
System\Windows\Diagnostics\VisualDiagnostics.cs (2)
213throw new InvalidOperationException(SR.Format(SR.ReentrantVisualTreeChangeError, nameof(VisualTreeChanged))); 254throw new InvalidOperationException(SR.Format(SR.MethodCallNotAllowed, nameof(VisualDiagnostics.EnableVisualTreeChanged)));
System\Windows\Duration.cs (1)
395return HasTimeSpan ? _timeSpan : throw new InvalidOperationException(SR.Format(SR.Timing_NotTimeSpan, this));
System\Windows\FreezableCollection.cs (7)
754throw new InvalidOperationException(SR.Freezable_UnexpectedChange); 826throw new InvalidOperationException(SR.Format(SR.Freezable_CloneInvalidType, typeof(T).Name)); 933throw new InvalidOperationException(SR.Freezable_Reentrant); 1022throw new InvalidOperationException(SR.Enumerator_CollectionChanged); 1040throw new InvalidOperationException(SR.Enumerator_CollectionChanged); 1074throw new InvalidOperationException(SR.Enumerator_NotStarted); 1079throw new InvalidOperationException(SR.Enumerator_ReachedEnd);
System\Windows\Generated\ContentElement.cs (2)
87throw new InvalidOperationException(SR.Format(SR.IAnimatable_CantAnimateSealedDO, dp, this.GetType())); 152throw new InvalidOperationException(SR.Format(SR.IAnimatable_CantAnimateSealedDO, dp, this.GetType()));
System\Windows\Generated\TextDecorationCollection.cs (4)
788throw new InvalidOperationException(SR.Enumerator_CollectionChanged); 806throw new InvalidOperationException(SR.Enumerator_CollectionChanged); 840throw new InvalidOperationException(SR.Enumerator_NotStarted); 845throw new InvalidOperationException(SR.Enumerator_ReachedEnd);
System\Windows\Generated\UIElement.cs (2)
87throw new InvalidOperationException(SR.Format(SR.IAnimatable_CantAnimateSealedDO, dp, this.GetType())); 152throw new InvalidOperationException(SR.Format(SR.IAnimatable_CantAnimateSealedDO, dp, this.GetType()));
System\Windows\GlobalEventManager.cs (1)
439throw new InvalidOperationException(SR.TooManyRoutedEvents);
System\Windows\Ink\GestureRecognizer.cs (1)
253throw new InvalidOperationException(SR.GestureRecognizerNotAvailable);
System\Windows\Ink\IncrementalHitTester.cs (2)
46throw new System.InvalidOperationException(SR.EndHitTestingCalled); 69throw new System.InvalidOperationException(SR.EndHitTestingCalled);
System\Windows\Input\Command\RoutedCommand.cs (2)
122throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, target.GetType())); 158throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, target.GetType()));
System\Windows\Input\FocusChangedEventArgs.cs (2)
29throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, oldFocus.GetType())); 32throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, newFocus.GetType()));
System\Windows\Input\InputLanguageManager.cs (1)
459throw new InvalidOperationException(SR.InputLanguageManager_NotReadyToChangeCurrentLanguage);
System\Windows\Input\InputManager.cs (2)
144throw new InvalidOperationException(SR.RequiresSTA); 353throw new InvalidOperationException();
System\Windows\Input\KeyboardDevice.cs (3)
120throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, element.GetType())); 406throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, o.GetType())); 432throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, o.GetType()));
System\Windows\Input\Manipulation.cs (7)
73throw new InvalidOperationException(SR.Manipulation_ManipulationNotActive); 105throw new InvalidOperationException(SR.Manipulation_ManipulationNotActive); 146throw new InvalidOperationException(SR.Manipulation_ManipulationNotActive); 185throw new InvalidOperationException(SR.Manipulation_ManipulationNotActive); 219throw new InvalidOperationException(SR.Manipulation_ManipulationNotEnabled); 239throw new InvalidOperationException(SR.Manipulation_ManipulationNotActive); 273throw new InvalidOperationException(SR.Manipulation_ManipulationNotActive);
System\Windows\Input\MouseDevice.cs (2)
299throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, eltDO.GetType())); 546throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, relativeTo.GetType()));
System\Windows\Input\ProcessInputEventArgs.cs (4)
50throw new InvalidOperationException(SR.NotAllowedToAccessStagingArea); 70throw new InvalidOperationException(SR.NotAllowedToAccessStagingArea); 88throw new InvalidOperationException(SR.NotAllowedToAccessStagingArea); 106throw new InvalidOperationException(SR.NotAllowedToAccessStagingArea);
System\Windows\Input\Stylus\Common\RawStylusInput.cs (1)
121throw new InvalidOperationException(SR.Stylus_CanOnlyCallForDownMoveOrUp);
System\Windows\Input\Stylus\Common\StylusPointCollection.cs (2)
252throw new InvalidOperationException(SR.InvalidStylusPointCollectionZeroCount); 269throw new InvalidOperationException(SR.InvalidStylusPointCollectionZeroCount);
System\Windows\Input\Stylus\Common\StylusPointDescription.cs (1)
244throw new InvalidOperationException();
System\Windows\Input\Stylus\Pointer\PointerLogic.cs (5)
535throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, oldCapture.GetType())); 561throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, _stylusCapture.GetType())); 626throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, oldOver.GetType())); 655throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, _stylusOver.GetType())); 791throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, _stylusCapture.GetType()));
System\Windows\Input\Stylus\Pointer\PointerStylusDevice.cs (2)
552throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, doStylusCapture.GetType())); 708throw new InvalidOperationException();
System\Windows\Input\Stylus\Wisp\PenContexts.cs (1)
18throw new InvalidOperationException(SR.Stylus_PenContextFailure);
System\Windows\Input\Stylus\Wisp\PenThreadWorker.cs (1)
783throw new InvalidOperationException(SR.PenService_InvalidPacketData);
System\Windows\Input\Stylus\Wisp\WispLogic.cs (8)
2087throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, oldCapture.GetType())); 2116throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, _stylusCapture.GetType())); 2175throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, oldOver.GetType())); 2204throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, _stylusOver.GetType())); 2444throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, _stylusCapture.GetType())); 3025InvalidOperationException ioe = new InvalidOperationException(); 3157throw new InvalidOperationException(SR.PenService_WindowAlreadyRegistered); 3226throw new InvalidOperationException(SR.PenService_WindowNotRegistered);
System\Windows\Input\Stylus\Wisp\WispStylusDevice.cs (2)
245throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, doStylusCapture.GetType())); 1162throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, relativeTo.GetType()));
System\Windows\Input\TouchDevice.cs (2)
694throw new InvalidOperationException(SR.Touch_DeviceAlreadyActivated); 719throw new InvalidOperationException(SR.Touch_DeviceNotActivated);
System\Windows\InterOp\D3DImage.cs (5)
129throw new InvalidOperationException(SR.Image_MustBeLocked); 258throw new InvalidOperationException(SR.Image_MustBeLocked); 293throw new InvalidOperationException(SR.Image_MustBeLocked); 298throw new InvalidOperationException(SR.D3DImage_MustHaveBackBuffer); 587throw new InvalidOperationException(SR.Image_LockCountLimit);
System\Windows\InterOp\HwndSource.cs (1)
2238throw new InvalidOperationException(SR.KeyboardSinkNotAChild);
System\Windows\InterOp\HwndSourceParameters.cs (1)
301throw new InvalidOperationException(SR.UsesPerPixelOpacityIsObsolete);
System\Windows\InterOp\HwndTarget.cs (2)
550throw new InvalidOperationException( 591throw new InvalidOperationException(SR.HwndTarget_HardwareNotSupportDueToProtocolMismatch);
System\Windows\LayoutManager.cs (3)
49throw new InvalidOperationException(); 132throw new InvalidOperationException(SR.Format(SR.LayoutManager_DeepRecursion, s_LayoutRecursionLimit)); 149throw new InvalidOperationException(SR.Format(SR.LayoutManager_DeepRecursion, s_LayoutRecursionLimit));
System\Windows\Markup\XamlSerializerUtil.cs (1)
38throw new InvalidOperationException();
System\Windows\Markup\XmlLanguage.cs (5)
200throw new InvalidOperationException(SR.Format(SR.XmlLangGetCultureFailure, lowerCaseTag), e); 236throw new InvalidOperationException(SR.Format(SR.XmlLangGetSpecificCulture, _lowerCaseTag)); 253throw new InvalidOperationException(SR.Format(SR.XmlLangGetSpecificCulture, _lowerCaseTag), e); 519throw new InvalidOperationException(SR.Enumerator_NotStarted); 523throw new InvalidOperationException(SR.Enumerator_ReachedEnd);
System\Windows\Media\Animation\AnimationStorage.cs (3)
336throw new InvalidOperationException( 985throw new InvalidOperationException(SR.Format( 1011throw new InvalidOperationException(
System\Windows\Media\Animation\Clock.cs (4)
582throw new InvalidOperationException( 626throw new System.InvalidOperationException(SR.Timing_SlipBehavior_SyncOnlyWithSimpleParents); 969throw new InvalidOperationException(SR.Timing_SkipToFillDestinationIndefinite); 3217throw new InvalidOperationException(SR.Timing_SeekDestinationAmbiguousDueToSlip);
System\Windows\Media\Animation\ClockController.cs (4)
167throw new InvalidOperationException(SR.Timing_SeekDestinationIndefinite); 179throw new InvalidOperationException(SR.Timing_SeekDestinationNegative); 209throw new InvalidOperationException(SR.Timing_SeekDestinationIndefinite); 221throw new InvalidOperationException(SR.Timing_SeekDestinationNegative);
System\Windows\Media\Animation\Generated\Animatable.cs (2)
86throw new InvalidOperationException(SR.Format(SR.IAnimatable_CantAnimateSealedDO, dp, this.GetType())); 151throw new InvalidOperationException(SR.Format(SR.IAnimatable_CantAnimateSealedDO, dp, this.GetType()));
System\Windows\Media\Animation\Generated\BooleanAnimationUsingKeyFrames.cs (1)
277throw new InvalidOperationException(SR.Animation_NoTextChildren);
System\Windows\Media\Animation\Generated\ByteAnimation.cs (2)
313throw new InvalidOperationException( 324throw new InvalidOperationException(
System\Windows\Media\Animation\Generated\ByteAnimationUsingKeyFrames.cs (1)
277throw new InvalidOperationException(SR.Animation_NoTextChildren);
System\Windows\Media\Animation\Generated\CharAnimationUsingKeyFrames.cs (1)
277throw new InvalidOperationException(SR.Animation_NoTextChildren);
System\Windows\Media\Animation\Generated\ColorAnimation.cs (2)
313throw new InvalidOperationException( 324throw new InvalidOperationException(
System\Windows\Media\Animation\Generated\ColorAnimationUsingKeyFrames.cs (1)
277throw new InvalidOperationException(SR.Animation_NoTextChildren);
System\Windows\Media\Animation\Generated\DecimalAnimation.cs (2)
313throw new InvalidOperationException( 324throw new InvalidOperationException(
System\Windows\Media\Animation\Generated\DecimalAnimationUsingKeyFrames.cs (1)
277throw new InvalidOperationException(SR.Animation_NoTextChildren);
System\Windows\Media\Animation\Generated\DoubleAnimation.cs (2)
313throw new InvalidOperationException( 324throw new InvalidOperationException(
System\Windows\Media\Animation\Generated\DoubleAnimationUsingKeyFrames.cs (1)
277throw new InvalidOperationException(SR.Animation_NoTextChildren);
System\Windows\Media\Animation\Generated\Int16Animation.cs (2)
313throw new InvalidOperationException( 324throw new InvalidOperationException(
System\Windows\Media\Animation\Generated\Int16AnimationUsingKeyFrames.cs (1)
277throw new InvalidOperationException(SR.Animation_NoTextChildren);
System\Windows\Media\Animation\Generated\Int32Animation.cs (2)
313throw new InvalidOperationException( 324throw new InvalidOperationException(
System\Windows\Media\Animation\Generated\Int32AnimationUsingKeyFrames.cs (1)
277throw new InvalidOperationException(SR.Animation_NoTextChildren);
System\Windows\Media\Animation\Generated\Int64Animation.cs (2)
313throw new InvalidOperationException( 324throw new InvalidOperationException(
System\Windows\Media\Animation\Generated\Int64AnimationUsingKeyFrames.cs (1)
277throw new InvalidOperationException(SR.Animation_NoTextChildren);
System\Windows\Media\Animation\Generated\MatrixAnimationUsingKeyFrames.cs (1)
277throw new InvalidOperationException(SR.Animation_NoTextChildren);
System\Windows\Media\Animation\Generated\ObjectAnimationUsingKeyFrames.cs (1)
277throw new InvalidOperationException(SR.Animation_NoTextChildren);
System\Windows\Media\Animation\Generated\Point3DAnimation.cs (2)
313throw new InvalidOperationException( 324throw new InvalidOperationException(
System\Windows\Media\Animation\Generated\Point3DAnimationUsingKeyFrames.cs (1)
277throw new InvalidOperationException(SR.Animation_NoTextChildren);
System\Windows\Media\Animation\Generated\PointAnimation.cs (2)
313throw new InvalidOperationException( 324throw new InvalidOperationException(
System\Windows\Media\Animation\Generated\PointAnimationUsingKeyFrames.cs (1)
277throw new InvalidOperationException(SR.Animation_NoTextChildren);
System\Windows\Media\Animation\Generated\QuaternionAnimation.cs (2)
313throw new InvalidOperationException( 324throw new InvalidOperationException(
System\Windows\Media\Animation\Generated\QuaternionAnimationUsingKeyFrames.cs (1)
277throw new InvalidOperationException(SR.Animation_NoTextChildren);
System\Windows\Media\Animation\Generated\RectAnimation.cs (2)
313throw new InvalidOperationException( 324throw new InvalidOperationException(
System\Windows\Media\Animation\Generated\RectAnimationUsingKeyFrames.cs (1)
277throw new InvalidOperationException(SR.Animation_NoTextChildren);
System\Windows\Media\Animation\Generated\Rotation3DAnimation.cs (2)
313throw new InvalidOperationException( 324throw new InvalidOperationException(
System\Windows\Media\Animation\Generated\Rotation3DAnimationUsingKeyFrames.cs (1)
277throw new InvalidOperationException(SR.Animation_NoTextChildren);
System\Windows\Media\Animation\Generated\SingleAnimation.cs (2)
313throw new InvalidOperationException( 324throw new InvalidOperationException(
System\Windows\Media\Animation\Generated\SingleAnimationUsingKeyFrames.cs (1)
277throw new InvalidOperationException(SR.Animation_NoTextChildren);
System\Windows\Media\Animation\Generated\SizeAnimation.cs (2)
313throw new InvalidOperationException( 324throw new InvalidOperationException(
System\Windows\Media\Animation\Generated\SizeAnimationUsingKeyFrames.cs (1)
277throw new InvalidOperationException(SR.Animation_NoTextChildren);
System\Windows\Media\Animation\Generated\StringAnimationUsingKeyFrames.cs (1)
277throw new InvalidOperationException(SR.Animation_NoTextChildren);
System\Windows\Media\Animation\Generated\TimelineCollection.cs (4)
787throw new InvalidOperationException(SR.Enumerator_CollectionChanged); 805throw new InvalidOperationException(SR.Enumerator_CollectionChanged); 839throw new InvalidOperationException(SR.Enumerator_NotStarted); 844throw new InvalidOperationException(SR.Enumerator_ReachedEnd);
System\Windows\Media\Animation\Generated\Vector3DAnimation.cs (2)
313throw new InvalidOperationException( 324throw new InvalidOperationException(
System\Windows\Media\Animation\Generated\Vector3DAnimationUsingKeyFrames.cs (1)
277throw new InvalidOperationException(SR.Animation_NoTextChildren);
System\Windows\Media\Animation\Generated\VectorAnimation.cs (2)
313throw new InvalidOperationException( 324throw new InvalidOperationException(
System\Windows\Media\Animation\Generated\VectorAnimationUsingKeyFrames.cs (1)
277throw new InvalidOperationException(SR.Animation_NoTextChildren);
System\Windows\Media\Animation\KeyTime.cs (2)
246throw new InvalidOperationException(); 267throw new InvalidOperationException();
System\Windows\Media\Animation\RepeatBehavior.cs (2)
110throw new InvalidOperationException(SR.Format(SR.Timing_RepeatBehaviorNotIterationCount, this)); 126throw new InvalidOperationException(SR.Format(SR.Timing_RepeatBehaviorNotRepeatDuration, this));
System\Windows\Media\Animation\Timeline.cs (1)
720throw new InvalidOperationException(SR.Timing_AccelAndDecelGreaterThanOne);
System\Windows\Media\Animation\TimelineClockCollection.cs (2)
344throw new InvalidOperationException(SR.Timing_EnumeratorOutOfRange); 386throw new InvalidOperationException(SR.Timing_EnumeratorInvalidated);
System\Windows\Media\Animation\TimelineGroup.cs (1)
203throw new InvalidOperationException(SR.Timing_NoTextChildren);
System\Windows\Media\BitmapCacheBrush.cs (3)
353throw new InvalidOperationException(SR.BitmapCacheBrush_OpacityChanged); 362throw new InvalidOperationException(SR.BitmapCacheBrush_TransformChanged); 371throw new InvalidOperationException(SR.BitmapCacheBrush_RelativeTransformChanged);
System\Windows\Media\ByteStreamGeometryContext.cs (4)
203throw new InvalidOperationException(SR.StreamGeometry_NeedBeginFigure); 264throw new InvalidOperationException(SR.StreamGeometry_NeedBeginFigure); 627throw new InvalidOperationException(SR.StreamGeometry_NeedBeginFigure); 670throw new InvalidOperationException(SR.StreamGeometry_NeedBeginFigure);
System\Windows\Media\CharacterMetricsDictionary.cs (1)
576throw new InvalidOperationException(SR.Enumerator_VerifyContext);
System\Windows\Media\Color.cs (7)
380throw new InvalidOperationException(SR.Format(SR.Color_NullColorContext, null)); 824throw new InvalidOperationException(SR.Format(SR.Color_ColorContextNotsRGB_or_scRGB, null)); 848throw new InvalidOperationException(SR.Format(SR.Color_ColorContextNotsRGB_or_scRGB, null)); 872throw new InvalidOperationException(SR.Format(SR.Color_ColorContextNotsRGB_or_scRGB, null)); 926throw new InvalidOperationException(SR.Format(SR.Color_ColorContextNotsRGB_or_scRGB, null)); 951throw new InvalidOperationException(SR.Format(SR.Color_ColorContextNotsRGB_or_scRGB, null)); 976throw new InvalidOperationException(SR.Format(SR.Color_ColorContextNotsRGB_or_scRGB, null));
System\Windows\Media\ColorContextHelper.cs (2)
73throw new InvalidOperationException(SR.Image_ColorContextInvalid); 86throw new InvalidOperationException(SR.Image_ColorContextInvalid);
System\Windows\Media\ColorTransformHelper.cs (1)
110throw new InvalidOperationException(SR.Image_ColorTransformInvalid);
System\Windows\Media\CultureSpecificStringDictionary.cs (1)
393throw new InvalidOperationException(SR.Enumerator_VerifyContext);
System\Windows\Media\DrawingDrawingContext.cs (1)
1052throw new InvalidOperationException(SR.DrawingContext_TooManyPops);
System\Windows\Media\DrawingGroup.cs (3)
117throw new InvalidOperationException(SR.DrawingGroup_CannotAppendToNullCollection); 122throw new InvalidOperationException(SR.DrawingGroup_CannotAppendToFrozenCollection); 287throw new InvalidOperationException(SR.DrawingGroup_AlreadyOpen);
System\Windows\Media\Effects\BitmapEffect.cs (2)
28throw new InvalidOperationException(SR.RequiresSTA); 102throw new InvalidOperationException(SR.Format(SR.Effect_No_ContextInputSource, null));
System\Windows\Media\Effects\Generated\BitmapEffectCollection.cs (4)
790throw new InvalidOperationException(SR.Enumerator_CollectionChanged); 808throw new InvalidOperationException(SR.Enumerator_CollectionChanged); 842throw new InvalidOperationException(SR.Enumerator_NotStarted); 847throw new InvalidOperationException(SR.Enumerator_ReachedEnd);
System\Windows\Media\Effects\PixelShader.cs (2)
116throw new InvalidOperationException(SR.Effect_ShaderSeekableStream); 123throw new InvalidOperationException(SR.Effect_ShaderBytecodeSize);
System\Windows\Media\Effects\ShaderEffect.cs (3)
192throw new InvalidOperationException(SR.Effect_20ShaderUsing30Registers); 344throw new InvalidOperationException(SR.Format(SR.Effect_ShaderConstantType, dp.PropertyType.Name)); 560throw new InvalidOperationException(SR.Effect_ShaderPixelShaderSet);
System\Windows\Media\FamilyMapCollection.cs (2)
255throw new InvalidOperationException(SR.CompositeFont_TooManyFamilyMaps); 419throw new InvalidOperationException(SR.Enumerator_VerifyContext);
System\Windows\Media\FamilyTypefaceCollection.cs (1)
435throw new InvalidOperationException(SR.Enumerator_VerifyContext);
System\Windows\Media\GeneralTransform.cs (1)
46throw new InvalidOperationException(SR.Format(SR.GeneralTransform_TransformFailed, null));
System\Windows\Media\Generated\DoubleCollection.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\Generated\DrawingCollection.cs (4)
832throw new InvalidOperationException(SR.Enumerator_CollectionChanged); 850throw new InvalidOperationException(SR.Enumerator_CollectionChanged); 884throw new InvalidOperationException(SR.Enumerator_NotStarted); 889throw new InvalidOperationException(SR.Enumerator_ReachedEnd);
System\Windows\Media\Generated\GeneralTransformCollection.cs (4)
797throw new InvalidOperationException(SR.Enumerator_CollectionChanged); 815throw new InvalidOperationException(SR.Enumerator_CollectionChanged); 849throw new InvalidOperationException(SR.Enumerator_NotStarted); 854throw new InvalidOperationException(SR.Enumerator_ReachedEnd);
System\Windows\Media\Generated\GeometryCollection.cs (4)
832throw new InvalidOperationException(SR.Enumerator_CollectionChanged); 850throw new InvalidOperationException(SR.Enumerator_CollectionChanged); 884throw new InvalidOperationException(SR.Enumerator_NotStarted); 889throw new InvalidOperationException(SR.Enumerator_ReachedEnd);
System\Windows\Media\Generated\GradientStopCollection.cs (4)
900throw new InvalidOperationException(SR.Enumerator_CollectionChanged); 918throw new InvalidOperationException(SR.Enumerator_CollectionChanged); 952throw new InvalidOperationException(SR.Enumerator_NotStarted); 957throw new InvalidOperationException(SR.Enumerator_ReachedEnd);
System\Windows\Media\Generated\Int32Collection.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\Generated\PathFigureCollection.cs (4)
887throw new InvalidOperationException(SR.Enumerator_CollectionChanged); 905throw new InvalidOperationException(SR.Enumerator_CollectionChanged); 939throw new InvalidOperationException(SR.Enumerator_NotStarted); 944throw new InvalidOperationException(SR.Enumerator_ReachedEnd);
System\Windows\Media\Generated\PathSegmentCollection.cs (4)
797throw new InvalidOperationException(SR.Enumerator_CollectionChanged); 815throw new InvalidOperationException(SR.Enumerator_CollectionChanged); 849throw new InvalidOperationException(SR.Enumerator_NotStarted); 854throw new InvalidOperationException(SR.Enumerator_ReachedEnd);
System\Windows\Media\Generated\PointCollection.cs (4)
817throw new InvalidOperationException(SR.Enumerator_CollectionChanged); 835throw new InvalidOperationException(SR.Enumerator_CollectionChanged); 869throw new InvalidOperationException(SR.Enumerator_NotStarted); 874throw new InvalidOperationException(SR.Enumerator_ReachedEnd);
System\Windows\Media\Generated\RenderDataDrawingContext.cs (1)
1347throw new InvalidOperationException(SR.DrawingContext_TooManyPops);
System\Windows\Media\Generated\TextEffectCollection.cs (4)
797throw new InvalidOperationException(SR.Enumerator_CollectionChanged); 815throw new InvalidOperationException(SR.Enumerator_CollectionChanged); 849throw new InvalidOperationException(SR.Enumerator_NotStarted); 854throw new InvalidOperationException(SR.Enumerator_ReachedEnd);
System\Windows\Media\Generated\TransformCollection.cs (4)
832throw new InvalidOperationException(SR.Enumerator_CollectionChanged); 850throw new InvalidOperationException(SR.Enumerator_CollectionChanged); 884throw new InvalidOperationException(SR.Enumerator_NotStarted); 889throw new InvalidOperationException(SR.Enumerator_ReachedEnd);
System\Windows\Media\Generated\VectorCollection.cs (4)
817throw new InvalidOperationException(SR.Enumerator_CollectionChanged); 835throw new InvalidOperationException(SR.Enumerator_CollectionChanged); 869throw new InvalidOperationException(SR.Enumerator_NotStarted); 874throw new InvalidOperationException(SR.Enumerator_ReachedEnd);
System\Windows\Media\GlyphRun.cs (5)
2291throw new InvalidOperationException(SR.OnlyOneInitialization); 2297throw new InvalidOperationException(SR.InInitialization); 2308throw new InvalidOperationException(SR.NotInInitialization); 2344throw new InvalidOperationException(SR.InitializationIncomplete); 2355throw new InvalidOperationException(SR.NotInInitialization);
System\Windows\Media\GlyphTypeface.cs (5)
1650throw new InvalidOperationException(SR.OnlyOneInitialization); 1656throw new InvalidOperationException(SR.InInitialization); 1667throw new InvalidOperationException(SR.NotInInitialization); 1677throw new InvalidOperationException(SR.InitializationIncomplete); 1685throw new InvalidOperationException(SR.NotInInitialization);
System\Windows\Media\HostVisual.cs (1)
145throw new InvalidOperationException(
System\Windows\Media\Imaging\BitmapDecoder.cs (4)
979throw new System.InvalidOperationException(SR.Image_OriginalStreamReadOnly); 1524throw new System.InvalidOperationException( 1543throw new System.InvalidOperationException( 1551throw new System.InvalidOperationException(
System\Windows\Media\Imaging\BitmapEncoder.cs (6)
134throw new InvalidOperationException(SR.Image_EncoderNoColorContext); 161throw new InvalidOperationException(SR.Image_EncoderNoGlobalThumbnail); 190throw new InvalidOperationException(SR.Image_MetadataNotCompatible); 195throw new InvalidOperationException(SR.Image_EncoderNoGlobalMetadata); 222throw new InvalidOperationException(SR.Image_EncoderNoPreview); 327throw new InvalidOperationException(SR.Image_OnlyOneSave);
System\Windows\Media\Imaging\BitmapImage.cs (1)
74throw new InvalidOperationException(SR.Format(SR.Image_NeitherArgument, "UriSource", "StreamSource"));
System\Windows\Media\Imaging\BitmapInitialize.cs (6)
21throw new InvalidOperationException(SR.Format(SR.Image_OnlyOneInit, null)); 24throw new InvalidOperationException(SR.Format(SR.Image_InInitialize, null)); 32throw new InvalidOperationException(SR.Format(SR.Image_EndInitWithoutBeginInit, null)); 42throw new InvalidOperationException(SR.Format(SR.Image_SetPropertyOutsideBeginEndInit, null)); 65throw new InvalidOperationException(SR.Format(SR.Image_InitializationIncomplete, null)); 68throw new InvalidOperationException(SR.Format(SR.Image_NotInitialized, null));
System\Windows\Media\Imaging\BitmapMetadata.cs (3)
1018throw new System.InvalidOperationException(SR.Image_MetadataReadOnly); 1135throw new System.InvalidOperationException(SR.Image_MetadataReadOnly); 1505throw new System.InvalidOperationException(SR.Image_MetadataInitializationIncomplete);
System\Windows\Media\Imaging\BitmapMetadataEnumerator.cs (2)
126throw new InvalidOperationException(SR.Enumerator_NotStarted); 130throw new InvalidOperationException(SR.Enumerator_ReachedEnd);
System\Windows\Media\Imaging\BitmapPalette.cs (2)
37throw new InvalidOperationException(SR.Format(SR.Image_PaletteZeroColors, null)); 306throw new InvalidOperationException(SR.Format(SR.Image_PaletteZeroColors, null));
System\Windows\Media\Imaging\CachedBitmap.cs (1)
344throw new InvalidOperationException(SR.Image_IndexedPixelFormatRequiresPalette);
System\Windows\Media\Imaging\ColorConvertedBitmap.cs (3)
138throw new InvalidOperationException(SR.Format(SR.Image_NoArgument, "Source")); 147throw new InvalidOperationException(SR.Color_NullColorContext); 156throw new InvalidOperationException(SR.Format(SR.Image_NoArgument, "DestinationColorContext"));
System\Windows\Media\Imaging\CroppedBitmap.cs (1)
154throw new InvalidOperationException(SR.Format(SR.Image_NoArgument, "Source"));
System\Windows\Media\Imaging\FormatConvertedBitmap.cs (3)
169throw new InvalidOperationException(SR.Format(SR.Image_NoArgument, "Source")); 179throw new InvalidOperationException(SR.Image_IndexedPixelFormatRequiresPalette); 187throw new InvalidOperationException(SR.Image_PaletteColorsDoNotMatchFormat);
System\Windows\Media\Imaging\InplaceBitmapMetadataWriter.cs (5)
133throw new InvalidOperationException(SR.Image_InplaceMetadataNoCopy); 141throw new InvalidOperationException(SR.Image_InplaceMetadataNoCopy); 149throw new InvalidOperationException(SR.Image_InplaceMetadataNoCopy); 157throw new InvalidOperationException(SR.Image_InplaceMetadataNoCopy); 165throw new InvalidOperationException(SR.Image_InplaceMetadataNoCopy);
System\Windows\Media\Imaging\PropVariant.cs (3)
105throw new InvalidOperationException(SR.Image_InsufficientBufferSize); 309throw new System.InvalidOperationException(SR.Image_PropertyNotSupported); 420throw new System.InvalidOperationException(SR.Image_PropertyNotSupported);
System\Windows\Media\Imaging\TransformedBitmap.cs (5)
36throw new InvalidOperationException(SR.Format(SR.Image_NoArgument, "Transform")); 41throw new InvalidOperationException(SR.Image_OnlyOrthogonal); 277throw new InvalidOperationException(SR.Format(SR.Image_NoArgument, "Source")); 287throw new InvalidOperationException(SR.Format(SR.Image_NoArgument, "Transform")); 296throw new InvalidOperationException(SR.Image_OnlyOrthogonal);
System\Windows\Media\Imaging\WriteableBitmap.cs (4)
71throw new InvalidOperationException(SR.Image_IndexedPixelFormatRequiresPalette); 160throw new InvalidOperationException(SR.Image_MustBeLocked); 243throw new InvalidOperationException(SR.Image_LockCountLimit); 307throw new InvalidOperationException(SR.Image_MustBeLocked);
System\Windows\Media\MediaContext.cs (5)
403throw new InvalidOperationException(SR.MediaContext_NoBadShaderHandler); 428throw new System.InvalidOperationException(SR.MediaContext_RenderThreadError); 1795throw new InvalidOperationException(SR.MediaContext_InfiniteTickLoop); 1934throw new InvalidOperationException(SR.MediaContext_InfiniteLayoutLoop); 2304throw new InvalidOperationException(SR.MediaContext_APINotAllowed);
System\Windows\Media\MediaPlayerState.cs (1)
980throw new InvalidOperationException(SR.Media_NotAllowedWhileTimingEngineInControl);
System\Windows\Media\MediaSystem.cs (1)
189throw new System.InvalidOperationException(SR.MediaSystem_OutOfOrderConnectOrDisconnect);
System\Windows\Media\MediaTimeline.cs (2)
125throw new InvalidOperationException(SR.Media_UriNotSpecified); 246throw new InvalidOperationException(SR.Media_UriNotSpecified);
System\Windows\Media\PathFigure.cs (1)
74throw new InvalidOperationException(SR.PathGeometry_InternalReadBackError);
System\Windows\Media\PathGeometry.cs (5)
287throw new System.InvalidOperationException(); 289throw new System.InvalidOperationException(); 460throw new System.InvalidOperationException(SR.PathGeometry_InternalReadBackError); 491throw new System.InvalidOperationException(SR.PathGeometry_InternalReadBackError); 524throw new System.InvalidOperationException(SR.PathGeometry_InternalReadBackError);
System\Windows\Media\textformatting\TextParagraphCache.cs (1)
76throw new InvalidOperationException(SR.Format(SR.CreateParaBreakingSessionFailure, lserr), callbackException);
System\Windows\Media\Visual.cs (8)
2733throw new InvalidOperationException(SR.Format(SR.LayoutManager_DeepRecursion, TreeLevelLimit)); 4364throw new System.InvalidOperationException(SR.Visual_NoCommonAncestor); 4573throw new System.InvalidOperationException(inverse ? SR.Visual_NotADescendant : SR.Visual_NotAnAncestor); 4666throw new System.InvalidOperationException(SR.Visual_NotAnAncestor); 4723throw new InvalidOperationException(SR.Visual_NoPresentationSource); 4730throw new InvalidOperationException(SR.Visual_CannotTransformPoint); 4752throw new InvalidOperationException(SR.Visual_NoPresentationSource); 4763throw new InvalidOperationException(SR.Visual_CannotTransformPoint);
System\Windows\Media\VisualCollection.cs (7)
98throw new InvalidOperationException(SR.VisualCollection_ReadOnly); 375throw new InvalidOperationException(SR.CannotModifyVisualChildrenDuringTreeWalk); 415throw new InvalidOperationException(SR.CannotModifyVisualChildrenDuringTreeWalk); 920throw new InvalidOperationException(SR.Enumerator_CollectionChanged); 947throw new InvalidOperationException(SR.Enumerator_NotStarted); 953throw new InvalidOperationException(SR.Enumerator_ReachedEnd); 970throw new InvalidOperationException(SR.Enumerator_CollectionChanged);
System\Windows\Media\VisualTreeHelper.cs (1)
110throw new InvalidOperationException("UpdateDPI should only be called on the root of a Visual tree");
System\Windows\Media3D\GeneralTransform2DTo3D.cs (1)
98throw new InvalidOperationException(SR.Format(SR.GeneralTransform_TransformFailed, null));
System\Windows\Media3D\GeneralTransform3D.cs (1)
52throw new InvalidOperationException(SR.Format(SR.GeneralTransform_TransformFailed, null));
System\Windows\Media3D\GeneralTransform3DTo2D.cs (1)
63throw new InvalidOperationException(SR.Format(SR.GeneralTransform_TransformFailed, null));
System\Windows\Media3D\Generated\GeneralTransform3DCollection.cs (4)
795throw new InvalidOperationException(SR.Enumerator_CollectionChanged); 813throw new InvalidOperationException(SR.Enumerator_CollectionChanged); 847throw new InvalidOperationException(SR.Enumerator_NotStarted); 852throw new InvalidOperationException(SR.Enumerator_ReachedEnd);
System\Windows\Media3D\Generated\MaterialCollection.cs (4)
830throw new InvalidOperationException(SR.Enumerator_CollectionChanged); 848throw new InvalidOperationException(SR.Enumerator_CollectionChanged); 882throw new InvalidOperationException(SR.Enumerator_NotStarted); 887throw new InvalidOperationException(SR.Enumerator_ReachedEnd);
System\Windows\Media3D\Generated\Model3DCollection.cs (4)
830throw new InvalidOperationException(SR.Enumerator_CollectionChanged); 848throw new InvalidOperationException(SR.Enumerator_CollectionChanged); 882throw new InvalidOperationException(SR.Enumerator_NotStarted); 887throw new InvalidOperationException(SR.Enumerator_ReachedEnd);
System\Windows\Media3D\Generated\Point3DCollection.cs (4)
816throw new InvalidOperationException(SR.Enumerator_CollectionChanged); 834throw new InvalidOperationException(SR.Enumerator_CollectionChanged); 868throw new InvalidOperationException(SR.Enumerator_NotStarted); 873throw new InvalidOperationException(SR.Enumerator_ReachedEnd);
System\Windows\Media3D\Generated\Transform3DCollection.cs (4)
830throw new InvalidOperationException(SR.Enumerator_CollectionChanged); 848throw new InvalidOperationException(SR.Enumerator_CollectionChanged); 882throw new InvalidOperationException(SR.Enumerator_NotStarted); 887throw new InvalidOperationException(SR.Enumerator_ReachedEnd);
System\Windows\Media3D\Generated\Vector3DCollection.cs (4)
816throw new InvalidOperationException(SR.Enumerator_CollectionChanged); 834throw new InvalidOperationException(SR.Enumerator_CollectionChanged); 868throw new InvalidOperationException(SR.Enumerator_NotStarted); 873throw new InvalidOperationException(SR.Enumerator_ReachedEnd);
System\Windows\Media3D\Generated\Visual3D.cs (2)
86throw new InvalidOperationException(SR.Format(SR.IAnimatable_CantAnimateSealedDO, dp, this.GetType())); 151throw new InvalidOperationException(SR.Format(SR.IAnimatable_CantAnimateSealedDO, dp, this.GetType()));
System\Windows\Media3D\Matrix3D.cs (1)
651throw new InvalidOperationException(SR.Format(SR.Matrix3D_NotInvertible, null));
System\Windows\Media3D\ModelVisual3D.cs (1)
92throw new System.InvalidOperationException(SR.Format(SR.AddText_Invalid, this.GetType().Name));
System\Windows\Media3D\Quaternion.cs (1)
72throw new System.InvalidOperationException(SR.Quaternion_ZeroAxisSpecified);
System\Windows\Media3D\Rect3D.cs (9)
143throw new System.InvalidOperationException(SR.Rect3D_CannotModifyEmptyRect); 174throw new System.InvalidOperationException(SR.Rect3D_CannotModifyEmptyRect); 197throw new System.InvalidOperationException(SR.Rect3D_CannotModifyEmptyRect); 222throw new System.InvalidOperationException(SR.Rect3D_CannotModifyEmptyRect); 247throw new System.InvalidOperationException(SR.Rect3D_CannotModifyEmptyRect); 272throw new System.InvalidOperationException(SR.Rect3D_CannotModifyEmptyRect); 292throw new System.InvalidOperationException(SR.Rect3D_CannotModifyEmptyRect); 312throw new System.InvalidOperationException(SR.Rect3D_CannotModifyEmptyRect); 521throw new System.InvalidOperationException(SR.Rect3D_CannotCallMethod);
System\Windows\Media3D\Size3D.cs (3)
80throw new System.InvalidOperationException(SR.Size3D_CannotModifyEmptySize); 105throw new System.InvalidOperationException(SR.Size3D_CannotModifyEmptySize); 131throw new System.InvalidOperationException(SR.Size3D_CannotModifyEmptySize);
System\Windows\Media3D\Viewport3DVisual.cs (2)
322throw new InvalidOperationException(SR.CannotModifyVisualChildrenDuringTreeWalk); 370throw new InvalidOperationException(SR.CannotModifyVisualChildrenDuringTreeWalk);
System\Windows\Media3D\Visual3D.cs (3)
230throw new InvalidOperationException(SR.CannotModifyVisualChildrenDuringTreeWalk); 281throw new InvalidOperationException(SR.CannotModifyVisualChildrenDuringTreeWalk); 1729throw new System.InvalidOperationException(inverse ? SR.Visual_NotADescendant : SR.Visual_NotAnAncestor);
System\Windows\Media3D\Visual3DCollection.cs (3)
618throw new InvalidOperationException(SR.Enumerator_CollectionChanged); 638throw new InvalidOperationException(SR.Enumerator_CollectionChanged); 670throw new InvalidOperationException(SR.Enumerator_VerifyContext);
System\Windows\Navigation\BaseUriHelper.cs (1)
371throw new InvalidOperationException(SR.Format(SR.CannotNavigateToApplicationResourcesInWebBrowser, packUri));
System\Windows\Nrbf\SerializationRecordExtensions.cs (2)
156_ => throw new InvalidOperationException() 243_ => throw new InvalidOperationException()
System\Windows\PresentationSource.cs (4)
163throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, o.GetType())); 244throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, o.GetType())); 318throw new InvalidOperationException(); 699throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, doTarget.GetType()));
System\Windows\RoutedEventArgs.cs (5)
90throw new InvalidOperationException(SR.RoutedEventCannotChangeWhileRouting); 130throw new InvalidOperationException(SR.RoutedEventArgsMustHaveRoutedEvent); 182throw new InvalidOperationException(SR.RoutedEventCannotChangeWhileRouting); 186throw new InvalidOperationException(SR.RoutedEventArgsMustHaveRoutedEvent); 280throw new InvalidOperationException(SR.RoutedEventArgsMustHaveRoutedEvent);
System\Windows\UIElement.cs (5)
579throw new InvalidOperationException(SR.UIElement_Layout_NaNMeasure); 672throw new InvalidOperationException(SR.Format(SR.UIElement_Layout_PositiveInfinityReturned, this.GetType().FullName)); 676throw new InvalidOperationException(SR.Format(SR.UIElement_Layout_NaNReturned, this.GetType().FullName)); 799throw new InvalidOperationException( 1707throw new InvalidOperationException(SR.TreeLoop);
System\Windows\UIPropertyMetadata.cs (1)
106throw new InvalidOperationException(SR.TypeMetadataCannotChangeAfterUse);
PresentationFramework (890)
Microsoft\Win32\CommonDialog.cs (4)
59throw new InvalidOperationException(SR.CantShowModalOnNonInteractive); 130throw new InvalidOperationException(SR.CantShowModalOnNonInteractive); 139throw new InvalidOperationException(); 232throw new InvalidOperationException(SR.CantShowOnDifferentThread);
Microsoft\Win32\FileDialog.cs (1)
712throw new InvalidOperationException(SR.FileDialogInvalidFilterIndex);
Microsoft\Win32\OpenFileDialog.cs (2)
71throw new InvalidOperationException(SR.FileNameMustNotBeNull); 103throw new InvalidOperationException(SR.FileNameMustNotBeNull);
Microsoft\Win32\SaveFileDialog.cs (1)
72throw new InvalidOperationException(SR.FileNameMustNotBeNull);
MS\Internal\Annotations\Anchoring\LocatorManager.cs (1)
277throw new InvalidOperationException(SR.AnnotationServiceNotEnabled);
MS\Internal\Annotations\Component\AdornerPresentationContext.cs (3)
46throw new InvalidOperationException(SR.Format(SR.ComponentAlreadyInPresentationContext, adorner.AnnotationComponent)); 194if (foundAdorner == null) throw new InvalidOperationException(SR.Format(SR.ComponentNotInPresentationContext, component)); 488if (adorner == null) throw new InvalidOperationException(SR.Format(SR.ComponentNotInPresentationContext, component));
MS\Internal\Annotations\Component\AnnotationComponentManager.cs (1)
180throw new InvalidOperationException(SR.Format(SR.NoPresentationContextForGivenElement, annotatedElement));
MS\Internal\Annotations\Component\HighlightComponent.cs (1)
320throw new InvalidOperationException(SR.NoAttachedAnnotationToModify);
MS\Internal\Annotations\Component\MarkedHighlightComponent.cs (2)
187throw new InvalidOperationException(SR.InvalidAttachedAnnotation); 484if (layer == null) throw new InvalidOperationException(SR.Format(SR.NoPresentationContextForGivenElement, AnnotatedElement));
MS\Internal\Annotations\TextAnchor.cs (2)
635throw new InvalidOperationException(SR.TextSegmentsMustNotOverlap); 639throw new InvalidOperationException(SR.TextSegmentsMustNotOverlap);
MS\Internal\AppModel\AppModelKnownContentFactory.cs (4)
37throw new InvalidOperationException(SR.Format(SR.BamlIsNotSupportedOutsideOfApplicationResources)); 43throw new InvalidOperationException(SR.BamlIsNotSupportedOutsideOfApplicationResources); 52throw new InvalidOperationException(SR.BamlIsNotSupportedOutsideOfApplicationResources); 139throw new InvalidOperationException(SR.Format(SR.BamlIsNotSupportedOutsideOfApplicationResources));
MS\Internal\AppModel\AppSecurityManager.cs (1)
136throw new InvalidOperationException(SR.FailToLaunchDefaultBrowser,
MS\Internal\AppModel\JournalNavigationScope.cs (2)
182throw new InvalidOperationException(SR.NoForwardEntry); 204throw new InvalidOperationException(SR.NoBackEntry);
MS\Internal\Controls\ActiveXSite.cs (1)
182throw new InvalidOperationException(SR.AxWindowlessControl);
MS\Internal\Controls\ConnectionPointCookie.cs (1)
59ex = new InvalidOperationException(SR.Format(SR.AxNoSinkAdvise, eventInterface.Name, hr));
MS\Internal\Controls\EmptyEnumerator.cs (1)
55throw new InvalidOperationException();
MS\Internal\Controls\InnerItemCollectionView.cs (1)
714throw new InvalidOperationException(SR.ReparentModelChildIllegal);
MS\Internal\Controls\ModelTreeEnumerator.cs (2)
77throw new InvalidOperationException(SR.EnumeratorInvalidOperation); 119throw new InvalidOperationException(SR.EnumeratorVersionChanged);
MS\Internal\Controls\StickyNote\StickyNoteAnnotations.cs (2)
919throw new InvalidOperationException(SR.AddAnnotationsNotImplemented); 1008throw new InvalidOperationException(SR.InvalidAnchorPosition);
MS\Internal\Controls\StickyNote\StickyNoteContentControl.cs (4)
211throw new InvalidOperationException(SR.MaximumNoteSizeExceeded); 380throw new InvalidOperationException(SR.MaximumNoteSizeExceeded); 476throw new InvalidOperationException(SR.Format(SR.InvalidStickyNoteTemplate, type, typeof(RichTextBox), SNBConstants.c_ContentControlId)); 485throw new InvalidOperationException(SR.Format(SR.InvalidStickyNoteTemplate, type, typeof(InkCanvas), SNBConstants.c_ContentControlId));
MS\Internal\Data\CollectionViewGroupInternal.cs (2)
776throw new InvalidOperationException(); 812throw new InvalidOperationException();
MS\Internal\Data\CollectionViewProxy.cs (13)
409throw new InvalidOperationException(SR.Format(SR.MemberNotAllowedForView, "NewItemPlaceholderPosition")); 448throw new InvalidOperationException(SR.Format(SR.MemberNotAllowedForView, "AddNew")); 467throw new InvalidOperationException(SR.Format(SR.MemberNotAllowedForView, "CommitNew")); 484throw new InvalidOperationException(SR.Format(SR.MemberNotAllowedForView, "CancelNew")); 565throw new InvalidOperationException(SR.Format(SR.MemberNotAllowedForView, "RemoveAt")); 581throw new InvalidOperationException(SR.Format(SR.MemberNotAllowedForView, "Remove")); 605throw new InvalidOperationException(SR.Format(SR.MemberNotAllowedForView, "EditItem")); 622throw new InvalidOperationException(SR.Format(SR.MemberNotAllowedForView, "CommitEdit")); 639throw new InvalidOperationException(SR.Format(SR.MemberNotAllowedForView, "CancelEdit")); 746throw new InvalidOperationException(SR.Format(SR.MemberNotAllowedForView, "AddNewItem")); 810throw new InvalidOperationException(SR.Format(SR.CannotChangeLiveShaping, "IsLiveSorting", "CanChangeLiveSorting")); 833throw new InvalidOperationException(SR.Format(SR.CannotChangeLiveShaping, "IsLiveFiltering", "CanChangeLiveFiltering")); 856throw new InvalidOperationException(SR.Format(SR.CannotChangeLiveShaping, "IsLiveGrouping", "CanChangeLiveGrouping"));
MS\Internal\Data\CompositeCollectionView.cs (5)
624throw new InvalidOperationException(SR.CompositeCollectionResetOnlyOnClear); 1451throw new InvalidOperationException(SR.CannotMoveToUnknownPosition); 1554throw new InvalidOperationException(SR.EnumeratorNotStarted); 1559throw new InvalidOperationException(SR.EnumeratorReachedEnd); 1593throw new InvalidOperationException(SR.EnumeratorVersionChanged);
MS\Internal\Data\DefaultAsyncDataDispatcher.cs (1)
82request.Fail(new InvalidOperationException(SR.Format(SR.NonCLSException, "processing an async data request")));
MS\Internal\Data\EnumerableCollectionView.cs (6)
420throw new InvalidOperationException(SR.RemovedItemNotFound); 426throw new InvalidOperationException(SR.Format(SR.AddedItemNotAtIndex, index)); 436throw new InvalidOperationException(SR.Format(SR.AddedItemNotAtIndex, index)); 443throw new InvalidOperationException(SR.CannotMoveToUnknownPosition); 455throw new InvalidOperationException(SR.Format(SR.AddedItemNotAtIndex, oldIndex)); 469throw new InvalidOperationException(SR.Format(SR.AddedItemNotAtIndex, oldIndex));
MS\Internal\Data\IndexedEnumerable.cs (2)
722throw new InvalidOperationException(SR.EnumeratorVersionChanged); 733throw new InvalidOperationException(SR.EnumeratorVersionChanged);
MS\Internal\Data\ParameterCollection.cs (1)
170throw new InvalidOperationException(SR.ObjectDataProviderParameterCollectionIsNotInUse);
MS\Internal\Data\PropertyPathWorker.cs (5)
1532_host?.ReportGetValueError(k, item, new InvalidOperationException(SR.Format(SR.NonCLSException, "GetValue"))); 1581throw new InvalidOperationException(SR.Format(SR.CannotWriteToReadOnly, item.GetType(), pi.Name)); 1586throw new InvalidOperationException(SR.Format(SR.CannotWriteToReadOnly, item.GetType(), pd.Name)); 1591throw new InvalidOperationException(SR.Format(SR.CannotWriteToReadOnly, item.GetType(), dp.Name)); 1596throw new InvalidOperationException(SR.Format(SR.CannotWriteToReadOnly, item.GetType(), dpa.PropertyName));
MS\Internal\Data\RBTree.cs (1)
125throw new InvalidOperationException(SR.InvalidOperation_IComparerFailed, e);
MS\Internal\Data\ViewManager.cs (1)
394throw new InvalidOperationException(SR.Format(SR.CollectionView_MissingSynchronizationCallback, collection));
MS\Internal\Documents\ContentElementCollection.cs (4)
318throw new InvalidOperationException(SR.EnumeratorVersionChanged); 343throw new InvalidOperationException(SR.EnumeratorNotStarted); 347throw new InvalidOperationException(SR.EnumeratorReachedEnd); 370throw new InvalidOperationException(SR.EnumeratorVersionChanged);
MS\Internal\Documents\DocumentGrid.cs (5)
1053throw new InvalidOperationException(SR.DocumentGridVisualTreeContainsNonBorderAsFirstElement); 1068throw new InvalidOperationException(SR.DocumentGridVisualTreeContainsNonDocumentGridPage); 1195throw new InvalidOperationException(SR.DocumentGridVisualTreeOutOfSync); 1223throw new InvalidOperationException(SR.DocumentGridVisualTreeContainsNonUIElement); 2465throw new InvalidOperationException(SR.DocumentGridInvalidViewMode);
MS\Internal\Documents\DocumentPageTextView.cs (11)
100throw new InvalidOperationException(SR.TextViewInvalidLayout); 125throw new InvalidOperationException(SR.TextViewInvalidLayout); 147throw new InvalidOperationException(SR.TextViewInvalidLayout); 176throw new InvalidOperationException(SR.TextViewInvalidLayout); 212throw new InvalidOperationException(SR.TextViewInvalidLayout); 243throw new InvalidOperationException(SR.TextViewInvalidLayout); 260throw new InvalidOperationException(SR.TextViewInvalidLayout); 277throw new InvalidOperationException(SR.TextViewInvalidLayout); 294throw new InvalidOperationException(SR.TextViewInvalidLayout); 311throw new InvalidOperationException(SR.TextViewInvalidLayout); 328throw new InvalidOperationException(SR.TextViewInvalidLayout);
MS\Internal\Documents\FlowDocumentFormatter.cs (2)
59throw new InvalidOperationException(SR.FlowDocumentFormattingReentrancy); 63throw new InvalidOperationException(SR.TextContainerChangingReentrancyInvalid);
MS\Internal\Documents\FlowDocumentPaginator.cs (8)
79throw new InvalidOperationException(SR.FlowDocumentFormattingReentrancy); 83throw new InvalidOperationException(SR.TextContainerChangingReentrancyInvalid); 152throw new InvalidOperationException(SR.FlowDocumentFormattingReentrancy); 156throw new InvalidOperationException(SR.TextContainerChangingReentrancyInvalid); 295throw new InvalidOperationException(SR.FlowDocumentFormattingReentrancy); 299throw new InvalidOperationException(SR.TextContainerChangingReentrancyInvalid); 537throw new InvalidOperationException(SR.FlowDocumentInvalidContnetChange); 769throw new InvalidOperationException(SR.FlowDocumentFormattingReentrancy);
MS\Internal\Documents\HostedElements.cs (2)
161throw new InvalidOperationException(SR.EnumeratorCollectionDisposed); 168throw new InvalidOperationException(SR.EnumeratorNotStarted);
MS\Internal\Documents\MultiPageTextView.cs (15)
97throw new InvalidOperationException(SR.TextViewInvalidLayout); 124throw new InvalidOperationException(SR.TextViewInvalidLayout); 147throw new InvalidOperationException(SR.TextViewInvalidLayout); 192throw new InvalidOperationException(SR.TextViewInvalidLayout); 205throw new InvalidOperationException(SR.TextViewInvalidLayout); 221throw new InvalidOperationException(SR.TextViewInvalidLayout); 243throw new InvalidOperationException(SR.TextViewInvalidLayout); 265throw new InvalidOperationException(SR.TextViewInvalidLayout); 287throw new InvalidOperationException(SR.TextViewInvalidLayout); 306throw new InvalidOperationException(SR.TextViewInvalidLayout); 323throw new InvalidOperationException(SR.TextViewInvalidLayout); 385throw new InvalidOperationException(SR.TextViewInvalidLayout); 482throw new InvalidOperationException(SR.TextViewInvalidLayout); 505throw new InvalidOperationException(SR.TextViewInvalidLayout); 605throw new InvalidOperationException(SR.TextViewInvalidLayout);
MS\Internal\Documents\PageCache.cs (1)
338throw new InvalidOperationException("parameter");
MS\Internal\Documents\ParentUndoUnit.cs (5)
69throw new InvalidOperationException(SR.UndoUnitCantBeOpenedTwice); 114throw new InvalidOperationException(SR.UndoNoOpenUnit); 225throw new InvalidOperationException(SR.UndoUnitCantBeAddedTwice); 230throw new InvalidOperationException(SR.UndoUnitLocked); 255throw new InvalidOperationException(SR.UndoUnitLocked);
MS\Internal\Documents\RowCache.cs (6)
288throw new InvalidOperationException(SR.RowCachePageNotFound); 441throw new InvalidOperationException(SR.RowCacheRecalcWithNoPageCache); 496throw new InvalidOperationException(SR.RowCacheRecalcWithNoPageCache); 868throw new InvalidOperationException(SR.RowCacheCannotModifyNonExistentLayout); 1000throw new InvalidOperationException(SR.RowCacheCannotModifyNonExistentLayout); 1056throw new InvalidOperationException(SR.RowCacheCannotModifyNonExistentLayout);
MS\Internal\Documents\TextDocumentView.cs (11)
64throw new InvalidOperationException(SR.TextViewInvalidLayout); 87throw new InvalidOperationException(SR.TextViewInvalidLayout); 114throw new InvalidOperationException(SR.TextViewInvalidLayout); 230throw new InvalidOperationException(SR.TextViewInvalidLayout); 281throw new InvalidOperationException(SR.TextViewInvalidLayout); 300throw new InvalidOperationException(SR.TextViewInvalidLayout); 320throw new InvalidOperationException(SR.TextViewInvalidLayout); 339throw new InvalidOperationException(SR.TextViewInvalidLayout); 360throw new InvalidOperationException(SR.TextViewInvalidLayout); 387throw new InvalidOperationException(SR.TextViewInvalidLayout); 426throw new InvalidOperationException(SR.TextViewInvalidLayout);
MS\Internal\Documents\TextParagraphView.cs (9)
63throw new InvalidOperationException(SR.TextViewInvalidLayout); 87throw new InvalidOperationException(SR.TextViewInvalidLayout); 106throw new InvalidOperationException(SR.TextViewInvalidLayout); 131throw new InvalidOperationException(SR.TextViewInvalidLayout); 192throw new InvalidOperationException(SR.TextViewInvalidLayout); 211throw new InvalidOperationException(SR.TextViewInvalidLayout); 234throw new InvalidOperationException(SR.TextViewInvalidLayout); 260throw new InvalidOperationException(SR.TextViewInvalidLayout); 285throw new InvalidOperationException(SR.TextViewInvalidLayout);
MS\Internal\Documents\TextViewBase.cs (5)
109throw new InvalidOperationException(SR.TextViewInvalidLayout); 180throw new InvalidOperationException(SR.TextViewInvalidLayout); 195throw new InvalidOperationException(SR.TextViewInvalidLayout); 213throw new InvalidOperationException(SR.TextViewInvalidLayout); 231throw new InvalidOperationException(SR.TextViewInvalidLayout);
MS\Internal\Documents\UndoManager.cs (19)
100throw new InvalidOperationException(SR.UndoManagerAlreadyAttached); 190throw new InvalidOperationException(SR.UndoServiceDisabled); 198throw new InvalidOperationException(SR.UndoUnitCantBeOpenedTwice); 239throw new InvalidOperationException(SR.UndoServiceDisabled); 246throw new InvalidOperationException(SR.UndoUnitAlreadyOpen); 256throw new InvalidOperationException(SR.UndoUnitNotOnTopOfStack); 266throw new InvalidOperationException(SR.UndoUnitNotOnTopOfStack); 280throw new InvalidOperationException(SR.UndoUnitLocked); 315throw new InvalidOperationException(SR.UndoServiceDisabled); 322throw new InvalidOperationException(SR.UndoNoOpenUnit); 408throw new InvalidOperationException(SR.UndoServiceDisabled); 461throw new InvalidOperationException(SR.UndoNoOpenParentUnit); 475throw new InvalidOperationException(SR.UndoServiceDisabled); 506throw new InvalidOperationException(SR.UndoServiceDisabled); 514throw new InvalidOperationException(SR.UndoNotInNormalState); 519throw new InvalidOperationException(SR.UndoUnitOpen); 571throw new InvalidOperationException(SR.UndoServiceDisabled); 579throw new InvalidOperationException(SR.UndoNotInNormalState); 584throw new InvalidOperationException(SR.UndoUnitOpen);
MS\Internal\FrameworkObject.cs (1)
66throw new InvalidOperationException(SR.Format(SR.MustBeFrameworkDerived, arg));
MS\Internal\Globalization\BamlResourceDeserializer.cs (1)
315throw new InvalidOperationException(SR.NullParentNode);
MS\Internal\Helper.cs (1)
291throw new InvalidOperationException(SR.Format(SR.MustBeFrameworkDerived, d.GetType()));
MS\Internal\IO\Packaging\CorePropertiesFilter.cs (1)
406throw new InvalidOperationException(
MS\Internal\IO\Packaging\indexingfiltermarshaler.cs (2)
98throw new InvalidOperationException(SR.FilterGetTextBufferOverflow); 207throw new InvalidOperationException(
MS\Internal\Markup\StaticExtension.cs (1)
40throw new InvalidOperationException(SR.MarkupExtensionStaticMember);
MS\Internal\Navigation\JournalEntryStack.cs (1)
138throw new InvalidOperationException(SR.EnumeratorVersionChanged);
MS\Internal\PtsHost\ContainerParagraph.cs (1)
1018throw new InvalidOperationException(SR.Format(SR.TextSchema_TextIsNotAllowedInThisContext, Element.GetType().Name));
MS\Internal\PtsHost\StructuralCache.cs (1)
113throw new InvalidOperationException(SR.IllegalTreeChangeDetectedPostAction);
MS\Internal\WindowsRuntime\Generated\WinRT\ComWrappersSupport.net5.cs (1)
135throw new InvalidOperationException("Cannot release objects that are not runtime wrappers of native WinRT objects.");
MS\Internal\WindowsRuntime\Generated\WinRT\ExceptionHelpers.cs (1)
145ex = new InvalidOperationException(description);
MS\Internal\WindowsRuntime\Generated\WinRT\GuidGenerator.cs (1)
80throw new InvalidOperationException("unsupported value type");
MS\Internal\WindowsRuntime\Generated\WinRT\Marshalers.cs (1)
986throw new InvalidOperationException("Arrays may not be marshaled generically.");
MS\Internal\WindowsRuntime\Generated\WinRT\ObjectReference.cs (1)
83throw new InvalidOperationException("Target type is not a projected interface.");
MS\Internal\WindowsRuntime\Generated\WinRT\Projections\IEnumerable.cs (6)
77throw new InvalidOperationException("Unexpected type for enumerator"); 240throw new InvalidOperationException(ErrorStrings.InvalidOperation_EnumNotStarted); 243throw new InvalidOperationException(ErrorStrings.InvalidOperation_EnumEnded); 254throw new InvalidOperationException(ErrorStrings.InvalidOperation_EnumNotStarted); 257throw new InvalidOperationException(ErrorStrings.InvalidOperation_EnumEnded); 303throw new InvalidOperationException(ErrorStrings.InvalidOperation_EnumFailedVersion);
MS\Internal\WindowsRuntime\Generated\WinRT\Projections\IReadOnlyList.cs (1)
74throw new InvalidOperationException(ErrorStrings.InvalidOperation_CollectionBackingListTooLarge);
MS\Internal\WindowsRuntime\Generated\WinRT\TypeExtensions.cs (1)
36throw new InvalidOperationException($"Target type is not a projected type: {type.FullName}.");
src\Microsoft.DotNet.Wpf\src\Shared\MS\Internal\Xaml\Parser\SpecialBracketCharacters.cs (4)
51throw new InvalidOperationException(); 76throw new InvalidOperationException("Opening bracket character cannot be the same as closing bracket character."); 80throw new InvalidOperationException("Bracket characters cannot be alpha-numeric or whitespace."); 84throw new InvalidOperationException("Bracket characters cannot be one of the following: '=' , ',', '\'', '\"', '{ ', ' }', '\\'");
src\Microsoft.DotNet.Wpf\src\Shared\Telemetry\Managed\EventSourceActivity.cs (3)
316throw new InvalidOperationException(); 329throw new InvalidOperationException(); 339throw new InvalidOperationException();
System\Windows\Annotations\Annotation.cs (1)
196throw new InvalidOperationException(SR.CannotSerializeInvalidInstance);
System\Windows\Annotations\AnnotationHelper.cs (3)
496throw new InvalidOperationException(SR.EmptySelectionNotSupported); 920throw new InvalidOperationException(SR.EmptySelectionNotSupported); 1098throw new InvalidOperationException(SR.OnlyFlowFixedSupported);
System\Windows\Annotations\AnnotationService.cs (8)
165throw new InvalidOperationException(SR.AnnotationServiceIsAlreadyEnabled); 204throw new InvalidOperationException(SR.OnlyFlowFixedSupported); 225throw new InvalidOperationException(SR.AnnotationServiceNotEnabled); 358throw new InvalidOperationException(SR.AnnotationServiceNotEnabled); 393throw new InvalidOperationException(SR.AnnotationServiceNotEnabled); 427throw new InvalidOperationException(SR.AnnotationServiceNotEnabled); 1050throw new InvalidOperationException(SR.AnnotationServiceAlreadyExists); 1136throw new InvalidOperationException(SR.AnnotationServiceAlreadyExists);
System\Windows\Annotations\Storage\XmlStreamStore.cs (2)
575throw new InvalidOperationException(SR.CannotParseId, fe); 933throw new InvalidOperationException(SR.StreamNotSet);
System\Windows\Application.cs (6)
115throw new InvalidOperationException(SR.MultiSingleton); 840throw new InvalidOperationException(SR.ShutdownModeWhenAppShutdown); 1095throw new InvalidOperationException(SR.Format(SR.PropertyIsImmutable, "ResourceAssembly", "Application")); 1680throw new InvalidOperationException(SR.Format(SR.CannotCallRunMultipleTimes, this.GetType().FullName)); 2043throw new InvalidOperationException(SR.ApplicationShuttingDown); 2397throw new InvalidOperationException(SR.ApplicationAlreadyRunning);
System\Windows\Automation\Peers\CalendarAutomationPeer.cs (4)
197throw new InvalidOperationException(SR.SetFocusFailed); 203throw new InvalidOperationException(SR.SetFocusFailed); 486throw new InvalidOperationException(SR.InavalidStartItem); 510throw new InvalidOperationException(SR.CalendarNamePropertyValueNotValid);
System\Windows\Automation\Peers\ComboBoxAutomationPeer.cs (3)
99throw new InvalidOperationException(SR.SetFocusFailed); 102throw new InvalidOperationException(SR.SetFocusFailed); 107throw new InvalidOperationException(SR.SetFocusFailed);
System\Windows\Automation\Peers\DataGridCellItemAutomationPeer.cs (6)
650throw new InvalidOperationException(SR.DataGrid_AutomationInvokeFailed); 687throw new InvalidOperationException(SR.DataGrid_CannotSelectCell); 702throw new InvalidOperationException(); 712throw new InvalidOperationException(SR.DataGrid_CannotSelectCell); 728throw new InvalidOperationException(SR.DataGrid_CannotSelectCell); 753throw new InvalidOperationException(SR.DataGrid_ColumnIsReadOnly);
System\Windows\Automation\Peers\DataGridColumnHeaderItemAutomationPeer.cs (3)
166throw new InvalidOperationException(SR.DataGridColumnHeaderItemAutomationPeer_Unsupported); 177throw new InvalidOperationException(SR.DataGridColumnHeaderItemAutomationPeer_Unresizable); 183throw new InvalidOperationException(SR.DataGridColumnHeaderItemAutomationPeer_Unsupported);
System\Windows\Automation\Peers\DataGridColumnHeadersPresenterAutomationPeer.cs (1)
185throw new InvalidOperationException(SR.InavalidStartItem);
System\Windows\Automation\Peers\DataGridItemAutomationPeer.cs (6)
157throw new InvalidOperationException(SR.InavalidStartItem); 251throw new InvalidOperationException(SR.DataGrid_AutomationInvokeFailed); 288throw new InvalidOperationException(SR.DataGridRow_CannotSelectRowWhenCells); 303throw new InvalidOperationException(); 316throw new InvalidOperationException(SR.DataGridRow_CannotSelectRowWhenCells); 332throw new InvalidOperationException(SR.DataGridRow_CannotSelectRowWhenCells);
System\Windows\Automation\Peers\DatePickerAutomationPeer.cs (2)
68throw new InvalidOperationException(SR.SetFocusFailed); 74throw new InvalidOperationException(SR.SetFocusFailed);
System\Windows\Automation\Peers\GridSplitterAutomationPeer.cs (2)
52throw new InvalidOperationException(SR.UIA_OperationCannotBePerformed); 56throw new InvalidOperationException(SR.UIA_OperationCannotBePerformed);
System\Windows\Automation\Peers\GridViewColumnHeaderAutomationPeer.cs (2)
71throw new InvalidOperationException(SR.UIA_OperationCannotBePerformed); 93throw new InvalidOperationException(SR.UIA_OperationCannotBePerformed);
System\Windows\Automation\Peers\GroupItemAutomationPeer.cs (1)
314throw new InvalidOperationException(SR.SetFocusFailed);
System\Windows\Automation\Peers\ItemsControlAutomationPeer.cs (1)
262throw new InvalidOperationException(SR.InavalidStartItem);
System\Windows\Automation\Peers\MenuItemAutomationPeer.cs (3)
202throw new InvalidOperationException(SR.UIA_OperationCannotBePerformed); 220throw new InvalidOperationException(SR.UIA_OperationCannotBePerformed); 278throw new InvalidOperationException(SR.UIA_OperationCannotBePerformed);
System\Windows\Automation\Peers\PasswordBoxAutomationPeer.cs (1)
108throw new InvalidOperationException();
System\Windows\Automation\Peers\ProgressBarAutomationPeer.cs (1)
47throw new InvalidOperationException(SR.ProgressBarReadOnly);
System\Windows\Automation\Peers\RadioButtonAutomationPeer.cs (2)
64throw new InvalidOperationException(SR.UIA_OperationCannotBePerformed); 75throw new InvalidOperationException(SR.UIA_OperationCannotBePerformed);
System\Windows\Automation\Peers\ScrollViewerAutomationPeer.cs (4)
85throw new InvalidOperationException(SR.UIA_OperationCannotBePerformed); 105throw new InvalidOperationException(SR.UIA_OperationCannotBePerformed); 125throw new InvalidOperationException(SR.UIA_OperationCannotBePerformed); 148throw new InvalidOperationException(SR.UIA_OperationCannotBePerformed);
System\Windows\Automation\Peers\SelectorItemAutomationPeer.cs (2)
40throw new InvalidOperationException(SR.UIA_OperationCannotBePerformed); 60throw new InvalidOperationException(SR.UIA_OperationCannotBePerformed);
System\Windows\Automation\Peers\TabItemAutomationPeer.cs (1)
88throw new InvalidOperationException(SR.UIA_OperationCannotBePerformed);
System\Windows\Automation\Peers\TreeViewItemAutomationPeer.cs (3)
262throw new InvalidOperationException(SR.UIA_OperationCannotBePerformed); 278throw new InvalidOperationException(SR.UIA_OperationCannotBePerformed); 330throw new InvalidOperationException(SR.UIA_OperationCannotBePerformed);
System\Windows\ColorConvertedBitmapExtension.cs (4)
59throw new InvalidOperationException(SR.ColorConvertedBitmapExtensionSyntax); 77throw new InvalidOperationException(SR.ColorConvertedBitmapExtensionNoSourceImage); 81throw new InvalidOperationException(SR.ColorConvertedBitmapExtensionNoSourceProfile); 92throw new InvalidOperationException(SR.Format(SR.MarkupExtensionNoContext, GetType().Name, "IUriContext" ));
System\Windows\ComponentResourceKey.cs (2)
54throw new InvalidOperationException(SR.ChangingTypeNotAllowed); 86throw new InvalidOperationException(SR.ChangingIdNotAllowed);
System\Windows\Condition.cs (11)
83throw new InvalidOperationException(SR.Format(SR.CannotChangeAfterSealed, "Condition")); 88throw new InvalidOperationException(SR.ConditionCannotUseBothPropertyAndBinding); 106throw new InvalidOperationException(SR.Format(SR.CannotChangeAfterSealed, "Condition")); 111throw new InvalidOperationException(SR.ConditionCannotUseBothPropertyAndBinding); 129throw new InvalidOperationException(SR.Format(SR.CannotChangeAfterSealed, "Condition")); 164throw new InvalidOperationException(SR.Format(SR.CannotChangeAfterSealed, "Condition")); 185throw new InvalidOperationException(SR.ConditionCannotUseBothPropertyAndBinding); 193throw new InvalidOperationException(SR.Format(SR.NullPropertyIllegal, "Property")); 198throw new InvalidOperationException(SR.Format(SR.InvalidPropertyValue, _value, _property.Name)); 206throw new InvalidOperationException(SR.Format(SR.NullPropertyIllegal, "Binding")); 211throw new InvalidOperationException(SR.Format(SR.UnexpectedValueTypeForCondition, type));
System\Windows\ConditionCollection.cs (1)
101throw new InvalidOperationException(SR.Format(SR.CannotChangeAfterSealed, "ConditionCollection"));
System\Windows\Controls\AdornedElementPlaceholder.cs (2)
165throw new InvalidOperationException(SR.AdornedElementPlaceholderMustBeInTemplate); 183throw new InvalidOperationException(SR.AdornedElementPlaceholderMustBeInTemplate);
System\Windows\Controls\AVElementHelper.cs (1)
721throw new InvalidOperationException(SR.MediaElement_CannotSetSourceOnMediaElementDrivenByClock);
System\Windows\Controls\Calendar.cs (1)
581throw new InvalidOperationException(SR.Calendar_OnSelectedDateChanged_InvalidOperation);
System\Windows\Controls\ColumnDefinition.cs (7)
578throw new InvalidOperationException(SR.Format(SR.GridCollection_CannotModifyReadOnly, "ColumnDefinitionCollection")); 846throw new InvalidOperationException(SR.EnumeratorNotStarted); 851throw new InvalidOperationException(SR.EnumeratorReachedEnd); 872throw new InvalidOperationException(SR.EnumeratorNotStarted); 877throw new InvalidOperationException(SR.EnumeratorReachedEnd); 920throw new InvalidOperationException(SR.EnumeratorCollectionDisposed); 924throw new InvalidOperationException(SR.EnumeratorVersionChanged);
System\Windows\Controls\ContentControl.cs (1)
195throw new InvalidOperationException(SR.ContentControlCannotHaveMultipleContent);
System\Windows\Controls\ContextMenu.cs (2)
678throw new InvalidOperationException(SR.Format(SR.ElementMustBeInPopup, "ContextMenu")); 688throw new InvalidOperationException(SR.Format(SR.ElementMustBeInPopup, "ContextMenu"));
System\Windows\Controls\DataErrorValidationRule.cs (1)
105throw new InvalidOperationException(SR.Format(SR.ValidationRule_UnexpectedValue, this, value));
System\Windows\Controls\DataGrid.cs (2)
4118throw new InvalidOperationException(SR.DataGrid_CannotSelectCell); 7109throw new InvalidOperationException(SR.DataGrid_ProbableInvalidSortDescription, invalidOperationException);
System\Windows\Controls\DataGridColumnHeaderCollection.cs (3)
110throw new InvalidOperationException(); 118throw new InvalidOperationException(); 134throw new InvalidOperationException();
System\Windows\Controls\DataGridRow.cs (1)
1054throw new InvalidOperationException(SR.DataGridRow_CannotSelectRowWhenCells);
System\Windows\Controls\Frame.cs (4)
537throw new InvalidOperationException(SR.FrameNoAddChild); 846throw new InvalidOperationException(SR.InvalidOperation_NoJournal); 920throw new InvalidOperationException(SR.InvalidOperation_NoJournal); 934throw new InvalidOperationException(SR.InvalidOperation_NoJournal);
System\Windows\Controls\Grid.cs (2)
3971throw new InvalidOperationException(SR.EnumeratorNotStarted); 3976throw new InvalidOperationException(SR.EnumeratorReachedEnd);
System\Windows\Controls\GridView.cs (1)
62throw new InvalidOperationException(SR.ListView_IllegalChildrenType);
System\Windows\Controls\GridViewColumnCollection.cs (2)
431throw new InvalidOperationException(SR.ListView_NotAllowShareColumnToTwoColumnCollection); 439throw new InvalidOperationException(SR.ListView_GridViewColumnCollectionIsReadOnly);
System\Windows\Controls\GroupItem.cs (2)
186throw new InvalidOperationException(SR.Format(SR.StyleForWrongType, style.TargetType.Name, this.GetType().Name)); 267throw new InvalidOperationException(SR.PageCacheSizeNotAllowed);
System\Windows\Controls\ItemCollection.cs (15)
246throw new InvalidOperationException(SR.ItemsSourceInUse); 335throw new InvalidOperationException(SR.ItemCollectionHasNoCollection); 887throw new InvalidOperationException(SR.Format(SR.MemberNotAllowedForView, "NewItemPlaceholderPosition")); 926throw new InvalidOperationException(SR.Format(SR.MemberNotAllowedForView, "AddNew")); 945throw new InvalidOperationException(SR.Format(SR.MemberNotAllowedForView, "CommitNew")); 962throw new InvalidOperationException(SR.Format(SR.MemberNotAllowedForView, "CancelNew")); 1043throw new InvalidOperationException(SR.Format(SR.MemberNotAllowedForView, "RemoveAt")); 1059throw new InvalidOperationException(SR.Format(SR.MemberNotAllowedForView, "Remove")); 1083throw new InvalidOperationException(SR.Format(SR.MemberNotAllowedForView, "EditItem")); 1100throw new InvalidOperationException(SR.Format(SR.MemberNotAllowedForView, "CommitEdit")); 1117throw new InvalidOperationException(SR.Format(SR.MemberNotAllowedForView, "CancelEdit")); 1224throw new InvalidOperationException(SR.Format(SR.MemberNotAllowedForView, "AddNewItem")); 1497throw new InvalidOperationException(SR.CannotUseItemsSource); 1932throw new InvalidOperationException(SR.ItemsSourceInUse); 1975throw new InvalidOperationException(SR.NoCheckOrChangeWhenDeferred);
System\Windows\Controls\ItemContainerGenerator.cs (9)
207throw new InvalidOperationException(SR.GenerationInProgress); 216throw new InvalidOperationException(SR.GenerationInProgress); 225throw new InvalidOperationException(SR.GenerationNotInProgress); 233throw new InvalidOperationException(SR.GenerationNotInProgress); 302throw new InvalidOperationException(SR.Format(SR.CannotRemoveUnrealizedItems, index, count)); 333throw new InvalidOperationException(SR.CannotRecyleHeterogeneousTypes); 1101throw new InvalidOperationException(SR.Generator_Inconsistent, exception); 2250throw new InvalidOperationException(SR.CannotFindRemovedItem); 2375throw new InvalidOperationException(SR.Format(SR.CollectionAddEventMissingItem, item));
System\Windows\Controls\ItemsControl.cs (4)
412throw new InvalidOperationException(SR.DisplayMemberPathAndItemTemplateSelectorDefined); 654throw new InvalidOperationException(SR.ItemTemplateSelectorBreaksDisplayMemberPath); 658throw new InvalidOperationException(SR.DisplayMemberPathAndItemTemplateDefined); 3477throw new InvalidOperationException(SR.Format(SR.StyleForWrongType, style.TargetType.Name, container.GetType().Name));
System\Windows\Controls\ItemsPanelTemplate.cs (3)
73throw new InvalidOperationException(SR.TemplateNotTargetType); 117throw new InvalidOperationException(SR.Format(SR.ItemsPanelNotAPanel, templateHolder.RootType)); 125throw new InvalidOperationException(SR.Format(SR.ItemsPanelNotAPanel, root.Type));
System\Windows\Controls\ItemsPresenter.cs (1)
46throw new InvalidOperationException(SR.ItemsPanelNotSingleNode);
System\Windows\Controls\ListBox.cs (1)
1007throw new InvalidOperationException(SR.Format(SR.ListBoxInvalidAnchorItem, value));
System\Windows\Controls\ListView.cs (1)
93throw new InvalidOperationException(SR.ListView_ViewCannotBeShared);
System\Windows\Controls\MenuItem.cs (1)
2101throw new InvalidOperationException(SR.Format(SR.InvalidItemContainer, this.GetType().Name, nameof(MenuItem), nameof(Separator), itemContainer));
System\Windows\Controls\MultipleCopiesCollection.cs (4)
290throw new InvalidOperationException(); 351throw new InvalidOperationException(); 376throw new InvalidOperationException(); 388throw new InvalidOperationException();
System\Windows\Controls\Page.cs (6)
82throw new InvalidOperationException(SR.PageCannotHaveMultipleContent); 158throw new InvalidOperationException(SR.CannotQueryPropertiesWhenPageNotInTreeWithWindow); 213throw new InvalidOperationException(SR.CannotQueryPropertiesWhenPageNotInTreeWithWindow); 265throw new InvalidOperationException(SR.CannotQueryPropertiesWhenPageNotInTreeWithWindow); 361throw new InvalidOperationException(SR.CannotQueryPropertiesWhenPageNotInTreeWithWindow); 697throw new InvalidOperationException(SR.ParentOfPageMustBeWindowOrFrame);
System\Windows\Controls\Panel.cs (2)
84throw new InvalidOperationException(SR.Panel_BoundPanel_NoChildren); 574throw new InvalidOperationException(SR.Panel_ItemsControlNotFound);
System\Windows\Controls\Primitives\DocumentViewerBase.cs (1)
1701throw new InvalidOperationException(SR.DocumentViewerCanHaveOnlyOneChild);
System\Windows\Controls\Primitives\MenuBase.cs (1)
504throw new InvalidOperationException(SR.Format(SR.InvalidItemContainer, this.GetType().Name, nameof(MenuItem), nameof(Separator), itemContainer));
System\Windows\Controls\Primitives\Popup.cs (3)
351throw new InvalidOperationException(SR.PopupReopeningNotAllowed); 890throw new InvalidOperationException(SR.Format(SR.CreateRootPopup_ChildHasLogicalParent, child, currentParent)); 895throw new InvalidOperationException(SR.Format(SR.CreateRootPopup_ChildHasVisualParent, child, currentParent));
System\Windows\Controls\Primitives\Selector.cs (2)
862throw new InvalidOperationException(SR.ChangingCollectionNotSupported); 1430throw new InvalidOperationException(SR.CannotSelectNotSelectableItem);
System\Windows\Controls\Primitives\StatusBar.cs (1)
123throw new InvalidOperationException(SR.Format(SR.InvalidItemContainer, this.GetType().Name, nameof(StatusBarItem), nameof(Separator), itemContainer));
System\Windows\Controls\Primitives\TextBoxBase.cs (3)
396throw new InvalidOperationException(SR.TextBoxBase_UnmatchedEndChange); 1627throw new InvalidOperationException(SR.TextBoxBase_CantSetIsUndoEnabledInsideChangeBlock); 1657throw new InvalidOperationException(SR.TextBoxBase_CantSetIsUndoEnabledInsideChangeBlock);
System\Windows\Controls\RichTextBox.cs (1)
365throw new InvalidOperationException(SR.RichTextBox_CantSetDocumentInsideChangeBlock);
System\Windows\Controls\RowDefinition.cs (7)
573throw new InvalidOperationException(SR.Format(SR.GridCollection_CannotModifyReadOnly, "RowDefinitionCollection")); 841throw new InvalidOperationException(SR.EnumeratorNotStarted); 846throw new InvalidOperationException(SR.EnumeratorReachedEnd); 867throw new InvalidOperationException(SR.EnumeratorNotStarted); 872throw new InvalidOperationException(SR.EnumeratorReachedEnd); 915throw new InvalidOperationException(SR.EnumeratorCollectionDisposed); 919throw new InvalidOperationException(SR.EnumeratorVersionChanged);
System\Windows\Controls\SelectedDatesCollection.cs (2)
446throw new InvalidOperationException(SR.Calendar_OnSelectedDateChanged_InvalidOperation); 451throw new InvalidOperationException(SR.Calendar_CheckSelectionMode_InvalidOperation);
System\Windows\Controls\SelectedItemCollection.cs (7)
86throw new InvalidOperationException(SR.InsertInDeferSelectionActive); 105throw new InvalidOperationException(SR.SetInDeferSelectionActive); 127throw new InvalidOperationException(SR.MoveInDeferSelectionActive); 188throw new InvalidOperationException(SR.DeferSelectionActive); 201throw new InvalidOperationException(SR.DeferSelectionNotActive); 225throw new InvalidOperationException(SR.DeferSelectionNotActive); 238throw new InvalidOperationException(SR.DeferSelectionNotActive);
System\Windows\Controls\StickyNote.cs (1)
1679throw new InvalidOperationException(SR.CannotProcessInkCommand);
System\Windows\Controls\TextAdaptor.cs (2)
490throw new InvalidOperationException(SR.TextProvider_TextSelectionNotSupported); 641throw new InvalidOperationException(SR.TextProvider_InvalidChildElement);
System\Windows\Controls\TextBlock.cs (7)
389throw new InvalidOperationException(SR.TextContainerChangingReentrancyInvalid); 1846throw new InvalidOperationException(SR.TextContainerChangingReentrancyInvalid); 3340throw new InvalidOperationException(SR.IllegalTreeChangeDetected); 3559throw new InvalidOperationException(SR.MeasureReentrancyInvalid); 3564throw new InvalidOperationException(SR.ArrangeReentrancyInvalid); 3569throw new InvalidOperationException(SR.TextContainerChangingReentrancyInvalid); 4014throw new InvalidOperationException();
System\Windows\Controls\TextBox.cs (1)
130throw new InvalidOperationException(SR.Format(SR.TextBoxInvalidChild, value.ToString()));
System\Windows\Controls\TextRangeAdaptor.cs (3)
2036throw new InvalidOperationException(SR.TextProvider_TextSelectionNotSupported); 2051throw new InvalidOperationException(); 2061throw new InvalidOperationException();
System\Windows\Controls\ToolTip.cs (2)
455throw new InvalidOperationException(SR.Format(SR.ElementMustBeInPopup, "ToolTip")); 465throw new InvalidOperationException(SR.Format(SR.ElementMustBeInPopup, "ToolTip"));
System\Windows\Controls\TreeViewItem.cs (1)
354throw new InvalidOperationException(SR.PageCacheSizeNotAllowed);
System\Windows\Controls\UIElementCollection.cs (1)
524throw new InvalidOperationException(SR.Panel_BoundPanel_NoChildren);
System\Windows\Controls\VirtualizingStackPanel.cs (1)
4245throw new InvalidOperationException(SR.CantSwitchVirtualizationModePostMeasure);
System\Windows\Controls\WebBrowser.cs (3)
337throw new InvalidOperationException(SR.CannotInvokeScript); 656throw new InvalidOperationException(SR.WebBrowserNoCastToIWebBrowser2); 742throw new InvalidOperationException(SR.CannotBeInsidePopup);
System\Windows\Data\Binding.cs (5)
200throw new InvalidOperationException(); // This is actually never called since CurrentDispatcher will throw if null. 317throw new InvalidOperationException(SR.Format(SR.BindingConflict, SourceProperties.StaticSource, _sourceInUse)); 516throw new InvalidOperationException(SR.Format(SR.BindingConflict, SourceProperties.Source, _sourceInUse)); 550throw new InvalidOperationException(SR.Format(SR.BindingConflict, SourceProperties.RelativeSource, _sourceInUse)); 569throw new InvalidOperationException(SR.Format(SR.BindingConflict, SourceProperties.ElementName, _sourceInUse));
System\Windows\Data\BindingBase.cs (1)
422throw new InvalidOperationException(SR.ChangeSealedBinding);
System\Windows\Data\BindingExpression.cs (7)
183throw new InvalidOperationException(SR.BindingExpressionIsDetached); 193throw new InvalidOperationException(SR.BindingExpressionIsDetached); 212throw new InvalidOperationException(SR.Format(SR.ArgumentPropertyMustNotBeNull, "Property", "args")); 404throw new InvalidOperationException(SR.TwoWayBindingNeedsPath); 825throw new InvalidOperationException(SR.MissingValueConverter); // report instead of throw? 1562throw new InvalidOperationException(SR.Format(SR.ValidationRule_UnknownStep, validationRule.ValidationStep, validationRule)); 2105throw new InvalidOperationException(SR.Format(SR.ValidationRule_UnknownStep, validationStep, bindingGroup));
System\Windows\Data\BindingExpressionBase.cs (3)
1277throw new InvalidOperationException(SR.Format(SR.RequiresExplicitCulture, TargetProperty.Name)); 1842throw new InvalidOperationException(SR.BindingGroup_CannotChangeGroups); 2112throw new InvalidOperationException(SR.Format(SR.BindingExpressionStatusChanged, _status, status));
System\Windows\Data\BindingListCollectionView.cs (22)
306throw new InvalidOperationException(SR.Format(SR.MemberNotAllowedDuringAddOrEdit, "CustomFilter")); 369throw new InvalidOperationException(SR.Format(SR.MemberNotAllowedDuringAddOrEdit, "GroupBySelector")); 429throw new InvalidOperationException(SR.Format(SR.MemberNotAllowedDuringTransaction, "NewItemPlaceholderPosition", "AddNew")); 569throw new InvalidOperationException(SR.Format(SR.MemberNotAllowedForView, "AddNew")); 649throw new InvalidOperationException(SR.Format(SR.MemberNotAllowedDuringTransaction, "CommitNew", "EditItem")); 696throw new InvalidOperationException(SR.Format(SR.MemberNotAllowedDuringTransaction, "CancelNew", "EditItem")); 872throw new InvalidOperationException(SR.Format(SR.MemberNotAllowedDuringAddOrEdit, "RemoveAt")); 884throw new InvalidOperationException(SR.Format(SR.MemberNotAllowedDuringAddOrEdit, "Remove")); 897throw new InvalidOperationException(SR.RemovingPlaceholder); 980throw new InvalidOperationException(SR.Format(SR.MemberNotAllowedDuringTransaction, "CommitEdit", "AddNew")); 1019throw new InvalidOperationException(SR.Format(SR.MemberNotAllowedDuringTransaction, "CancelEdit", "AddNew")); 1033throw new InvalidOperationException(SR.CancelEditNotSupported); 1122set { throw new InvalidOperationException(SR.Format(SR.CannotChangeLiveShaping, "IsLiveSorting", "CanChangeLiveSorting")); } 1134set { throw new InvalidOperationException(SR.Format(SR.CannotChangeLiveShaping, "IsLiveFiltering", "CanChangeLiveFiltering")); } 1918throw new InvalidOperationException(SR.Format(SR.InconsistentBindingList, InternalList, args.ListChangedType)); 1930throw new InvalidOperationException(SR.Format(SR.InconsistentBindingList, InternalList, args.ListChangedType)); 1987throw new InvalidOperationException(SR.Format(SR.InconsistentBindingList, InternalList, args.ListChangedType)); 2170throw new InvalidOperationException(SR.Format(SR.MemberNotAllowedDuringAddOrEdit, "Sorting")); 2309throw new InvalidOperationException(SR.Format(SR.MemberNotAllowedDuringAddOrEdit, "Grouping")); 2319throw new InvalidOperationException(SR.Format(SR.MemberNotAllowedDuringAddOrEdit, "Grouping")); 2451throw new InvalidOperationException(SR.CannotMoveToUnknownPosition); 2516throw new InvalidOperationException(SR.BindingListCanOnlySortByOneProperty);
System\Windows\Data\BindingOperations.cs (1)
364throw new InvalidOperationException(SR.Format(SR.AccessCollectionAfterShutDown, collection));
System\Windows\Data\CollectionView.cs (8)
301throw new InvalidOperationException(SR.Format(SR.MemberNotAllowedDuringAddOrEdit, "Refresh")); 327throw new InvalidOperationException(SR.Format(SR.MemberNotAllowedDuringAddOrEdit, "DeferRefresh")); 837throw new InvalidOperationException(SR.Format(SR.ImplementOtherMembersWithSort, "Refresh()")); 892throw new InvalidOperationException(SR.Format(SR.ImplementOtherMembersWithSort, "GetEnumerator()")); 1422throw new InvalidOperationException(SR.NoCheckOrChangeWhenDeferred); 1630throw new InvalidOperationException(SR.EnumeratorVersionChanged); 1959throw new InvalidOperationException(SR.RemovedItemNotFound); 1971throw new InvalidOperationException(SR.CannotMoveToUnknownPosition);
System\Windows\Data\CollectionViewSource.cs (4)
184throw new InvalidOperationException(SR.CollectionViewTypeIsInitOnly); 1000throw new InvalidOperationException(SR.Format(SR.CannotSortView, view)); 1018throw new InvalidOperationException(SR.Format(SR.CannotFilterView, view)); 1030throw new InvalidOperationException(SR.Format(SR.CannotGroupView, view));
System\Windows\Data\ListCollectionView.cs (21)
437throw new InvalidOperationException(SR.Format(SR.MemberNotAllowedDuringAddOrEdit, "Filter")); 461throw new InvalidOperationException(SR.Format(SR.MemberNotAllowedDuringAddOrEdit, "CustomSort")); 483throw new InvalidOperationException(SR.Format(SR.MemberNotAllowedDuringAddOrEdit, "Grouping")); 542throw new InvalidOperationException(SR.Format(SR.MemberNotAllowedDuringTransaction, "NewItemPlaceholderPosition", "AddNew")); 716throw new InvalidOperationException(SR.Format(SR.MemberNotAllowedForView, "AddNew")); 739throw new InvalidOperationException(SR.Format(SR.MemberNotAllowedForView, "AddNewItem")); 825throw new InvalidOperationException(SR.Format(SR.MemberNotAllowedDuringTransaction, "CommitNew", "EditItem")); 941throw new InvalidOperationException(SR.Format(SR.MemberNotAllowedDuringTransaction, "CancelNew", "EditItem")); 1050throw new InvalidOperationException(SR.Format(SR.MemberNotAllowedDuringAddOrEdit, "RemoveAt")); 1062throw new InvalidOperationException(SR.Format(SR.MemberNotAllowedDuringAddOrEdit, "Remove")); 1075throw new InvalidOperationException(SR.RemovingPlaceholder); 1177throw new InvalidOperationException(SR.Format(SR.MemberNotAllowedDuringTransaction, "CommitEdit", "AddNew")); 1285throw new InvalidOperationException(SR.Format(SR.MemberNotAllowedDuringTransaction, "CancelEdit", "AddNew")); 1299throw new InvalidOperationException(SR.CancelEditNotSupported); 2518throw new InvalidOperationException(SR.CannotMoveToUnknownPosition); 2669throw new InvalidOperationException(SR.Format(SR.CollectionChangeIndexOutOfRange, index, ilFull.Count)); 2676throw new InvalidOperationException(SR.Format(SR.AddedItemNotAtIndex, index)); 2683throw new InvalidOperationException(SR.AddedItemNotInCollection); 2909throw new InvalidOperationException(SR.Format(SR.MemberNotAllowedDuringAddOrEdit, "Sorting")); 3002throw new InvalidOperationException(SR.Format(SR.MemberNotAllowedDuringAddOrEdit, "Grouping")); 3012throw new InvalidOperationException(SR.Format(SR.MemberNotAllowedDuringAddOrEdit, "Grouping"));
System\Windows\Data\MultiBinding.cs (2)
341throw new InvalidOperationException(SR.MultiBindingHasNoConverter); 378throw new InvalidOperationException(SR.NoUpdateSourceTriggerForInnerBindingOfMultiBinding);
System\Windows\Data\MultiBindingExpression.cs (3)
111throw new InvalidOperationException(SR.BindingExpressionIsDetached); 127throw new InvalidOperationException(SR.BindingExpressionIsDetached); 849throw new InvalidOperationException(SR.Format(SR.ValidationRule_UnknownStep, validationStep, bindingGroup));
System\Windows\Data\ObjectDataProvider.cs (5)
98throw new InvalidOperationException(SR.ObjectDataProviderCanHaveOnlyOneSource); 151throw new InvalidOperationException(SR.ObjectDataProviderCanHaveOnlyOneSource); 383e = new InvalidOperationException(SR.ObjectDataProviderHasNoSource); 480e = new InvalidOperationException(SR.Format(SR.ObjectDataProviderNonCLSException, _objectType.Name)); 559e = new InvalidOperationException(SR.Format(SR.ObjectDataProviderNonCLSExceptionInvoke, MethodName, _objectType.Name));
System\Windows\Data\RelativeSource.cs (5)
85throw new InvalidOperationException(SR.RelativeSourceNeedsMode); 87throw new InvalidOperationException(SR.RelativeSourceNeedsAncestorType); 154throw new InvalidOperationException(SR.RelativeSourceModeIsImmutable); 178throw new InvalidOperationException(SR.RelativeSourceNotInFindAncestorMode); 214throw new InvalidOperationException(SR.RelativeSourceNotInFindAncestorMode);
System\Windows\Data\XmlDataProvider.cs (1)
570throw new InvalidOperationException(SR.GetResponseFailed);
System\Windows\Data\XmlNamespaceMapping.cs (6)
46throw new InvalidOperationException(SR.Format(SR.PropertyIsInitializeOnly, "Prefix", this.GetType().Name)); 48throw new InvalidOperationException(SR.Format(SR.PropertyIsImmutable, "Prefix", this.GetType().Name)); 65throw new InvalidOperationException(SR.Format(SR.PropertyIsInitializeOnly, "Uri", this.GetType().Name)); 67throw new InvalidOperationException(SR.Format(SR.PropertyIsImmutable, "Uri", this.GetType().Name)); 137throw new InvalidOperationException(SR.Format(SR.PropertyMustHaveValue, "Prefix", this.GetType().Name)); 141throw new InvalidOperationException(SR.Format(SR.PropertyMustHaveValue, "Uri", this.GetType().Name));
System\Windows\DataTemplate.cs (1)
142throw new InvalidOperationException(SR.TemplateNotTargetType);
System\Windows\DataTrigger.cs (3)
44throw new InvalidOperationException(SR.Format(SR.CannotChangeAfterSealed, "DataTrigger")); 72throw new InvalidOperationException(SR.Format(SR.CannotChangeAfterSealed, "DataTrigger")); 174throw new InvalidOperationException(SR.Format(SR.UnexpectedValueTypeForDataTrigger, propertyValue.ValueType));
System\Windows\DeferrableContentConverter.cs (4)
36throw new InvalidOperationException(SR.ExpectedBamlSchemaContext); 49throw new InvalidOperationException(SR.ExpectedResourceDictionaryTarget); 63throw new InvalidOperationException(SR.ExpectedBinaryContent); 80throw new InvalidOperationException(SR.Format(SR.DeferringLoaderNoContext, nameof(DeferrableContentConverter), typeof(T).Name));
System\Windows\DescendentsWalker.cs (2)
386throw new InvalidOperationException(SR.LogicalTreeLoop); 412throw new InvalidOperationException(SR.LogicalTreeLoop);
System\Windows\DialogResultConverter.cs (2)
61throw new InvalidOperationException(SR.CantSetInMarkup); 73throw new InvalidOperationException(SR.CantSetInMarkup);
System\Windows\Documents\AdornerLayer.cs (6)
235throw new InvalidOperationException(SR.AdornedElementNotFound); 562throw new InvalidOperationException(SR.AdornedElementNotFound); 567throw new InvalidOperationException(SR.AdornerNotFound); 588throw new InvalidOperationException(SR.AdornedElementNotFound); 593throw new InvalidOperationException(SR.AdornerNotFound); 682throw new InvalidOperationException(SR.AdornedElementNotFound);
System\Windows\Documents\DocumentSequence.cs (1)
118throw new InvalidOperationException(SR.PrevoiusUninitializedDocumentReferenceOutstanding);
System\Windows\Documents\DocumentSequenceTextPointer.cs (3)
226throw new InvalidOperationException(SR.DocumentReadOnly); 238throw new InvalidOperationException(SR.DocumentReadOnly); 453if (_isFrozen) throw new InvalidOperationException(SR.TextPositionIsFrozen);
System\Windows\Documents\FixedDocument.cs (1)
154throw new InvalidOperationException(SR.PrevoiusPartialPageContentOutstanding);
System\Windows\Documents\FixedTextPointer.cs (5)
209throw new InvalidOperationException(SR.NoElementObject); 391if (_isFrozen) throw new InvalidOperationException(SR.TextPositionIsFrozen); 426throw new InvalidOperationException(SR.NoElementObject); 495throw new InvalidOperationException(SR.FixedDocumentReadonly); 503throw new InvalidOperationException(SR.FixedDocumentReadonly);
System\Windows\Documents\FlowDocument.cs (4)
796throw new InvalidOperationException(SR.FlowDocumentInvalidContnetChange); 1387throw new InvalidOperationException(SR.FlowDocumentInvalidContnetChange); 1440throw new InvalidOperationException(SR.FlowDocumentInvalidContnetChange); 1475throw new InvalidOperationException(SR.FlowDocumentInvalidContnetChange);
System\Windows\Documents\InlineCollection.cs (1)
167throw new InvalidOperationException(SR.Format(SR.TextSchema_ChildTypeIsInvalid, this.Parent.GetType().Name, child.GetType().Name));
System\Windows\Documents\List.cs (1)
184throw new InvalidOperationException(SR.ListElementItemNotAChildOfList);
System\Windows\Documents\PageContent.cs (2)
178throw new InvalidOperationException(SR.Format(SR.CanOnlyHaveOneChild, typeof(PageContent), value)); 271throw new InvalidOperationException(SR.Format(SR.CanOnlyHaveOneChild, typeof(PageContent), value));
System\Windows\Documents\RangeContentEnumerator.cs (5)
65throw new InvalidOperationException(SR.EnumeratorNotStarted); 80throw new InvalidOperationException(SR.EnumeratorReachedEnd); 90throw new InvalidOperationException(SR.EnumeratorVersionChanged); 152throw new InvalidOperationException(SR.EnumeratorVersionChanged); 211throw new InvalidOperationException(SR.EnumeratorVersionChanged);
System\Windows\Documents\Span.cs (2)
116throw new InvalidOperationException(SR.Format(SR.TextSchema_CannotSplitElement, nonMergeableAncestor.GetType().Name)); 120throw new InvalidOperationException(SR.Format(SR.TextSchema_CannotSplitElement, nonMergeableAncestor.GetType().Name));
System\Windows\Documents\Table.cs (4)
428throw new InvalidOperationException(SR.EnumeratorVersionChanged); 475throw new InvalidOperationException(SR.EnumeratorNotStarted); 480throw new InvalidOperationException(SR.EnumeratorReachedEnd); 491throw new InvalidOperationException(SR.EnumeratorVersionChanged);
System\Windows\Documents\TableCell.cs (1)
88throw new InvalidOperationException(SR.Format(SR.TableInvalidParentNodeType, newParent.GetType().ToString()));
System\Windows\Documents\TableRow.cs (1)
89throw new InvalidOperationException(SR.Format(SR.TableInvalidParentNodeType, newParent.GetType().ToString()));
System\Windows\Documents\TableRowGroup.cs (1)
289throw new InvalidOperationException(SR.Format(SR.TableInvalidParentNodeType, newParent.GetType().ToString()));
System\Windows\Documents\TextContainer.cs (2)
3221throw new InvalidOperationException(SR.Format(SR.NotInThisTree, "position")); 3229throw new InvalidOperationException(SR.NoElement);
System\windows\Documents\TextEditor.cs (1)
331throw new InvalidOperationException(
System\Windows\Documents\TextElement.cs (1)
883throw new InvalidOperationException(SR.Format(SR.TextSchema_TextIsNotAllowed, this.GetType().Name));
System\Windows\Documents\TextElementCollection.cs (2)
248throw new InvalidOperationException(SR.Format(SR.TextElementCollection_PreviousSiblingDoesNotBelongToThisCollection, previousSibling.GetType().Name)); 287throw new InvalidOperationException(SR.Format(SR.TextElementCollection_NextSiblingDoesNotBelongToThisCollection, nextSibling.GetType().Name));
System\Windows\Documents\TextElementEnumerator.cs (4)
83throw new InvalidOperationException(SR.EnumeratorNotStarted); 89throw new InvalidOperationException(SR.EnumeratorReachedEnd); 105throw new InvalidOperationException(SR.EnumeratorVersionChanged); 159throw new InvalidOperationException(SR.EnumeratorVersionChanged);
System\Windows\Documents\TextPointer.cs (8)
1391throw new InvalidOperationException(SR.TextPointer_CannotInsertTextElementBecauseItBelongsToAnotherTree); 1422throw new InvalidOperationException(SR.Format(SR.TextSchema_IllegalElement, "Paragraph", containerType)); 1431throw new InvalidOperationException(SR.Format(SR.TextSchema_CannotSplitElement, ancestor.GetType().Name)); 2147throw new InvalidOperationException(SR.TextSchema_UIElementNotAllowedInThisPosition); 2532throw new InvalidOperationException(SR.Format(SR.NoScopingElement, "This TextPointer")); 2640throw new InvalidOperationException(SR.Format(SR.NoScopingElement, "This TextNavigator")); 3548throw new InvalidOperationException(SR.TextSchema_CannotInsertContentInThisPosition); 3951throw new InvalidOperationException(SR.TextPositionIsFrozen);
System\Windows\Documents\TextRangeEdit.cs (1)
2286throw new InvalidOperationException(SR.Format(SR.TextRangeEdit_InvalidStructuralPropertyApply, property, nonMergeableAncestor));
System\Windows\Documents\TextRangeEditTables.cs (1)
871throw new InvalidOperationException(SR.TextSchema_CannotInsertContentInThisPosition);
System\Windows\Documents\TextSchema.cs (5)
113throw new InvalidOperationException(SR.Format(SR.TextSchema_ChildTypeIsInvalid, parent.GetType().Name, child.GetType().Name)); 134throw new InvalidOperationException(SR.Format(SR.TextSchema_IllegalHyperlinkChild, childType)); 144throw new InvalidOperationException(SR.Format(SR.TextSchema_ChildTypeIsInvalid, parent.GetType().Name, childType.Name)); 176throw new InvalidOperationException(SR.Format(SR.TextSchema_ChildTypeIsInvalid, parent.GetType().Name, childType.Name)); 897throw new InvalidOperationException(SR.Format(SR.TextSchema_IllegalHyperlinkChild, nextElement.GetType()));
System\Windows\Documents\WinRTSpellerInterop.cs (1)
737throw new InvalidOperationException();
System\Windows\DynamicResourceExtension.cs (1)
55throw new InvalidOperationException(SR.MarkupExtensionResourceKey);
System\Windows\EventTrigger.cs (7)
96throw new InvalidOperationException(SR.Format(SR.CannotChangeAfterSealed, "EventTrigger")); 105throw new InvalidOperationException(SR.Format(SR.CannotChangeAfterSealed, "EventTrigger")); 128throw new InvalidOperationException(SR.Format(SR.CannotChangeAfterSealed, "EventTrigger")); 213throw new InvalidOperationException(SR.EventTriggerDoNotSetProperties); 219throw new InvalidOperationException(SR.EventTriggerDoesNotEnterExit); 321throw new InvalidOperationException(SR.TriggersSupportsEventTriggersOnly); 363throw new InvalidOperationException(SR.TriggersSupportsEventTriggersOnly);
System\Windows\FrameworkCompatibilityPreferences.cs (5)
81throw new InvalidOperationException(SR.Format(SR.CompatibilityPreferencesSealed, "AreInactiveSelectionHighlightBrushKeysSupported", "FrameworkCompatibilityPreferences")); 155throw new InvalidOperationException(SR.Format(SR.CompatibilityPreferencesSealed, "AextBoxDisplaysText", "FrameworkCompatibilityPreferences")); 194throw new InvalidOperationException(SR.Format(SR.CompatibilityPreferencesSealed, "UseSetWindowPosForTopmostWindows", "FrameworkCompatibilityPreferences")); 244throw new InvalidOperationException(SR.Format(SR.CompatibilityPreferencesSealed, "IsVirtualizingStackPanel_45Compatible", "FrameworkCompatibilityPreferences")); 376throw new InvalidOperationException(
System\Windows\FrameworkContentElement.cs (3)
1512throw new InvalidOperationException(SR.Illegal_InheritanceBehaviorSettor); 1529throw new InvalidOperationException(SR.NestedBeginInitNotSupported); 1544throw new InvalidOperationException(SR.EndInitWithoutBeginInitNotSupported);
System\Windows\FrameworkElement.cs (5)
487throw new InvalidOperationException(SR.Format(SR.NamedObjectMustBeFrameworkElement, targetName)); 1173throw new InvalidOperationException(SR.LogicalTreeLoop); 2650throw new InvalidOperationException(SR.Illegal_InheritanceBehaviorSettor); 5398throw new InvalidOperationException(SR.NestedBeginInitNotSupported); 5413throw new InvalidOperationException(SR.EndInitWithoutBeginInitNotSupported);
System\Windows\FrameworkElementFactory.cs (21)
72throw new InvalidOperationException(SR.Format(SR.CannotChangeAfterSealed, "FrameworkElementFactory")); 77throw new InvalidOperationException(SR.FrameworkElementFactoryCannotAddText); 116throw new InvalidOperationException(SR.Format(SR.CannotChangeAfterSealed, "FrameworkElementFactory")); 121throw new InvalidOperationException(SR.FrameworkElementFactoryCannotAddText); 140throw new InvalidOperationException(SR.Format(SR.CannotChangeAfterSealed, "FrameworkElementFactory")); 160throw new InvalidOperationException(SR.Format(SR.CannotChangeAfterSealed, "FrameworkElementFactory")); 172throw new InvalidOperationException(SR.FrameworkElementFactoryCannotAddText); 199throw new InvalidOperationException(SR.Format(SR.CannotChangeAfterSealed, "FrameworkElementFactory")); 277throw new InvalidOperationException(SR.Format(SR.CannotChangeAfterSealed, "FrameworkElementFactory")); 302throw new InvalidOperationException(SR.Format(SR.CannotChangeAfterSealed, "FrameworkElementFactory")); 338throw new InvalidOperationException(SR.Format(SR.CannotChangeAfterSealed, "FrameworkElementFactory")); 544throw new InvalidOperationException(SR.NullTypeIllegal); 553throw new InvalidOperationException(SR.Format(SR.TypeMustImplementIAddChild, _type.Name)); 564throw new InvalidOperationException(SR.Format(SR.ChildNameNamePatternReserved, _childName)); 650throw new InvalidOperationException(SR.Format(SR.TypeMustImplementIAddChild, 905throw new InvalidOperationException(SR.Format(SR.TypeMustImplementIAddChild, 923throw new InvalidOperationException(SR.FrameworkElementFactoryMustBeSealed); 951throw new InvalidOperationException(SR.Format(SR.TypeMustImplementIAddChild, 1111throw new InvalidOperationException(SR.Format(SR.AlreadyHasLogicalChildren, 1119throw new InvalidOperationException(SR.Format(SR.CannotHookupFCERoot, 1183throw new InvalidOperationException(SR.Format(SR.MissingContentSource, prefix, targetType));
System\Windows\FrameworkPropertyMetadata.cs (13)
319throw new InvalidOperationException(SR.TypeMetadataCannotChangeAfterUse); 336throw new InvalidOperationException(SR.TypeMetadataCannotChangeAfterUse); 353throw new InvalidOperationException(SR.TypeMetadataCannotChangeAfterUse); 370throw new InvalidOperationException(SR.TypeMetadataCannotChangeAfterUse); 387throw new InvalidOperationException(SR.TypeMetadataCannotChangeAfterUse); 404throw new InvalidOperationException(SR.TypeMetadataCannotChangeAfterUse); 423throw new InvalidOperationException(SR.TypeMetadataCannotChangeAfterUse); 442throw new InvalidOperationException(SR.TypeMetadataCannotChangeAfterUse); 459throw new InvalidOperationException(SR.TypeMetadataCannotChangeAfterUse); 478throw new InvalidOperationException(SR.TypeMetadataCannotChangeAfterUse); 503throw new InvalidOperationException(SR.TypeMetadataCannotChangeAfterUse); 524throw new InvalidOperationException(SR.TypeMetadataCannotChangeAfterUse); 543throw new InvalidOperationException(SR.TypeMetadataCannotChangeAfterUse);
System\Windows\FrameworkTemplate.cs (4)
240throw new InvalidOperationException(SR.Format(SR.CannotChangeAfterSealed, "Template")); 304throw new InvalidOperationException(SR.TemplateFindNameInInvalidElement); 425throw new InvalidOperationException(SR.Format(SR.CannotChangeAfterSealed, "Template")); 1122throw new InvalidOperationException(SR.Format(SR.TemplateMustBeFE, new object[] { rootObject.GetType().FullName }));
System\Windows\Generated\FrameworkContentElement.cs (8)
71throw new InvalidOperationException(SR.Format(SR.NameScopeNotFound, name, "register")); 89throw new InvalidOperationException(SR.Format(SR.NameScopeNotFound, name, "unregister")); 192throw new InvalidOperationException(SR.CannotModifyLogicalChildrenDuringTreeWalk); 240throw new InvalidOperationException(SR.CannotModifyLogicalChildrenDuringTreeWalk); 300throw new System.InvalidOperationException(SR.HasLogicalParent); 306throw new System.InvalidOperationException(SR.CannotBeSelfParent); 605throw new InvalidOperationException(SR.Format(SR.CyclicStyleReferenceDetected, this)); 659throw new InvalidOperationException(SR.Format(SR.CyclicThemeStyleReferenceDetected, this));
System\Windows\Generated\FrameworkElement.cs (8)
71throw new InvalidOperationException(SR.Format(SR.NameScopeNotFound, name, "register")); 89throw new InvalidOperationException(SR.Format(SR.NameScopeNotFound, name, "unregister")); 192throw new InvalidOperationException(SR.CannotModifyLogicalChildrenDuringTreeWalk); 240throw new InvalidOperationException(SR.CannotModifyLogicalChildrenDuringTreeWalk); 300throw new System.InvalidOperationException(SR.HasLogicalParent); 306throw new System.InvalidOperationException(SR.CannotBeSelfParent); 625throw new InvalidOperationException(SR.Format(SR.CyclicStyleReferenceDetected, this)); 679throw new InvalidOperationException(SR.Format(SR.CyclicThemeStyleReferenceDetected, this));
System\Windows\Input\Command\CommandValueSerializer.cs (4)
75throw new InvalidOperationException(SR.Format(SR.ValueSerializerContextUnavailable, this.GetType().Name )); 82throw new InvalidOperationException(SR.Format(SR.TypeValueSerializerUnavailable, this.GetType().Name )); 132throw new InvalidOperationException(SR.Format(SR.ValueSerializerContextUnavailable, this.GetType().Name )); 139throw new InvalidOperationException(SR.Format(SR.TypeValueSerializerUnavailable, this.GetType().Name ));
System\Windows\Interop\HwndHost.cs (4)
209throw new InvalidOperationException(SR.HwndHostDoesNotSupportChildKeyboardSinks); 1013throw new InvalidOperationException(SR.ChildWindowNotCreated); 1020throw new InvalidOperationException(SR.HostedWindowMustBeAChildWindow); 1026throw new InvalidOperationException(SR.ChildWindowMustHaveCorrectParent);
System\Windows\Markup\Baml2006\Baml2006Reader.cs (3)
1474throw new InvalidOperationException(SR.UnableToConvertInt32); 2057throw new InvalidOperationException($"Could not find prefix for type: {type.Name}"); 2656throw new InvalidOperationException(SR.BamlBadExtensionValue);
System\Windows\Markup\Baml2006\WpfGeneratedKnownProperties.cs (1)
287throw new InvalidOperationException("Invalid BAML number");
System\Windows\Markup\Baml2006\WpfGeneratedKnownTypes.cs (1)
778throw new InvalidOperationException("Invalid BAML number");
System\Windows\Markup\Baml2006\WpfKnownMember.cs (1)
103throw new InvalidOperationException("Can't Assign to Known Member attributes");
System\Windows\Markup\Baml2006\WpfKnownType.cs (1)
93throw new InvalidOperationException("Can't Assign to Known Type attributes");
System\Windows\Markup\Baml2006\WpfKnownTypeInvoker.cs (1)
29throw new InvalidOperationException(SR.PositionalArgumentsWrongLength);
System\Windows\Markup\BamlReader.cs (14)
316throw new InvalidOperationException(SR.BamlReaderClosed); 657throw new InvalidOperationException(SR.Format(SR.ParserUnknownBaml, 990throw new InvalidOperationException(SR.Format(SR.BamlReaderNoOwnerType, attrInfo.Name, AssemblyName)); 1026throw new InvalidOperationException(SR.Format(SR.ParserCantGetDPOrPi, info.Name)); 1678throw new InvalidOperationException(SR.Format(SR.ParserUnknownBaml, 1793throw new InvalidOperationException(SR.Format(SR.ParserBamlEvent, string.Empty)); 1807throw new InvalidOperationException(SR.Format(SR.ParserBamlEvent, string.Empty)); 1851throw new InvalidOperationException(SR.Format(SR.BamlScopeError, 1889throw new InvalidOperationException(SR.ParserMapPIMissingAssembly); 2036throw new InvalidOperationException(SR.Format(SR.BamlScopeError, 2143throw new InvalidOperationException(SR.Format(SR.BamlScopeError, 2250throw new InvalidOperationException(SR.Format(SR.BamlScopeError, 2391throw new InvalidOperationException(SR.BamlBadExtensionValue); 2471throw new InvalidOperationException(SR.BamlBadExtensionValue);
System\Windows\Markup\BamlRecords.cs (1)
769throw new InvalidOperationException(SR.ParserMultiBamls);
System\Windows\Markup\BamlVersionHeader.cs (1)
80throw new InvalidOperationException(SR.Format(SR.ParserBamlVersion,
System\Windows\Markup\BamlWriter.cs (10)
145throw new InvalidOperationException(SR.BamlWriterClosed); 149throw new InvalidOperationException(SR.BamlWriterStartDoc); 303throw new InvalidOperationException(SR.Format(SR.BamlWriterNoInElement, 470throw new InvalidOperationException(SR.Format(SR.BamlWriterBadXmlns, 504throw new InvalidOperationException(SR.Format(SR.BamlWriterNoInElement, 794throw new InvalidOperationException( 997throw new InvalidOperationException(SR.BamlWriterUnknownMarkupExtension); 1016throw new InvalidOperationException(SR.BamlWriterClosed); 1020throw new InvalidOperationException(SR.BamlWriterStartDoc); 1043throw new InvalidOperationException(SR.Format(SR.BamlWriterBadScope,
System\Windows\Markup\FilteredXmlReader.cs (3)
122throw new InvalidOperationException( 154throw new InvalidOperationException( 341throw new InvalidOperationException(
System\Windows\Markup\Primitives\MarkupWriter.cs (6)
143throw new InvalidOperationException( SR.Format( SR.MarkupWriter_CannotSerializeNestedPublictype, type.ToString() )); 147throw new InvalidOperationException( SR.Format( SR.MarkupWriter_CannotSerializeNonPublictype, type.ToString() )); 151throw new InvalidOperationException( SR.Format( SR.MarkupWriter_CannotSerializeGenerictype, type.ToString() )); 501throw new InvalidOperationException(SR.UnserializableKeyValue); 693throw new InvalidOperationException(SR.Format(SR.UnserializableKeyValue, property.Value.GetType().FullName)); 1526throw new InvalidOperationException();
System\Windows\Markup\XamlReader.cs (2)
206throw new InvalidOperationException(SR.ParserCannotReuseXamlReader); 285throw new InvalidOperationException(SR.ParserCannotReuseXamlReader);
System\Windows\Markup\XamlSerializer.cs (5)
58throw new InvalidOperationException(SR.InvalidDeSerialize); 74throw new InvalidOperationException(SR.InvalidDeSerialize); 87throw new InvalidOperationException(SR.InvalidDeSerialize); 100throw new InvalidOperationException(SR.InvalidCustomSerialize); 111throw new InvalidOperationException(SR.InvalidCustomSerialize);
System\Windows\Markup\XmlnsCache.cs (1)
393throw new InvalidOperationException(SR.Format(SR.ParserCompatDuplicate, oldXmlns,
System\Windows\Markup\XmlnsDictionary.cs (1)
594throw new InvalidOperationException(SR.ParserDictionarySealed);
System\Windows\Media\Animation\BeginStoryboard.cs (4)
117throw new InvalidOperationException(SR.Format(SR.CannotChangeAfterSealed, "BeginStoryboard")); 139throw new InvalidOperationException(SR.Storyboard_StoryboardReferenceRequired); 146throw new InvalidOperationException(SR.Storyboard_UnableToFreeze); 204throw new InvalidOperationException(SR.Storyboard_StoryboardReferenceRequired);
System\Windows\Media\Animation\ControllableStoryboardAction.cs (3)
48throw new InvalidOperationException(SR.Format(SR.CannotChangeAfterSealed, "ControllableStoryboardAction")); 95throw new InvalidOperationException(SR.Storyboard_BeginStoryboardNameRequired); 104throw new InvalidOperationException(SR.Format(SR.Storyboard_BeginStoryboardNoStoryboard, BeginStoryboardName));
System\Windows\Media\Animation\Generated\ThicknessAnimation.cs (2)
313throw new InvalidOperationException( 324throw new InvalidOperationException(
System\Windows\Media\Animation\Generated\ThicknessAnimationUsingKeyFrames.cs (1)
277throw new InvalidOperationException(SR.Animation_NoTextChildren);
System\Windows\Media\Animation\SeekStoryboard.cs (2)
37throw new InvalidOperationException(SR.Format(SR.CannotChangeAfterSealed, "SeekStoryboard")); 72throw new InvalidOperationException(SR.Format(SR.CannotChangeAfterSealed, "SeekStoryboard"));
System\Windows\Media\Animation\SetStoryboardSpeedRatio.cs (1)
37throw new InvalidOperationException(SR.Format(SR.CannotChangeAfterSealed, "SetStoryboardSpeedRatio"));
System\Windows\Media\Animation\Storyboard.cs (28)
270throw new InvalidOperationException( 276throw new InvalidOperationException( 283throw new InvalidOperationException(SR.Format(SR.Storyboard_TargetNameNotDependencyObject, targetName )); 318throw new InvalidOperationException( 327throw new InvalidOperationException( 336throw new InvalidOperationException( 342throw new InvalidOperationException( 350throw new InvalidOperationException(SR.Format(SR.Storyboard_BeginStoryboardNameNotFound, targetName)); 397throw new InvalidOperationException(SR.Format(SR.Storyboard_TargetNameNotAllowedInStyle, nameString)); 445throw new InvalidOperationException(SR.Format(SR.Storyboard_NoTarget, currentTimeline.GetType().ToString() )); 453throw new InvalidOperationException(SR.Format(SR.Storyboard_TargetPropertyRequired, currentTimeline.GetType().ToString() )); 463throw new InvalidOperationException(SR.Storyboard_PropertyPathEmpty); 476throw new InvalidOperationException(SR.Format(SR.Storyboard_PropertyPathMustPointToDependencyProperty, currentPropertyPath.Path )); 542throw new InvalidOperationException(SR.Format(SR.Storyboard_MediaElementNotFound, currentObjectName )); 556throw new InvalidOperationException(SR.Storyboard_MediaElementRequired); 690throw new InvalidOperationException(SR.Format(SR.Storyboard_PropertyPathObjectNotFound, AccessorName(path, i-1), path.Path )); 697throw new InvalidOperationException(SR.Format(SR.Storyboard_PropertyPathPropertyNotFound, path.Path )); 724throw new InvalidOperationException(SR.Format(SR.Storyboard_PropertyPathFrozenCheckFailed, AccessorName(path, i-1), path.Path, intermediateFreezable.GetType().ToString() )); 730throw new InvalidOperationException(SR.Format(SR.Storyboard_ImmutableTargetNotSupported, path.Path)); 745throw new InvalidOperationException(SR.Format(SR.Storyboard_PropertyPathMustPointToDependencyObject, AccessorName(path, i-1), path.Path)); 750throw new InvalidOperationException(SR.Format(SR.Storyboard_PropertyPathMustPointToDependencyProperty, path.Path )); 755throw new InvalidOperationException(SR.Format(SR.Storyboard_PropertyPathSealedCheckFailed, intermediateDP.Name, path.Path, intermediateDO)); 760throw new InvalidOperationException(SR.Format(SR.Storyboard_PropertyPathIncludesNonAnimatableProperty, path.Path, intermediateDP.Name)); 796throw new InvalidOperationException(SR.Format(SR.Storyboard_AnimationMismatch, animationClock.Timeline.GetType(), targetProperty.Name, targetProperty.PropertyType)); 843throw new InvalidOperationException(SR.Format(SR.Storyboard_PropertyPathUnresolved, path.Path)); 874throw new InvalidOperationException(SR.Format(SR.Storyboard_ImmutableTargetNotSupported, path.Path)); 945throw new InvalidOperationException(SR.Format(SR.Storyboard_ComplexPathNotSupported, targetObject.GetType().ToString())); 1947throw new InvalidOperationException(SR.Storyboard_NeverApplied);
System\Windows\MultiDataTrigger.cs (2)
109throw new InvalidOperationException(SR.SourceNameNotSupportedForDataTriggers); 132throw new InvalidOperationException(SR.Format(SR.UnexpectedValueTypeForDataTrigger, propertyValue.ValueType));
System\Windows\Navigation\Journal.cs (3)
327throw new InvalidOperationException(SR.InvalidOperation_CannotClearFwdStack); 356throw new InvalidOperationException(SR.NoBackEntry); 372throw new InvalidOperationException(SR.NoForwardEntry);
System\Windows\Navigation\NavigationService.cs (10)
549throw new InvalidOperationException(SR.InvalidOperation_CantChangeJournalOwnership); 1089throw new InvalidOperationException(SR.Format(SR.WrongNavigateRootElement, bp.ToString())); 1398throw new InvalidOperationException(SR.InvalidOperation_AddBackEntryNoContent); 1414throw new InvalidOperationException( 1619throw new InvalidOperationException(SR.InvalidOperation_CannotReenterPageFunction); 1698throw new InvalidOperationException(SR.NoForwardEntry); 1712throw new InvalidOperationException(SR.NoBackEntry); 2909throw new InvalidOperationException(SR.FailedToConvertResource); 3666throw new InvalidOperationException(SR.WindowAlreadyClosed); 3868throw new InvalidOperationException(SR.UiLessPageFunctionNotCallingOnReturn);
System\Windows\Navigation\NavigationWindow.cs (1)
838throw new InvalidOperationException(SR.NoAddChild);
System\Windows\Navigation\RequestNavigateEventArgs.cs (1)
68throw new InvalidOperationException(SR.RequestNavigateEventMustHaveRoutedEvent);
System\Windows\PropertyPath.cs (9)
79throw new InvalidOperationException(); // This is actually never called since CurrentDispatcher will throw if null. 375throw new InvalidOperationException(SR.Format(SR.PropertyPathSyntaxError, detail)); 560throw new InvalidOperationException(SR.Format(SR.PropertyPathInvalidAccessor, 566throw new InvalidOperationException(SR.Format(SR.PathParametersIndexOutOfRange, index, PathParameters.Count)); 583throw new InvalidOperationException(SR.Format(SR.PropertyPathNoOwnerType, ownerName)); 643throw new InvalidOperationException(SR.Format(SR.PropertyPathNoProperty, ownerType.Name, propertyName)); 732throw new InvalidOperationException(SR.Format(SR.PathParameterIsNull, index)); 736throw new InvalidOperationException(SR.Format(SR.PathParametersIndexOutOfRange, index, PathParameters.Count)); 760throw new InvalidOperationException(SR.Format(SR.PropertyPathIndexWrongType, paramList[i].parenString, paramList[i].valueString));
System\Windows\ResourceDictionary.cs (12)
223throw new InvalidOperationException(SR.Format(SR.ResourceDictionaryLoadFromFailure, _source.ToString())); 431throw new InvalidOperationException(SR.ResourceDictionaryIsReadOnly); 626throw new InvalidOperationException(SR.ResourceDictionaryIsReadOnly); 686throw new InvalidOperationException(SR.ResourceDictionaryIsReadOnly); 874throw new InvalidOperationException(SR.ResourceDictionaryIsReadOnly); 988throw new InvalidOperationException(SR.NestedBeginInitNotSupported); 1007throw new InvalidOperationException(SR.EndInitWithoutBeginInitNotSupported); 1174throw new InvalidOperationException(SR.ResourceDictionaryDuplicateDeferredContent); 1179throw new InvalidOperationException(SR.ResourceDictionaryDeferredContentFailure); 1502throw new InvalidOperationException(SR.ResourceDictionaryInvalidMergedDictionary); 1524throw new InvalidOperationException(SR.ResourceDictionaryInvalidMergedDictionary); 1546throw new InvalidOperationException(SR.ResourceDictionaryInvalidMergedDictionary);
System\Windows\Setter.cs (1)
72throw new InvalidOperationException(SR.Format(SR.CannotHavePropertyInStyle, FrameworkElement.NameProperty.Name));
System\Windows\SetterBase.cs (1)
50throw new InvalidOperationException(SR.Format(SR.CannotChangeAfterSealed, "SetterBase"));
System\Windows\SetterBaseCollection.cs (1)
101throw new InvalidOperationException(SR.Format(SR.CannotChangeAfterSealed, "SetterBaseCollection"));
System\Windows\Shell\JumpList.cs (2)
352throw new InvalidOperationException(SR.JumpList_CantNestBeginInitCalls); 416throw new InvalidOperationException(SR.JumpList_CantApplyUntilEndInit);
System\Windows\Shell\WindowChromeWorker.cs (1)
902throw new InvalidOperationException("Unable to combine two HRGNs.");
System\Windows\Standard\NativeMethods.cs (1)
1570throw new InvalidOperationException("IConnectionPoint::Advise returned an invalid cookie.");
System\Windows\Standard\Verify.cs (3)
42throw new InvalidOperationException(message); 138throw new InvalidOperationException($"The property {name} cannot be null at this time."); 147throw new InvalidOperationException($"The property {name} must be null at this time.");
System\Windows\StaticResourceExtension.cs (2)
198throw new InvalidOperationException(SR.Format(SR.MarkupExtensionNoContext, GetType().Name, "IXamlSchemaContextProvider")); 204throw new InvalidOperationException(SR.Format(SR.MarkupExtensionNoContext, GetType().Name, "IAmbientProvider"));
System\Windows\Style.cs (12)
158throw new InvalidOperationException(SR.Format(SR.CannotChangeAfterSealed, "Style")); 197throw new InvalidOperationException(SR.Format(SR.CannotChangeAfterSealed, "Style")); 304throw new InvalidOperationException(SR.Format(SR.CannotChangeAfterSealed, "Style")); 469throw new InvalidOperationException(SR.Format(SR.StyleTargetTypeMismatchWithElement, 493throw new InvalidOperationException(SR.Format(SR.NullPropertyIllegal, "TargetType")); 501throw new InvalidOperationException(SR.Format(SR.MustBaseOnStyleOfABaseType, _targetType.Name)); 577throw new InvalidOperationException(SR.Format( 630throw new InvalidOperationException(SR.Format(SR.SetterOnStyleNotAllowedToHaveTarget, setter.TargetName)); 734throw new InvalidOperationException(SR.StyleTriggersCannotTargetTheTemplate); 742throw new InvalidOperationException(SR.Format(SR.TriggerOnStyleNotAllowedToHaveSource, conditions[k].SourceName)); 786throw new InvalidOperationException(SR.Format(SR.UnsupportedTriggerInStyle, trigger.GetType().Name)); 796throw new InvalidOperationException(SR.Format(SR.EventTriggerOnStyleNotAllowedToHaveTarget, eventTrigger.SourceName));
System\Windows\StyleHelper.cs (18)
109throw new InvalidOperationException(SR.CannotHaveOverridesDefaultStyleInThemeStyle); 115throw new InvalidOperationException(SR.CannotHaveEventHandlersInThemeStyle); 228throw new InvalidOperationException(SR.Format( 431throw new InvalidOperationException(SR.Format(SR.CannotHavePropertyInTemplate, Control.TemplateProperty.Name)); 438throw new InvalidOperationException(SR.Format(SR.CannotHavePropertyInTemplate, FrameworkElement.StyleProperty.Name)); 445throw new InvalidOperationException(SR.Format(SR.CannotHavePropertyInTemplate, FrameworkElement.DefaultStyleKeyProperty.Name)); 452throw new InvalidOperationException(SR.Format(SR.CannotHavePropertyInTemplate, FrameworkElement.OverridesDefaultStyleProperty.Name)); 459throw new InvalidOperationException(SR.Format(SR.CannotHavePropertyInTemplate, FrameworkElement.NameProperty.Name)); 496throw new InvalidOperationException(SR.Format(SR.NameNotFound, propertyValue.ChildName)); 551throw new InvalidOperationException(SR.MissingTriggerProperty); 982throw new InvalidOperationException(SR.Format(SR.UnsupportedTriggerInTemplate, triggerBase.GetType().Name)); 999throw new InvalidOperationException(SR.Format(SR.UnsupportedTriggerInTemplate, triggerBase.GetType().Name)); 1087throw new InvalidOperationException(SR.Format(SR.EventTriggerTargetNameUnresolvable, eventTrigger.SourceName)); 1596throw new InvalidOperationException(SR.Format(SR.CrossThreadAccessOfUnshareableFreezable, freezable.GetType().FullName)); 2079throw new InvalidOperationException( 2334throw new InvalidOperationException(SR.Format(SR.MustBeFrameworkDerived, d.GetType())); 4086throw new InvalidOperationException(SR.ChildTemplateInstanceDoesNotExist); 5323throw new InvalidOperationException(SR.StyleHasTooManyElements);
System\Windows\TemplateBindingExtension.cs (1)
57throw new InvalidOperationException(SR.MarkupExtensionProperty);
System\Windows\TemplateContent.cs (1)
1236throw new InvalidOperationException(SR.Format(SR.MissingContentSource, contentSource, targetType));
System\Windows\TemplateContentLoader.cs (1)
24throw new InvalidOperationException(SR.Format(SR.DeferringLoaderNoContext, nameof(TemplateContentLoader), typeof(T).Name));
System\Windows\TemplateKey.cs (3)
50throw new InvalidOperationException(SR.Format(SR.PropertyMustHaveValue, "DataType", this.GetType().Name)); 69throw new InvalidOperationException(SR.Format(SR.PropertyIsInitializeOnly, "DataType", this.GetType().Name)); 71throw new InvalidOperationException(SR.Format(SR.PropertyIsImmutable, "DataType", this.GetType().Name));
System\Windows\ThemeDictionaryExtension.cs (3)
68throw new InvalidOperationException(SR.ThemeDictionaryExtension_Name); 74throw new InvalidOperationException(SR.Format(SR.MarkupExtensionNoContext, GetType().Name, "IProvideValueTarget" )); 86throw new InvalidOperationException(SR.ThemeDictionaryExtension_Source);
System\Windows\Trigger.cs (4)
39throw new InvalidOperationException(SR.Format(SR.CannotChangeAfterSealed, "Trigger")); 69throw new InvalidOperationException(SR.Format(SR.CannotChangeAfterSealed, "Trigger")); 116throw new InvalidOperationException(SR.Format(SR.CannotChangeAfterSealed, "Trigger")); 199throw new InvalidOperationException(SR.Format(SR.InvalidPropertyValue, _value, _property.Name ));
System\Windows\TriggerAction.cs (3)
87throw new InvalidOperationException(SR.TriggerActionMustBelongToASingleTrigger); 102throw new InvalidOperationException(SR.TriggerActionAlreadySealed); 114throw new InvalidOperationException(SR.Format(SR.CannotChangeAfterSealed, "TriggerAction"));
System\Windows\TriggerActionCollection.cs (1)
292throw new InvalidOperationException(SR.Format(SR.CannotChangeAfterSealed, "TriggerActionCollection"));
System\Windows\TriggerBase.cs (3)
247throw new InvalidOperationException(SR.Format(SR.PropertyTriggerCycleDetected, source.Name)); 300throw new InvalidOperationException(SR.Format(SR.VisualTriggerSettersIncludeUnsupportedSetterType, setters[i].GetType().Name)); 358throw new InvalidOperationException(SR.PropertyTriggerLayerLimitExceeded);
System\Windows\TriggerCollection.cs (1)
131throw new InvalidOperationException(SR.Format(SR.CannotChangeAfterSealed, "TriggerCollection"));
System\Windows\VisualStateManager.cs (1)
192throw new InvalidOperationException();
System\Windows\Window.cs (20)
257throw new InvalidOperationException(SR.DragMoveFail); 280throw new InvalidOperationException(SR.ShowDialogOnVisible); 284throw new InvalidOperationException(SR.ShowDialogOnModal); 800throw new InvalidOperationException(SR.ChangeNotAllowedAfterShow); 1239throw new InvalidOperationException(SR.CantSetOwnerAfterDialogIsShown); 1247throw new InvalidOperationException(SR.CantSetOwnerToClosedWindow); 1249throw new InvalidOperationException(SR.CantSetOwnerWhosHwndIsNotCreated); 1388throw new InvalidOperationException(SR.DialogResultMustBeSetAfterShowDialog); 1783throw new InvalidOperationException(SR.WindowMustBeRoot); 2400throw new InvalidOperationException(SR.WindowMustBeRoot); 3223throw new InvalidOperationException(SR.CantSetOwnerAfterDialogIsShown); 3702throw new InvalidOperationException(SR.ReshowNotAllowed); 3710throw new InvalidOperationException(SR.InvalidOperationDuringClosing); 3715throw new InvalidOperationException(SR.InvalidCompositionTarget); 3723throw new InvalidOperationException(SR.NotAllowedBeforeShow); 6319throw new InvalidOperationException(SR.TransformNotSupported); 6333throw new InvalidOperationException(SR.ClipToBoundsNotSupported); 6834throw new InvalidOperationException(SR.IncorrectFlowDirection); 6947throw new InvalidOperationException(SR.MustUseWindowStyleNone); 6958throw new InvalidOperationException(SR.ShowNonActivatedAndMaximized);
PresentationUI (23)
MS\Internal\Documents\Application\DocumentStream.cs (4)
503throw new InvalidOperationException( 508throw new InvalidOperationException( 513throw new InvalidOperationException( 973throw new InvalidOperationException(
MS\Internal\Documents\Application\PackageController.cs (2)
123throw new InvalidOperationException( 131throw new InvalidOperationException(
MS\Internal\Documents\Application\RightsManagementSuppressedStream.cs (1)
162throw new InvalidOperationException(
MS\Internal\Documents\Application\StreamProxy.cs (1)
260throw new InvalidOperationException(
MS\Internal\Documents\Application\TransactionalPackage.cs (2)
101throw new InvalidOperationException(); 498throw new InvalidOperationException(
MS\Internal\Documents\DocumentApplicationDocumentViewer.cs (1)
291throw new InvalidOperationException(
MS\Internal\Documents\PeoplePickerWrapper.cs (2)
212throw new InvalidOperationException( 274throw new InvalidOperationException(SR.PeoplePickerInvalidParentWindow);
MS\Internal\Documents\RightsManagementManager.cs (1)
426throw new InvalidOperationException(
MS\Internal\Documents\RightsManagementProvider.cs (9)
193throw new InvalidOperationException( 220throw new InvalidOperationException( 261throw new InvalidOperationException( 267throw new InvalidOperationException( 297throw new InvalidOperationException( 303throw new InvalidOperationException( 571throw new InvalidOperationException( 646throw new InvalidOperationException( 810throw new InvalidOperationException(
ReachFramework (24)
AlphaFlattener\Flattener.cs (9)
1330throw new InvalidOperationException(); 1335throw new InvalidOperationException(); 1340throw new InvalidOperationException(); 1345throw new InvalidOperationException(); 1350throw new InvalidOperationException(); 1355throw new InvalidOperationException(); 1360throw new InvalidOperationException(); 1365throw new InvalidOperationException(); 1415throw new InvalidOperationException();
AlphaFlattener\MetroDevice.cs (2)
72throw new InvalidOperationException(); 133throw new InvalidOperationException();
Packaging\XpsDocument.cs (7)
481throw new InvalidOperationException(SR.ReachPackaging_DocumentWasClosed); 509throw new InvalidOperationException(SR.ReachPackaging_DocumentWasClosed); 540throw new InvalidOperationException(SR.ReachPackaging_DocumentWasClosed); 585throw new InvalidOperationException(SR.ReachPackaging_DocumentWasClosed); 633throw new InvalidOperationException(SR.ReachPackaging_DocumentWasClosed); 838throw new InvalidOperationException(SR.ReachPackaging_DocumentWasClosed); 842throw new InvalidOperationException(SR.ReachPackaging_SigningDoesNotMeetPolicy);
PrintConfig\PTProvider.cs (1)
561throw 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)
1284throw new InvalidOperationException("CurrentFixedPageWriter uninitialized"); 1300throw new InvalidOperationException("CurrentFixedPageWriter uninitialized"); 1316throw new InvalidOperationException("CurrentFixedPageWriter uninitialized");
Replay (7)
src\Compilers\Shared\BuildProtocol.cs (1)
356throw new InvalidOperationException("Received invalid response type from server.");
src\Compilers\Shared\BuildServerConnection.cs (3)
695throw new InvalidOperationException("Unable to acquire guard"); 764throw new InvalidOperationException("Lock already held"); 876throw new InvalidOperationException("Lock already held");
src\Dependencies\Contracts\Contract.cs (1)
161throw new InvalidOperationException($"{message} - file {fileName} line {lineNumber}");
src\Dependencies\Contracts\ExceptionUtilities.cs (2)
27return new InvalidOperationException(output); 31=> new InvalidOperationException($"This program location is thought to be unreachable. File='{path}' Line={line}");
Roslyn.Diagnostics.Analyzers (61)
AbstractApplyTraitToClass`1.cs (2)
77throw new InvalidOperationException("Failed to obtain the attribute declaration."); 82throw new InvalidOperationException("Failed to obtain the method syntax to which the attribute is applied.");
ExportedPartsShouldHaveImportingConstructor.cs (2)
63throw new InvalidOperationException("Found MEF v1 ExportAttribute, but could not find the corresponding ImportingConstructorAttribute."); 68throw new InvalidOperationException("Found MEF v2 ExportAttribute, but could not find the corresponding ImportingConstructorAttribute.");
src\Compilers\Core\Portable\InternalUtilities\ReaderWriterLockSlimExtensions.cs (2)
93throw new InvalidOperationException(); 101throw new InvalidOperationException();
src\Compilers\Core\Portable\Text\TextChangeRangeExtensions.cs (1)
323throw new InvalidOperationException();
src\Dependencies\Collections\Internal\ThrowHelper.cs (4)
181throw new InvalidOperationException(GetResourceString(resource), e); 199throw new InvalidOperationException(SR.InvalidOperation_EnumFailedVersion); 205throw new InvalidOperationException(SR.InvalidOperation_EnumOpCantHappen); 211throw new InvalidOperationException(SR.InvalidOperation_ConcurrentOperationsNotSupported);
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (1)
102throw new InvalidOperationException($"Unexpected concurrent access to {GetType()}");
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+ValueBuilder.cs (1)
68throw new InvalidOperationException($"Unexpected concurrent access to {GetType()}");
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+ValueBuilder.cs (1)
78throw new InvalidOperationException($"Unexpected concurrent access to {GetType()}");
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Enumerator.cs (2)
24public object? Current => throw new InvalidOperationException(); 33throw new InvalidOperationException();
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Enumerator`1.cs (1)
24public new T Current => throw new InvalidOperationException();
src\Dependencies\Contracts\Contract.cs (1)
161throw new InvalidOperationException($"{message} - file {fileName} line {lineNumber}");
src\Dependencies\Contracts\ExceptionUtilities.cs (2)
27return new InvalidOperationException(output); 31=> new InvalidOperationException($"This program location is thought to be unreachable. File='{path}' Line={line}");
src\RoslynAnalyzers\Utilities\Compiler\Extensions\IOperationExtensions.cs (1)
532throw new InvalidOperationException();
src\RoslynAnalyzers\Utilities\Compiler\Lightup\LightupHelpers.cs (2)
171throw new InvalidOperationException(); 187throw new InvalidOperationException();
src\RoslynAnalyzers\Utilities\Compiler\SmallDictionary.cs (2)
306throw new InvalidOperationException(); 573throw new InvalidOperationException();
src\RoslynAnalyzers\Utilities\Workspaces\DocumentExtensions.cs (3)
22return semanticModel ?? throw new InvalidOperationException("SyntaxTree is required to accomplish the task but is not supported by document"); 31return syntaxTree ?? throw new InvalidOperationException("SyntaxTree is required to accomplish the task but is not supported by document"); 40return root ?? throw new InvalidOperationException("SyntaxTree is required to accomplish the task but is not supported by document");
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EditorConfig\Parsing\EditorConfigFile.cs (2)
62throw new InvalidOperationException("No path was given for this editorconfig file"); 78throw new InvalidOperationException("No path was given for this editorconfig file");
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EditorConfig\Parsing\Sections\Section.cs (1)
142throw new InvalidOperationException("No path given for editorconfig");
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SemanticModelExtensions.cs (7)
37=> semanticModel.AnalyzeDataFlow(statementOrExpression) ?? throw new InvalidOperationException(); 40=> semanticModel.AnalyzeDataFlow(firstStatement, lastStatement) ?? throw new InvalidOperationException(); 43=> semanticModel.AnalyzeControlFlow(statement) ?? throw new InvalidOperationException(); 46=> semanticModel.AnalyzeControlFlow(firstStatement, lastStatement) ?? throw new InvalidOperationException(); 51?? throw new InvalidOperationException(); 57?? throw new InvalidOperationException(); 63?? throw new InvalidOperationException();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (1)
24=> node.Parent ?? throw new InvalidOperationException("Node's parent was null");
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTokenExtensions.cs (2)
22=> GetAncestor(token, predicate) ?? throw new InvalidOperationException("Could not find a valid ancestor"); 154=> token.Parent ?? throw new InvalidOperationException("Token's parent was null");
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser.cs (1)
89trimmedDictionary[key.Trim()] = allRawConventions.TryGetValue(key, out var value) ? value : throw new InvalidOperationException();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\NamingStyle.cs (2)
83throw new InvalidOperationException(); 170default: throw new InvalidOperationException();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (1)
482throw new InvalidOperationException();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Serialization\ObjectWriter.cs (1)
286throw new InvalidOperationException($"Unsupported object type: {value.GetType()}");
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\BKTree.Builder.cs (1)
201throw new InvalidOperationException();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\RoslynParallel.NetFramework.cs (2)
596Enumerator = source.GetEnumerator() ?? throw new InvalidOperationException(); 622Enumerator = source.GetAsyncEnumerator(Cancellation.Token) ?? throw new InvalidOperationException();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\StringEscapeEncoder.cs (1)
138throw new InvalidOperationException();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\TaskExtensions.cs (1)
36throw new InvalidOperationException($"{nameof(WaitAndGetResult)} cannot be called from a thread pool thread.");
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationConstructedMethodSymbol.cs (1)
85=> throw new System.InvalidOperationException();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationMethodSymbol.cs (1)
110=> throw new InvalidOperationException();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\DocumentExtensions.cs (3)
39return semanticModel ?? throw new InvalidOperationException(string.Format(WorkspaceExtensionsResources.SyntaxTree_is_required_to_accomplish_the_task_but_is_not_supported_by_document_0, document.Name)); 63return syntaxTree ?? throw new InvalidOperationException(string.Format(WorkspaceExtensionsResources.SyntaxTree_is_required_to_accomplish_the_task_but_is_not_supported_by_document_0, document.Name)); 80return root ?? throw new InvalidOperationException(string.Format(WorkspaceExtensionsResources.SyntaxTree_is_required_to_accomplish_the_task_but_is_not_supported_by_document_0, document.Name));
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\ISolutionExtensions.cs (3)
36=> solution.GetDocument(syntaxTree) ?? throw new InvalidOperationException(); 43throw new InvalidOperationException(string.Format(WorkspaceExtensionsResources.Project_of_ID_0_is_required_to_accomplish_the_task_but_is_not_available_from_the_solution, projectId)); 109=> new InvalidOperationException(WorkspaceExtensionsResources.The_solution_does_not_contain_the_specified_document);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\ProjectExtensions.cs (1)
114throw new InvalidOperationException(string.Format(WorkspaceExtensionsResources.Compilation_is_required_to_accomplish_the_task_but_is_not_supported_by_project_0, project.Name));
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\AddImports\AbstractAddImportsService.cs (1)
126throw new InvalidOperationException();
Roslyn.Diagnostics.CSharp.Analyzers (11)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SemanticModelExtensions.cs (8)
463?? throw new InvalidOperationException(); 469?? throw new InvalidOperationException(); 475?? throw new InvalidOperationException(); 481?? throw new InvalidOperationException(); 487?? throw new InvalidOperationException(); 493?? throw new InvalidOperationException(); 499?? throw new InvalidOperationException(); 505?? throw new InvalidOperationException();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxTriviaExtensions.cs (1)
115throw new InvalidOperationException();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\ExpressionGenerator.cs (1)
238tokenFactory, isNegative: x => false, negate: t => throw new InvalidOperationException(), integerMinValueString: null);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ITypeSymbolExtensions.TypeSyntaxGeneratorVisitor.cs (1)
54throw new InvalidOperationException("This symbol cannot be converted into a NameSyntax");
Roslyn.Test.PdbUtilities (1)
Reader\Token2SourceLineExporter.cs (1)
626throw new InvalidOperationException("InvalidOperation_HashInsertFailed");
Roslyn.Test.Performance.Utilities (1)
RelativeDirectory.cs (1)
36throw new InvalidOperationException("The test has not been set up correctly. Avoid doing any directory operations in the constructor.");
Roslyn.VisualStudio.Next.UnitTests (1)
Services\PerformanceTrackerServiceTests.cs (1)
249throw new InvalidOperationException($"Resource '{resourceName}' not found in {assembly.FullName}.");
RoutingSandbox (1)
Program.cs (1)
51throw new InvalidOperationException();
RoutingWebSite (1)
Program.cs (1)
53throw new InvalidOperationException();
RunTests (4)
AssemblyScheduler.cs (1)
260throw new InvalidOperationException($"Could not deserialize {testListPath}");
HelixTestRunner.cs (1)
382?? throw new InvalidOperationException("Failed to deserialize global.json.");
Program.cs (2)
347throw new InvalidOperationException($"Did not find any test assemblies"); 385_ => throw new InvalidOperationException($"Unexpected {nameof(TestRuntime)} value: {testRuntime}"),
SemanticSearch.BuildTask (3)
src\Dependencies\Contracts\Contract.cs (1)
161throw new InvalidOperationException($"{message} - file {fileName} line {lineNumber}");
src\Dependencies\Contracts\ExceptionUtilities.cs (2)
27return new InvalidOperationException(output); 31=> new InvalidOperationException($"This program location is thought to be unreachable. File='{path}' Line={line}");
ServerComparison.TestSites (1)
OneTransformPerRequest.cs (1)
26throw new InvalidOperationException("Transformation ran multiple times.");
Shared (11)
Data.Validation\LengthAttribute.cs (3)
98throw new InvalidOperationException($"{nameof(LengthAttribute)} requires a minimum length >= 0 (see field {validationContext.GetDisplayName()})"); 103throw new InvalidOperationException($"{nameof(LengthAttribute)} requires the minimum length to be less than maximum length (see field {validationContext.GetDisplayName()})"); 140throw new InvalidOperationException($"{nameof(LengthAttribute)} is not supported for fields of type {value.GetType()} (see field {validationContext.GetDisplayName()})");
Data.Validation\TimeSpanAttribute.cs (2)
121throw new InvalidOperationException($"{nameof(TimeSpanAttribute)} requires that the minimum value be less than the maximum value (see field {validationContext.GetDisplayName()})"); 158throw new InvalidOperationException($"{nameof(TimeSpanAttribute)} can only be used with fields of type TimeSpan (see field {validationContext.GetDisplayName()})");
EmptyCollections\EmptyReadOnlyList.cs (2)
55public T Current => throw new InvalidOperationException(); 56object IEnumerator.Current => throw new InvalidOperationException();
JsonSchemaExporter\JsonSchemaExporter.cs (1)
794throw new InvalidOperationException("The depth of the generated JSON schema exceeds the JsonSerializerOptions.MaxDepth setting.");
ServerSentEvents\ThrowHelper.cs (1)
21throw new InvalidOperationException("The enumerable may be enumerated only once.");
Throw\Throw.cs (2)
398=> throw new InvalidOperationException(message); 410=> throw new InvalidOperationException(message, innerException);
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.CodeDom (13)
Microsoft\CSharp\CSharpCodeGenerator.cs (6)
304throw new InvalidOperationException(SR.CodeGenReentrance); 3102throw new InvalidOperationException(SR.CodeGenOutputWriter); 3130throw new InvalidOperationException(SR.CodeGenOutputWriter); 3158throw new InvalidOperationException(SR.CodeGenOutputWriter); 3193throw new InvalidOperationException(SR.CodeGenOutputWriter); 3221throw new InvalidOperationException(SR.CodeGenOutputWriter);
System\CodeDom\Compiler\CodeGenerator.cs (6)
256throw new InvalidOperationException(SR.CodeGenOutputWriter); 284throw new InvalidOperationException(SR.CodeGenOutputWriter); 312throw new InvalidOperationException(SR.CodeGenOutputWriter); 347throw new InvalidOperationException(SR.CodeGenOutputWriter); 375throw new InvalidOperationException(SR.CodeGenOutputWriter); 404throw new InvalidOperationException(SR.CodeGenReentrance);
System\CodeDom\Compiler\CompilerInfo.cs (1)
74throw new InvalidOperationException(SR.Format(SR.Provider_does_not_support_options, CodeDomProviderType));
System.Collections (39)
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)
233throw new InvalidOperationException(SR.InvalidOperation_EmptyQueue); 248throw new InvalidOperationException(SR.InvalidOperation_EmptyQueue); 272throw new InvalidOperationException(SR.InvalidOperation_EmptyQueue); 1034throw new InvalidOperationException(SR.InvalidOperation_EnumFailedVersion); 1052throw new InvalidOperationException(SR.InvalidOperation_EnumFailedVersion);
System\Collections\Generic\SortedDictionary.cs (6)
461throw new InvalidOperationException(SR.InvalidOperation_EnumOpCantHappen); 481throw new InvalidOperationException(SR.InvalidOperation_EnumOpCantHappen); 494throw new InvalidOperationException(SR.InvalidOperation_EnumOpCantHappen); 507throw new InvalidOperationException(SR.InvalidOperation_EnumOpCantHappen); 662throw new InvalidOperationException(SR.InvalidOperation_EnumOpCantHappen); 823throw new InvalidOperationException(SR.InvalidOperation_EnumOpCantHappen);
System\Collections\Generic\SortedList.cs (12)
785throw new InvalidOperationException(SR.InvalidOperation_EnumOpCantHappen); 794if (_version != _sortedList.version) throw new InvalidOperationException(SR.InvalidOperation_EnumFailedVersion); 816throw new InvalidOperationException(SR.InvalidOperation_EnumOpCantHappen); 831throw new InvalidOperationException(SR.InvalidOperation_EnumOpCantHappen); 851throw new InvalidOperationException(SR.InvalidOperation_EnumOpCantHappen); 862throw new InvalidOperationException(SR.InvalidOperation_EnumFailedVersion); 894throw new InvalidOperationException(SR.InvalidOperation_EnumFailedVersion); 917throw new InvalidOperationException(SR.InvalidOperation_EnumOpCantHappen); 928throw new InvalidOperationException(SR.InvalidOperation_EnumFailedVersion); 958throw new InvalidOperationException(SR.InvalidOperation_EnumFailedVersion); 981throw new InvalidOperationException(SR.InvalidOperation_EnumOpCantHappen); 992throw 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\ThrowHelper.cs (2)
25throw new InvalidOperationException(SR.InvalidOperation_ConcurrentOperationsNotSupported); 35throw new InvalidOperationException(SR.InvalidOperation_EnumFailedVersion);
System.Collections.Concurrent (15)
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\ThrowHelper.cs (1)
26internal static void ThrowIncompatibleComparer() => throw new InvalidOperationException(SR.InvalidOperation_IncompatibleComparer);
System.Collections.Immutable (36)
System\Collections\Immutable\ImmutableArray.cs (1)
156throw 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 (2)
30throw new InvalidOperationException(); 34throw new InvalidOperationException(SR.InvalidOperation_IncompatibleComparer);
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)
152_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)
36throw 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)
867throw new InvalidOperationException(SR.Format(SR.ObjectMustBeInitialized, "SourceProvider")); // NOLOC 898throw 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)
374throw new InvalidOperationException(SR.Format( 387throw 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)
3460if (desc == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetExtendedTypeDescriptor")); 3462if (attrs == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetAttributes")); 3483if (desc == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetExtendedTypeDescriptor")); 3505if (desc == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetExtendedTypeDescriptor")); 3526if (desc == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetExtendedTypeDescriptor")); 3528if (converter == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetConverter")); 3548if (desc == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetExtendedTypeDescriptor")); 3550if (converter == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetConverter")); 3571if (desc == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetExtendedTypeDescriptor")); 3591if (desc == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetExtendedTypeDescriptor")); 3613if (desc == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetExtendedTypeDescriptor")); 3633if (desc == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetExtendedTypeDescriptor")); 3635if (events == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetEvents")); 3654if (desc == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetExtendedTypeDescriptorFromRegisteredType")); 3656if (events == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetEventsFromRegisteredType")); 3681if (desc == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetExtendedTypeDescriptor")); 3683if (evts == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetEvents")); 3703if (desc == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetExtendedTypeDescriptor")); 3705if (properties == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetProperties")); 3724if (desc == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetExtendedTypeDescriptor")); 3726if (properties == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetProperties")); 3751if (desc == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetExtendedTypeDescriptor")); 3753if (properties == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetProperties")); 3775if (desc == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetExtendedTypeDescriptor")); 3823throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetTypeDescriptor")); 3826throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetAttributes")); 3850throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetTypeDescriptor")); 3875throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetTypeDescriptor")); 3901throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetTypeDescriptor")); 3904throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetConverter")); 3928throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetTypeDescriptor")); 3931throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetConverterFromRegisteredType")); 3956throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetTypeDescriptor")); 3982throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetTypeDescriptor")); 4010throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetTypeDescriptor")); 4035throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetTypeDescriptor")); 4038throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetEvents")); 4062throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetTypeDescriptorFromRegisteredType")); 4065throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetEventsFromRegisteredType")); 4090throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetTypeDescriptor")); 4093throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetEvents")); 4118throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetTypeDescriptor")); 4122throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetProperties")); 4146throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetTypeDescriptor")); 4151throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetPropertiesFromRegisteredType")); 4176throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetTypeDescriptor")); 4179throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetProperties")); 4203throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetTypeDescriptor")); 4227throw 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)
70throw new InvalidOperationException(SR.ContainerConfiguration_DefaultConventionSet);
System.Configuration.ConfigurationManager (29)
System\Configuration\AppSettingsReader.cs (2)
38if (val == null) throw new InvalidOperationException(SR.Format(SR.AppSettingsReaderNoKey, key)); 72throw new InvalidOperationException(SR.Format(SR.AppSettingsReaderCantParse, displayString, key, type));
System\Configuration\ConfigurationManager.cs (1)
75throw new InvalidOperationException(SR.Config_system_already_set);
System\Configuration\ConfigurationSectionCollection.cs (1)
43throw new InvalidOperationException(SR.Config_cannot_edit_configurationsectiongroup_when_not_attached);
System\Configuration\ConfigurationSectionGroup.cs (5)
33throw new InvalidOperationException(SR.Config_root_section_group_cannot_be_edited); 44throw new InvalidOperationException( 140throw new InvalidOperationException(SR.Config_cannot_edit_configurationsectiongroup_when_not_attached); 153throw new InvalidOperationException(SR.Config_root_section_group_cannot_be_edited); 156throw new InvalidOperationException(SR.Config_cannot_edit_configurationsectiongroup_in_location_config);
System\Configuration\ConfigurationSectionGroupCollection.cs (1)
46throw new InvalidOperationException(SR.Config_cannot_edit_configurationsectiongroup_when_not_attached);
System\Configuration\ExceptionUtil.cs (1)
35return new InvalidOperationException(SR.Format(SR.Unexpected_Error, methodName));
System\Configuration\MgmtConfigurationRecord.cs (4)
658throw new InvalidOperationException(SR.Config_add_configurationsection_in_location_config); 666throw new InvalidOperationException(SR.Config_add_configurationsection_already_added); 818throw new InvalidOperationException(SR.Config_add_configurationsectiongroup_in_location_config); 828throw new InvalidOperationException(SR.Config_add_configurationsectiongroup_already_added);
System\Configuration\Provider\ProviderBase.cs (1)
24throw new InvalidOperationException(SR.Provider_Already_Initialized);
System\Configuration\SectionInformation.cs (13)
489if (IsRuntime) throw new InvalidOperationException(SR.Config_operation_not_runtime); 495throw new InvalidOperationException(SR.Config_cannot_edit_configurationsection_when_not_attached); 512throw new InvalidOperationException(SR.Config_cannot_edit_configurationsection_when_locked); 515throw new InvalidOperationException(SR.Config_cannot_edit_configurationsection_parentsection); 520throw new InvalidOperationException(SR.Config_cannot_edit_configurationsection_when_location_locked); 526throw new InvalidOperationException(SR.Config_configsection_parentnotvalid); 535throw new InvalidOperationException(SR.Config_cannot_edit_locationattriubtes); 541throw new InvalidOperationException(SR.Config_cannot_edit_configurationsection_in_location_config); 545throw new InvalidOperationException(SR.Config_cannot_edit_configurationsection_when_it_is_implicit); 549throw new InvalidOperationException(SR.Config_cannot_edit_configurationsection_when_it_is_undeclared); 609throw new InvalidOperationException(SR.Config_not_allowed_to_encrypt_this_section); 617else throw new InvalidOperationException(SR.Must_add_to_config_before_protecting_it); 641throw new InvalidOperationException(SR.Config_getparentconfigurationsection_first_instance);
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)
683throw new InvalidOperationException(SR.DataDom_Foliation);
System\Xml\XmlDataDocument.cs (16)
1076_ => throw new InvalidOperationException(SR.Format(SR.DataDom_CloneNode, dp.NodeType.ToString())), 1173throw new InvalidOperationException(SR.DataDom_MultipleLoad); 1815throw new InvalidOperationException(SR.DataDom_EnforceConstraintsShouldBeOff); 1869throw new InvalidOperationException(SR.DataDom_EnforceConstraintsShouldBeOff); 1920throw new InvalidOperationException(SR.DataDom_EnforceConstraintsShouldBeOff); 2162throw new InvalidOperationException(SR.DataDom_DataSetNameChange); 2167throw new InvalidOperationException(SR.DataDom_ColumnNameChange); 2169throw new InvalidOperationException(SR.DataDom_ColumnNamespaceChange); 2171throw new InvalidOperationException(SR.DataDom_ColumnMappingChange); 2176throw new InvalidOperationException(SR.DataDom_TableNameChange); 2178throw new InvalidOperationException(SR.DataDom_TableNamespaceChange); 2186throw new InvalidOperationException(SR.DataDom_TableColumnsChange); 2195throw new InvalidOperationException(SR.DataDom_DataSetTablesChange); 2206throw new InvalidOperationException(SR.DataDom_DataSetNestedRelationsChange); 2216throw new InvalidOperationException(SR.DataDom_DataSetNestedRelationsChange); 2225throw new InvalidOperationException(SR.DataDom_DataSetNestedRelationsChange);
System\Xml\XPathNodePointer.cs (1)
1309throw new InvalidOperationException(SR.DataDom_Foliation);
System.Data.Odbc (2)
Common\System\Data\Common\AdapterUtil.Odbc.cs (1)
64InvalidOperationException e = new InvalidOperationException(error, inner);
src\libraries\Common\src\System\Data\Common\AdapterUtil.cs (1)
114InvalidOperationException e = new InvalidOperationException(error);
System.Diagnostics.DiagnosticSource (17)
System\Diagnostics\Activity.cs (12)
681NotifyError(new InvalidOperationException(SR.ActivitySetParentAlreadyStarted)); 685NotifyError(new InvalidOperationException(SR.SetParentIdOnActivityWithParent)); 689NotifyError(new InvalidOperationException(SR.ParentIdAlreadySet)); 711NotifyError(new InvalidOperationException(SR.ActivitySetParentAlreadyStarted)); 715NotifyError(new InvalidOperationException(SR.SetParentIdOnActivityWithParent)); 719NotifyError(new InvalidOperationException(SR.ParentIdAlreadySet)); 740NotifyError(new InvalidOperationException(SR.StartTimeNotUtc)); 760NotifyError(new InvalidOperationException(SR.EndTimeNotUtc)); 794NotifyError(new InvalidOperationException(SR.ActivityStartAlreadyStarted)); 849NotifyError(new InvalidOperationException(SR.ActivityNotStarted)); 1050NotifyError(new InvalidOperationException(SR.SetFormatOnStartedActivity)); 1414NotifyError(new InvalidOperationException(SR.ActivityNotRunning));
System\Diagnostics\ActivityTagsCollection.cs (2)
146throw new InvalidOperationException(SR.Format(SR.KeyAlreadyExist, key)); 166throw new InvalidOperationException(SR.Format(SR.KeyAlreadyExist, item.Key));
System\Diagnostics\Metrics\Instrument.cs (2)
166throw new InvalidOperationException(SR.Format(SR.UnsupportedType, type)); 192throw new InvalidOperationException();
System\Diagnostics\Metrics\MeterListener.cs (1)
170throw new InvalidOperationException(SR.Format(SR.UnsupportedType, typeof(T)));
System.Diagnostics.Process (36)
src\libraries\Common\src\Interop\Unix\System.Native\Interop.GetHostName.cs (1)
35throw 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); 1249throw new InvalidOperationException(SR.FileNameMissing); 1253throw new InvalidOperationException(SR.StandardInputEncodingNotAllowed); 1257throw new InvalidOperationException(SR.StandardOutputEncodingNotAllowed); 1261throw new InvalidOperationException(SR.StandardErrorEncodingNotAllowed); 1265throw new InvalidOperationException(SR.ArgumentAndArgumentListInitialized); 1508throw new InvalidOperationException(SR.NoAssociatedProcess); 1595throw new InvalidOperationException(SR.CantMixSyncAsyncOperation); 1599throw new InvalidOperationException(SR.PendingAsyncOperation); 1607throw new InvalidOperationException(SR.CantGetStandardOut); 1633throw new InvalidOperationException(SR.CantMixSyncAsyncOperation); 1638throw new InvalidOperationException(SR.PendingAsyncOperation); 1647throw new InvalidOperationException(SR.CantGetStandardError); 1671throw new InvalidOperationException(SR.NoAsyncOperation); 1692throw 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); 1069private 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.Drawing.Common.Tests (3)
mono\System.Drawing\BitmapTests.cs (1)
400_ => throw new InvalidOperationException($"Cannot pass a bitmap of format {src.PixelFormat} to RotateIndexedBmp"),
System\Drawing\ImageFormatConverterTests.cs (1)
224throw new InvalidOperationException($"Unknown GUID {iformat.Guid}.");
System\Drawing\SystemFontsTests.cs (1)
57_ => throw new InvalidOperationException(
System.Formats.Asn1 (24)
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 (13)
87throw new InvalidOperationException(SR.AsnWriter_ModifyingWhileEncoding); 116throw new InvalidOperationException(SR.AsnWriter_EncodeUnbalancedStack); 140throw new InvalidOperationException(SR.AsnWriter_EncodeUnbalancedStack); 199throw new InvalidOperationException(SR.AsnWriter_EncodeUnbalancedStack); 334throw new InvalidOperationException(SR.AsnWriter_EncodeUnbalancedStack); 396throw new InvalidOperationException(SR.AsnWriter_ModifyingWhileEncoding); 442throw new InvalidOperationException(); 550throw new InvalidOperationException(new InvalidOperationException().Message, e); 618throw new InvalidOperationException(SR.AsnWriter_PopWrongTag); 626throw new InvalidOperationException(SR.AsnWriter_PopWrongTag); 915throw new InvalidOperationException(); 923throw 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)
107throw new InvalidOperationException(); 124throw 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)
118throw new InvalidOperationException(SR.Format(SR.Cbor_Reader_MajorTypeMismatch, (int)header.MajorType)); 138throw 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)
73throw new InvalidOperationException(SR.Format(SR.Cbor_ConformanceMode_IndefiniteLengthItemsNotSupported, ConformanceMode)); 167throw 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.Nrbf (23)
System\Formats\Nrbf\ArrayRecord.cs (1)
78throw new InvalidOperationException(SR.Format(SR.Serialization_TypeMismatch, expectedArrayType.AssemblyQualifiedName, TypeName.AssemblyQualifiedName));
System\Formats\Nrbf\ArrayRectangularPrimitiveRecord.cs (2)
38internal override (AllowedRecordTypes allowed, PrimitiveType primitiveType) GetAllowedRecordType() => throw new InvalidOperationException(); 40private protected override void AddValue(object value) => throw new InvalidOperationException();
System\Formats\Nrbf\ArraySinglePrimitiveRecord.cs (4)
44internal override (AllowedRecordTypes allowed, PrimitiveType primitiveType) GetAllowedRecordType() => throw new InvalidOperationException(); 46private protected override void AddValue(object value) => throw new InvalidOperationException(); 243throw new InvalidOperationException(); 317throw new InvalidOperationException();
System\Formats\Nrbf\ClassRecord.cs (2)
123_ => throw new InvalidOperationException(SR.Format(SR.Serialization_MemberTypeMismatchException, memberName)) 139? throw new InvalidOperationException(SR.Format(SR.Serialization_MemberTypeMismatchException, memberName))
System\Formats\Nrbf\ClassWithIdRecord.cs (1)
72_ => throw new InvalidOperationException()
System\Formats\Nrbf\MemberTypeInfo.cs (3)
63throw new InvalidOperationException(); 107_ => throw new InvalidOperationException() 125_ => throw new InvalidOperationException()
System\Formats\Nrbf\NrbfDecoder.cs (5)
231_ => throw new InvalidOperationException() 260_ => throw new InvalidOperationException() 291_ => throw new InvalidOperationException() 317_ => throw new InvalidOperationException() 456throw new InvalidOperationException();
System\Formats\Nrbf\SerializationRecord.cs (2)
158=> throw new InvalidOperationException(); 161=> throw new InvalidOperationException();
System\Formats\Nrbf\Utils\BinaryReaderExtensions.cs (1)
98_ => throw new InvalidOperationException(),
System\Formats\Nrbf\Utils\TypeNameHelpers.cs (2)
50_ => throw new InvalidOperationException() 107throw new InvalidOperationException();
System.Formats.Tar (9)
System\Formats\Tar\PosixTarEntry.cs (2)
61throw new InvalidOperationException(SR.TarEntryBlockOrCharacterExpected); 87throw new InvalidOperationException(SR.TarEntryBlockOrCharacterExpected);
System\Formats\Tar\SubReadStream.cs (1)
57throw new InvalidOperationException(SR.IO_NotSupported_UnseekableStream);
System\Formats\Tar\TarEntry.cs (5)
131throw new InvalidOperationException(SR.TarEntryHardLinkOrSymLinkExpected); 205throw new InvalidOperationException(SR.Format(SR.TarEntryTypeNotSupportedForExtracting, EntryType)); 239return Task.FromException(new InvalidOperationException(SR.Format(SR.TarEntryTypeNotSupportedForExtracting, EntryType))); 260throw new InvalidOperationException(SR.Format(SR.TarEntryDoesNotSupportDataStream, Name, EntryType)); 498throw new InvalidOperationException(SR.Format(SR.TarEntryTypeNotSupportedForExtracting, EntryType));
System\Formats\Tar\TarHeader.Read.cs (1)
628throw new InvalidOperationException(SR.Format(SR.TarSizeFieldTooLargeForEntryType, _typeFlag.ToString()));
System.IO.Compression (10)
src\libraries\Common\src\System\IO\Compression\ZLibNative.cs (1)
227throw 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)
373throw new InvalidOperationException(SR.CannotReadFromDeflateStream); 382throw new InvalidOperationException(SR.CannotWriteToDeflateStream); 1120throw new InvalidOperationException(SR.InvalidBeginCall);
System\IO\Compression\ZipArchiveEntry.cs (3)
185throw new InvalidOperationException(SR.LengthAfterWrite); 301throw new InvalidOperationException(SR.LengthAfterWrite); 1353throw new InvalidOperationException(SR.DeletedEntry);
System.IO.Compression.Brotli (10)
System\IO\Compression\BrotliStream.cs (1)
198throw 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)
81throw new InvalidOperationException(SR.BrotliStream_Decompress_UnsupportedOperation); 92throw new InvalidOperationException(SR.BrotliStream_Compress_InvalidData); 146throw new InvalidOperationException(SR.BrotliStream_Decompress_UnsupportedOperation); 168throw 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.Packaging (10)
System\IO\Packaging\Package.cs (5)
228throw new InvalidOperationException(SR.PartAlreadyExists); 263throw new InvalidOperationException(SR.PartDoesNotExist); 451throw new InvalidOperationException(SR.PartNamePrefixExists); 692throw new InvalidOperationException(SR.PackageRelationshipDoesNotExist); 1009throw new InvalidOperationException(SR.PartNamePrefixExists);
System\IO\Packaging\PackagePart.cs (5)
183throw new InvalidOperationException(SR.NullContentTypeProvided); 497throw new InvalidOperationException(SR.PackagePartRelationshipDoesNotExist); 715throw new InvalidOperationException(SR.ParentContainerClosed); 722throw new InvalidOperationException(SR.PackagePartDeleted); 729throw new InvalidOperationException(SR.RelationshipPartsCannotHaveRelationships);
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)
35throw 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); 164throw new InvalidOperationException(SR.InvalidOperation_PipeHandleNotSet); 203throw new InvalidOperationException(SR.InvalidOperation_PipeHandleNotSet);
System\IO\Pipes\PipeStream.cs (12)
200throw new InvalidOperationException(SR.InvalidOperation_PipeNotYetConnected); 204throw new InvalidOperationException(SR.InvalidOperation_PipeDisconnected); 208throw new InvalidOperationException(SR.InvalidOperation_PipeHandleNotSet); 219throw new InvalidOperationException(SR.InvalidOperation_PipeReadModeNotMessage); 239throw new InvalidOperationException(SR.InvalidOperation_PipeHandleNotSet); 327throw new InvalidOperationException(SR.InvalidOperation_PipeHandleNotSet); 344throw new InvalidOperationException(SR.InvalidOperation_PipeNotYetConnected); 348throw new InvalidOperationException(SR.InvalidOperation_PipeDisconnected); 352throw new InvalidOperationException(SR.InvalidOperation_PipeHandleNotSet); 368throw new InvalidOperationException(SR.InvalidOperation_PipeNotYetConnected); 372throw new InvalidOperationException(SR.InvalidOperation_PipeDisconnected); 376throw new InvalidOperationException(SR.InvalidOperation_PipeHandleNotSet);
System.IO.Ports (27)
System\IO\Ports\SerialPort.cs (23)
146throw new InvalidOperationException(SR.BaseStream_Invalid_Not_Open); 171throw new InvalidOperationException(SR.Port_not_open); 178throw new InvalidOperationException(SR.Port_not_open); 190throw new InvalidOperationException(SR.Port_not_open); 201throw new InvalidOperationException(SR.Port_not_open); 219throw new InvalidOperationException(SR.Port_not_open); 229throw new InvalidOperationException(SR.Port_not_open); 268throw new InvalidOperationException(SR.Port_not_open); 402throw new InvalidOperationException(SR.Format(SR.Cant_be_set_when_open, nameof(PortName))); 419throw new InvalidOperationException(SR.Format(SR.Cant_be_set_when_open, nameof(ReadBufferSize))); 517throw new InvalidOperationException(SR.Format(SR.Cant_be_set_when_open, nameof(WriteBufferSize))); 610throw new InvalidOperationException(SR.Port_not_open); 618throw new InvalidOperationException(SR.Port_not_open); 629throw new InvalidOperationException(SR.Port_already_open); 661throw new InvalidOperationException(SR.Port_not_open); 707throw new InvalidOperationException(SR.Port_not_open); 802throw new InvalidOperationException(SR.Port_not_open); 982throw new InvalidOperationException(SR.Port_not_open); 993throw new InvalidOperationException(SR.Port_not_open); 1059throw new InvalidOperationException(SR.Port_not_open); 1177throw new InvalidOperationException(SR.Port_not_open); 1193throw new InvalidOperationException(SR.Port_not_open); 1213throw new InvalidOperationException(SR.Port_not_open);
System\IO\Ports\SerialStream.cs (2)
119throw new InvalidOperationException(SR.In_Break_State); 127throw new InvalidOperationException(SR.In_Break_State);
System\IO\Ports\SerialStream.Unix.cs (2)
257throw new InvalidOperationException(SR.CantSetRtsWithHandshaking); 265throw new InvalidOperationException(SR.CantSetRtsWithHandshaking);
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.AsyncEnumerable (4)
System\Linq\ThrowHelper.cs (4)
34internal static void ThrowMoreThanOneElementException() => throw new InvalidOperationException(SR.MoreThanOneElement); 37internal static void ThrowMoreThanOneMatchException() => throw new InvalidOperationException(SR.MoreThanOneMatch); 40internal static void ThrowNoElementsException() => throw new InvalidOperationException(SR.NoElements); 43internal 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)
269throw new InvalidOperationException(SR.net_http_headers_not_found); 1064throw new InvalidOperationException(SR.Format(SR.net_http_headers_not_allowed_header_name, descriptor.Name)); 1152throw new InvalidOperationException(SR.Format(SR.net_http_headers_not_allowed_header_name, name));
System\Net\Http\HttpClient.cs (5)
569throw new InvalidOperationException(SR.net_http_handler_noresponse); 729throw new InvalidOperationException(SR.net_http_operation_started); 737throw new InvalidOperationException(SR.net_http_client_request_already_sent); 746throw new InvalidOperationException(SR.net_http_client_invalid_requesturi); 759throw new InvalidOperationException(SR.net_http_client_invalid_requesturi);
System\Net\Http\HttpClientHandler.cs (1)
299throw new InvalidOperationException(SR.Format(SR.net_http_invalid_enable_first, nameof(ClientCertificateOptions), nameof(ClientCertificateOption.Manual)));
System\Net\Http\HttpContent.cs (2)
146throw new InvalidOperationException(SR.net_http_content_invalid_charset, e); 670var 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)
35throw new InvalidOperationException(SR.net_http_operation_started); 646new InvalidOperationException(SR.net_http_chunked_not_allowed_with_empty_content)); 677return 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 (27)
System\Net\Mail\SmtpClient.cs (10)
156throw new InvalidOperationException(SR.SmtpInvalidOperationDuringSend); 181throw new InvalidOperationException(SR.SmtpInvalidOperationDuringSend); 204throw new InvalidOperationException(SR.SmtpInvalidOperationDuringSend); 222throw new InvalidOperationException(SR.SmtpInvalidOperationDuringSend); 245throw new InvalidOperationException(SR.SmtpInvalidOperationDuringSend); 438return (ExceptionDispatchInfo.SetCurrentStackTrace(new InvalidOperationException(SR.net_inasync)), true); 457throw new InvalidOperationException(SR.SmtpFromRequired); 484throw new InvalidOperationException(SR.SmtpRecipientRequired); 701throw new InvalidOperationException(SR.UnspecifiedHost); 705throw new InvalidOperationException(SR.InvalidPort);
System\Net\Mail\SmtpCommands.cs (8)
116throw new InvalidOperationException(SR.SmtpDataStreamOpen); 161throw new InvalidOperationException(SR.SmtpDataStreamOpen); 205throw new InvalidOperationException(SR.SmtpDataStreamOpen); 248throw new InvalidOperationException(SR.SmtpDataStreamOpen); 293throw new InvalidOperationException(SR.SmtpDataStreamOpen); 344throw new InvalidOperationException(SR.SmtpDataStreamOpen); 401throw new InvalidOperationException(SR.SmtpDataStreamOpen); 424throw new InvalidOperationException(SR.SmtpDataStreamOpen);
System\Net\Mail\SmtpConnection.cs (1)
98throw new InvalidOperationException(SR.SmtpAlreadyConnected);
System\Net\Mime\Base64Encoder.cs (1)
37throw new InvalidOperationException();
System\Net\Mime\BaseWriter.cs (2)
49throw new InvalidOperationException(SR.MailWriterIsInContent); 103throw new InvalidOperationException(SR.MailWriterIsInContent);
System\Net\Mime\MimePart.cs (1)
199throw 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)
35throw 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)
35throw 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)
35throw 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)
568throw new InvalidOperationException(SR.net_quic_accept_not_allowed);
System\Net\Quic\QuicStream.cs (4)
279throw new InvalidOperationException(SR.net_quic_reading_notallowed); 302throw new InvalidOperationException(SR.Format(SR.net_io_invalidnestedcall, "read")); 369return ValueTask.FromException(ExceptionDispatchInfo.SetCurrentStackTrace(new InvalidOperationException(SR.net_quic_writing_notallowed))); 387return ValueTask.FromException(ExceptionDispatchInfo.SetCurrentStackTrace(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)
129throw new InvalidOperationException(SR.net_reqsubmitted); 136throw new InvalidOperationException(SR.net_repcall); 188throw new InvalidOperationException(SR.net_repcall);
System\Net\FtpWebRequest.cs (19)
271throw new InvalidOperationException(SR.net_reqsubmitted); 301throw new InvalidOperationException(SR.net_reqsubmitted); 324throw new InvalidOperationException(SR.net_reqsubmitted); 359throw new InvalidOperationException(SR.net_reqsubmitted); 397throw new InvalidOperationException(SR.net_reqsubmitted); 420throw new InvalidOperationException(SR.net_reqsubmitted); 452throw new InvalidOperationException(SR.net_reqsubmitted); 469throw new InvalidOperationException(SR.net_reqsubmitted); 537throw new InvalidOperationException(SR.net_repcall); 622throw new InvalidOperationException(SR.net_repcall); 693throw new InvalidOperationException(SR.Format(SR.net_io_invalidendcall, "EndGetResponse")); 720throw new InvalidOperationException(SR.net_repcall); 773throw new InvalidOperationException(SR.net_repcall); 817throw new InvalidOperationException(SR.Format(SR.net_io_invalidendcall, "EndGetResponse")); 1470throw new InvalidOperationException(SR.net_reqsubmitted); 1487throw new InvalidOperationException(SR.net_reqsubmitted); 1507throw new InvalidOperationException(SR.net_reqsubmitted); 1523throw new InvalidOperationException(SR.net_reqsubmitted); 1555throw new InvalidOperationException(SR.net_reqsubmitted);
System\Net\HttpWebRequest.cs (19)
255throw new InvalidOperationException(SR.net_reqsubmitted); 297throw new InvalidOperationException(SR.net_reqsubmitted); 336throw new InvalidOperationException(SR.net_writestarted); 376throw new InvalidOperationException(SR.net_writestarted); 481throw new InvalidOperationException(SR.net_needchunked); 522throw new InvalidOperationException(SR.net_writestarted); 763throw new InvalidOperationException(SR.net_writestarted); 851throw new InvalidOperationException(SR.net_reqsubmitted); 906throw new InvalidOperationException(SR.net_reqsubmitted); 969throw new InvalidOperationException(SR.net_writestarted); 989throw new InvalidOperationException(SR.net_reqsubmitted); 1086throw new InvalidOperationException(SR.net_reqsubmitted); 1152throw new InvalidOperationException(SR.net_repcall); 1176throw new InvalidOperationException(SR.Format(SR.net_io_invalidendcall, "EndGetRequestStream")); 1198throw new InvalidOperationException(SR.net_reqsubmitted); 1429throw new InvalidOperationException(SR.net_repcall); 1449throw new InvalidOperationException(SR.Format(SR.net_io_invalidendcall, "EndGetResponse")); 1536throw new InvalidOperationException(SR.net_rangetype); 1555throw 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)
37throw new InvalidOperationException(SR.Format(SR.net_conflicting_options, nameof(RemoteCertificateValidationCallback))); 47throw new InvalidOperationException(SR.Format(SR.net_conflicting_options, nameof(LocalCertificateSelectionCallback))); 108throw new InvalidOperationException(SR.Format(SR.net_conflicting_options, nameof(ServerCertificateSelectionCallback))); 119throw new InvalidOperationException(SR.Format(SR.net_conflicting_options, nameof(RemoteCertificateValidationCallback)));
System\Net\Security\SslStream.cs (3)
698throw new InvalidOperationException(SR.net_ssl_certificate_exist); 955throw new InvalidOperationException(SR.net_ssl_io_already_shutdown); 962throw new InvalidOperationException(SR.net_auth_noauth);
System\Net\Security\SslStream.IO.cs (4)
197throw new InvalidOperationException(SR.Format(SR.net_io_invalidnestedcall, "authenticate")); 219throw new InvalidOperationException(SR.net_ssl_renegotiate_buffer); 293throw new InvalidOperationException(SR.Format(SR.net_io_invalidnestedcall, "authenticate")); 478throw new InvalidOperationException(SR.net_ssl_renegotiate_data);
System\Net\StreamFramer.cs (1)
50throw new InvalidOperationException(SR.Format(SR.net_frame_size,
System.Net.ServerSentEvents (1)
System\Net\ServerSentEvents\SseParser_1.cs (1)
467throw new InvalidOperationException(SR.InvalidOperation_EnumerateOnlyOnce);
System.Net.Sockets (43)
System\Net\Sockets\NetworkStream.cs (10)
235throw new InvalidOperationException(SR.net_writeonlystream); 261if (!CanRead) throw new InvalidOperationException(SR.net_writeonlystream); 305throw new InvalidOperationException(SR.net_readonlystream); 334if (!CanWrite) throw new InvalidOperationException(SR.net_readonlystream); 441throw new InvalidOperationException(SR.net_writeonlystream); 507throw new InvalidOperationException(SR.net_readonlystream); 569throw new InvalidOperationException(SR.net_writeonlystream); 592throw new InvalidOperationException(SR.net_writeonlystream); 630throw new InvalidOperationException(SR.net_readonlystream); 652throw new InvalidOperationException(SR.net_readonlystream);
System\Net\Sockets\Socket.cs (12)
506throw new InvalidOperationException(SR.net_sockets_mustnotbebound); 839throw new InvalidOperationException(SR.net_sockets_disconnectedConnect); 844throw new InvalidOperationException(SR.net_sockets_mustnotlisten); 1035throw new InvalidOperationException(SR.net_sockets_mustbind); 1040throw new InvalidOperationException(SR.net_sockets_mustlisten); 1045throw new InvalidOperationException(SR.net_sockets_disconnectedAccept); 1755throw new InvalidOperationException(SR.net_sockets_mustbind); 2844throw new InvalidOperationException(SR.net_sockets_mustbind); 2848throw new InvalidOperationException(SR.net_sockets_mustlisten); 2894throw new InvalidOperationException(SR.net_sockets_mustnotlisten); 3964throw new InvalidOperationException(SR.net_sockets_mustbind); 3975throw 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)
182throw new InvalidOperationException(SR.Format(SR.net_sockets_namedmustnotbebound, propertyName));
System\Net\Sockets\SocketAsyncContext.Unix.cs (1)
308throw new InvalidOperationException();
System\Net\Sockets\SocketAsyncEventArgs.cs (2)
341throw new InvalidOperationException(SR.InvalidOperation_BufferNotExplicitArray); 541throw new InvalidOperationException(SR.net_socketopinprogress);
System\Net\Sockets\SocketPal.Unix.cs (1)
1395throw new InvalidOperationException(SR.net_sockets_useblocking);
System\Net\Sockets\TCPClient.cs (1)
256throw 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); 203throw new InvalidOperationException(SR.net_stopped); 230throw new InvalidOperationException(SR.net_stopped);
System\Net\Sockets\UDPClient.cs (7)
325throw new InvalidOperationException(SR.net_udpconnected); 334throw new InvalidOperationException(SR.net_udpconnected); 609throw new InvalidOperationException(SR.net_udpconnected); 864throw new InvalidOperationException(SR.net_udpconnected); 899throw new InvalidOperationException(SR.net_udpconnected); 944throw new InvalidOperationException(SR.net_notconnected); 969throw 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)
227throw new InvalidOperationException("InitializationState != " + requiredState.ToString());
System\Net\WebSockets\ManagedWebSocket.cs (1)
1712private 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)
290throw new InvalidOperationException(SR.net_WebSockets_AlreadyStarted);
System.ObjectModel (1)
System\Collections\ObjectModel\ObservableCollection.cs (1)
233throw new InvalidOperationException(SR.ObservableCollectionReentrancyNotAllowed);
System.Private.CoreLib (307)
src\libraries\Common\src\Interop\Unix\System.Native\Interop.GetHostName.cs (1)
35throw 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)
345throw 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\BitArray.cs (4)
1001throw new InvalidOperationException(SR.InvalidOperation_EnumFailedVersion); 1032throw new InvalidOperationException(SR.InvalidOperation_EnumFailedVersion); 1042return new InvalidOperationException(SR.InvalidOperation_EnumNotStarted); 1047return new InvalidOperationException(SR.InvalidOperation_EnumEnded);
src\libraries\System.Private.CoreLib\src\System\Collections\Generic\Queue.cs (2)
350throw new InvalidOperationException(SR.InvalidOperation_EmptyQueue); 496throw new InvalidOperationException(_index == -1 ? SR.InvalidOperation_EnumNotStarted : SR.InvalidOperation_EnumEnded);
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)
4585throw new InvalidOperationException(SR.EventSource_ListenerCreatedInsideCallback); 4702throw new InvalidOperationException(); 4714throw new InvalidOperationException();
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\TraceLogging\TraceLoggingMetadataCollector.cs (1)
235throw new InvalidOperationException(SR.EventSource_IncorrentlyAuthoredTypeInfo);
src\libraries\System.Private.CoreLib\src\System\Enum.cs (2)
1602throw new InvalidOperationException(SR.InvalidOperation_UnknownEnumType); 2158new InvalidOperationException(SR.InvalidOperation_UnknownEnumType);
src\libraries\System.Private.CoreLib\src\System\Globalization\Calendar.cs (1)
79throw new InvalidOperationException(SR.InvalidOperation_ReadOnly);
src\libraries\System.Private.CoreLib\src\System\Globalization\CultureInfo.cs (1)
978throw new InvalidOperationException(SR.InvalidOperation_ReadOnly);
src\libraries\System.Private.CoreLib\src\System\Globalization\DateTimeFormatInfo.cs (22)
358throw new InvalidOperationException(SR.InvalidOperation_ReadOnly); 388throw new InvalidOperationException(SR.InvalidOperation_ReadOnly); 607throw new InvalidOperationException(SR.InvalidOperation_ReadOnly); 641throw new InvalidOperationException(SR.InvalidOperation_ReadOnly); 672throw new InvalidOperationException(SR.InvalidOperation_ReadOnly); 693throw new InvalidOperationException(SR.InvalidOperation_ReadOnly); 714throw new InvalidOperationException(SR.InvalidOperation_ReadOnly); 748throw new InvalidOperationException(SR.InvalidOperation_ReadOnly); 790throw new InvalidOperationException(SR.InvalidOperation_ReadOnly); 810throw new InvalidOperationException(SR.InvalidOperation_ReadOnly); 844throw new InvalidOperationException(SR.InvalidOperation_ReadOnly); 880throw new InvalidOperationException(SR.InvalidOperation_ReadOnly); 992throw new InvalidOperationException(SR.InvalidOperation_ReadOnly); 1026throw new InvalidOperationException(SR.InvalidOperation_ReadOnly); 1066throw new InvalidOperationException(SR.InvalidOperation_ReadOnly); 1091throw new InvalidOperationException(SR.InvalidOperation_ReadOnly); 1111throw new InvalidOperationException(SR.InvalidOperation_ReadOnly); 1133throw new InvalidOperationException(SR.InvalidOperation_ReadOnly); 1154throw new InvalidOperationException(SR.InvalidOperation_ReadOnly); 1597throw new InvalidOperationException(SR.InvalidOperation_ReadOnly); 1660throw new InvalidOperationException(SR.InvalidOperation_ReadOnly); 1681throw 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 (4)
102throw new InvalidOperationException(SR.Format(SR.UnknownError_Num, lastError)); 161throw new InvalidOperationException(SR.Format(SR.UnknownError_Num, lastError)); 198throw new InvalidOperationException(SR.Format(SR.UnknownError_Num, lastError)); 219throw 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)
36throw 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)
318Func<T> factory = _factory ?? throw 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)
64MethodInfo addMethod = GetAddMethod(nonPublic: false) ?? throw new InvalidOperationException(SR.InvalidOperation_NoPublicAddMethod); 72MethodInfo removeMethod = GetRemoveMethod(nonPublic: false) ?? throw 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)
197throw new InvalidOperationException(SR.Arg_UnboundGenField); 313throw 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\RuntimeMethodInfo.cs (1)
76throw new InvalidOperationException(SR.Arg_UnboundGenParam);
src\libraries\System.Private.CoreLib\src\System\Reflection\SignatureConstructedGenericType.cs (1)
62public sealed override int GenericParameterPosition => throw new InvalidOperationException(SR.Arg_NotGenericParameter);
src\libraries\System.Private.CoreLib\src\System\Reflection\SignatureGenericParameterType.cs (1)
34public sealed override Type GetGenericTypeDefinition() => throw new InvalidOperationException(SR.InvalidOperation_NotGenericType);
src\libraries\System.Private.CoreLib\src\System\Reflection\SignatureHasElementType.cs (2)
35public sealed override Type GetGenericTypeDefinition() => throw new InvalidOperationException(SR.InvalidOperation_NotGenericType); 38public sealed override int GenericParameterPosition => throw new InvalidOperationException(SR.Arg_NotGenericParameter);
src\libraries\System.Private.CoreLib\src\System\Resources\FileBasedResourceGroveler.cs (1)
103throw new InvalidOperationException(SR.Format(SR.InvalidOperation_ResMgrBadResSet_Type, _mediator.UserResourceSet.AssemblyQualifiedName), e);
src\libraries\System.Private.CoreLib\src\System\Resources\ManifestBasedResourceGroveler.cs (1)
265throw 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)
126throw new InvalidOperationException(SR.ResourceReaderIsClosed);
src\libraries\System.Private.CoreLib\src\System\Resources\ResourceReader.cs (13)
239throw new InvalidOperationException(SR.ResourceReaderIsClosed); 487throw new InvalidOperationException(SR.Format(SR.InvalidOperation_ResourceNotString_Type, FindType(typeIndex).FullName)); 500throw new InvalidOperationException(SR.Format(SR.InvalidOperation_ResourceNotString_Type, typeString)); 1089if (_currentName == ENUM_DONE) throw new InvalidOperationException(SR.InvalidOperation_EnumEnded); 1090if (!_currentIsValid) throw new InvalidOperationException(SR.InvalidOperation_EnumNotStarted); 1091if (_reader._resCache == null) throw new InvalidOperationException(SR.ResourceReaderIsClosed); 1106if (_currentName == ENUM_DONE) throw new InvalidOperationException(SR.InvalidOperation_EnumEnded); 1107if (!_currentIsValid) throw new InvalidOperationException(SR.InvalidOperation_EnumNotStarted); 1108if (_reader._resCache == null) throw new InvalidOperationException(SR.ResourceReaderIsClosed); 1143if (_currentName == ENUM_DONE) throw new InvalidOperationException(SR.InvalidOperation_EnumEnded); 1144if (!_currentIsValid) throw new InvalidOperationException(SR.InvalidOperation_EnumNotStarted); 1145if (_reader._resCache == null) throw new InvalidOperationException(SR.ResourceReaderIsClosed); 1157if (_reader._resCache == null) throw new InvalidOperationException(SR.ResourceReaderIsClosed);
src\libraries\System.Private.CoreLib\src\System\Resources\ResourceSet.cs (3)
143throw new InvalidOperationException(SR.Format(SR.InvalidOperation_ResourceNotString_Name, name)); 154throw new InvalidOperationException(SR.Format(SR.InvalidOperation_ResourceNotString_Name, name)); 167throw new InvalidOperationException(SR.Format(SR.InvalidOperation_ResourceNotString_Name, name));
src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\ConditionalWeakTable.cs (1)
900throw new InvalidOperationException(SR.InvalidOperation_CollectionCorrupted);
src\libraries\System.Private.CoreLib\src\System\Runtime\ExceptionServices\ExceptionHandling.cs (1)
38throw new InvalidOperationException(SR.InvalidOperation_CannotRegisterSecondHandler);
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\ComWrappers.cs (4)
1084throw new InvalidOperationException(SR.InvalidOperation_SuppliedInnerMustBeMarkedAggregation); 1392throw new InvalidOperationException(SR.InvalidOperation_ResetGlobalComWrappersInstance); 1416throw new InvalidOperationException(SR.InvalidOperation_ResetGlobalComWrappersInstance); 1756throw new InvalidOperationException("InvalidOperation_EnumOpCantHappen");
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Java\JavaMarshal.cs (2)
22throw new InvalidOperationException(SR.InvalidOperation_ReinitializeJavaMarshal); 52throw new InvalidOperationException(SR.InvalidOperation_IncorrectGCHandleType);
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshalling\ComVariant.cs (1)
433throw 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\InteropServices\TypeMapLazyDictionary.cs (1)
195throw new InvalidOperationException(SR.InvalidOperation_TypeMapMissingEntryAssembly);
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 (4)
463throw new InvalidOperationException(SR.AssemblyLoadContext_Unload_CannotUnloadIfNotCollectible); 495throw new InvalidOperationException(SR.AssemblyLoadContext_Verify_NotUnloading); 652throw new InvalidOperationException(SR.InvalidOperation_ResolvedAssemblyMustBeRuntimeAssembly); 657throw new InvalidOperationException(SR.InvalidOperation_ResolvedAssemblyRequestedNameMismatch);
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), 315throw 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)
114T value = valueFactory() ?? throw new InvalidOperationException(SR.Lazy_StaticInit_InvalidOperation); 267throw 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); 402throw new InvalidOperationException(SR.TaskScheduler_ExecuteTask_WrongTaskScheduler); 548throw new InvalidOperationException(SR.TaskScheduler_FromCurrentSynchronizationContext_NoCurrent);
src\libraries\System.Private.CoreLib\src\System\Threading\Thread.cs (5)
228throw new InvalidOperationException(SR.InvalidOperation_ThreadWrongThreadStart); 278throw new InvalidOperationException(SR.Thread_Operation_RequiresCurrentThread); 292throw new InvalidOperationException(SR.Thread_Operation_RequiresCurrentThread); 555throw new InvalidOperationException(SR.Thread_GetSetCompressedStack_NotSupported); 561throw new InvalidOperationException(SR.Thread_GetSetCompressedStack_NotSupported);
src\libraries\System.Private.CoreLib\src\System\Threading\ThreadLocal.cs (2)
325throw new InvalidOperationException(SR.ThreadLocal_Value_RecursiveCallsToValue); 430throw 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)
633var e = new InvalidOperationException(SR.InvalidOperation_TimerAlreadyClosed);
src\libraries\System.Private.CoreLib\src\System\Threading\WaitHandle.cs (1)
497var ex = new InvalidOperationException(SR.InvalidOperation_InvalidHandle);
src\libraries\System.Private.CoreLib\src\System\ThrowHelper.cs (13)
398throw new InvalidOperationException(); 410throw new InvalidOperationException(GetResourceString(resource), e); 542throw new InvalidOperationException(SR.InvalidOperation_EnumNotStarted); 548throw new InvalidOperationException(SR.InvalidOperation_EnumEnded); 560throw new InvalidOperationException(SR.InvalidOperation_EnumFailedVersion); 566throw new InvalidOperationException(SR.InvalidOperation_EnumOpCantHappen); 572throw new InvalidOperationException(SR.InvalidOperation_NoValue); 578throw new InvalidOperationException(SR.InvalidOperation_ConcurrentOperationsNotSupported); 584throw new InvalidOperationException(SR.InvalidOperation_HandleIsNotInitialized); 590throw new InvalidOperationException(SR.InvalidOperation_HandleIsNotPinned); 602throw new InvalidOperationException(SR.InvalidOperation_InvalidUtf8); 725return new InvalidOperationException(GetResourceString(resource)); 760return new InvalidOperationException(
src\libraries\System.Private.CoreLib\src\System\Type.cs (3)
85public virtual int GenericParameterPosition => throw new InvalidOperationException(SR.Arg_NotGenericParameter); 90throw new InvalidOperationException(SR.Arg_NotGenericParameter); 91throw 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)
199throw 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 (6)
369throw new InvalidOperationException(); 380throw new InvalidOperationException(); 391throw new InvalidOperationException(); 402throw new InvalidOperationException(); 413throw new InvalidOperationException(); 424throw 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)
468throw new InvalidOperationException(SR.InvalidOperation_NotWithConcurrentGC); 476throw new InvalidOperationException(SR.InvalidOperation_NotWithConcurrentGC); 536throw new InvalidOperationException(SR.InvalidOperationException_AlreadyInNoGCRegion); 569throw new InvalidOperationException(SR.InvalidOperationException_NoGCRegionNotInProgress); 571throw new InvalidOperationException(SR.InvalidOperationException_NoGCRegionInduced); 573throw new InvalidOperationException(SR.InvalidOperationException_NoGCRegionAllocationExceeded); 728throw new InvalidOperationException(SR.Format(SR.InvalidOperationException_NoGCRegionNotInProgress)); 730throw new InvalidOperationException(SR.Format(SR.InvalidOperationException_NoGCRegionAllocationExceeded)); 732throw new InvalidOperationException(SR.InvalidOperationException_NoGCRegionCallbackAlreadyRegistered); 993throw new InvalidOperationException(SR.InvalidOperationException_HardLimitTooLow); 995throw new InvalidOperationException(SR.InvalidOperationException_HardLimitInvalid);
src\System\Reflection\Emit\DynamicILGenerator.cs (2)
180throw new InvalidOperationException(SR.InvalidOperation_NotAVarArgCallingConvention); 403throw 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(); 59throw new InvalidOperationException(); 193throw 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); 900throw new InvalidOperationException(SR.InvalidOperation_BadInstructionOrIndexOutOfBound); 968throw new InvalidOperationException(SR.Argument_BadExceptionCodeGen); 1181throw new InvalidOperationException(SR.InvalidOperation_TypeHasBeenCreated); 1188throw 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(); } 681throw new InvalidOperationException(SR.InvalidOperation_ShouldNotHaveMethodBody);
src\System\Reflection\Emit\RuntimeModuleBuilder.cs (10)
314throw new InvalidOperationException(); 325throw new InvalidOperationException(SR.InvalidOperation_NotAVarArgCallingConvention); 809throw new InvalidOperationException(SR.InvalidOperation_GlobalsHaveBeenCreated); 829throw new InvalidOperationException(SR.InvalidOperation_GlobalsHaveBeenCreated); 849throw new InvalidOperationException(SR.InvalidOperation_GlobalsHaveBeenCreated); 866throw new InvalidOperationException(SR.InvalidOperation_GlobalsHaveBeenCreated); 974throw new InvalidOperationException(SR.InvalidOperation_CannotImportGlobalFromDifferentModule); 996throw new InvalidOperationException(SR.InvalidOperation_CannotImportGlobalFromDifferentModule); 1197throw new InvalidOperationException(SR.InvalidOperation_CannotImportGlobalFromDifferentModule); 1209throw new InvalidOperationException(SR.InvalidOperation_CannotImportGlobalFromDifferentModule);
src\System\Reflection\Emit\RuntimeTypeBuilder.cs (9)
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); 1592throw new InvalidOperationException(SR.InvalidOperation_BadTypeAttributesNotAbstract); 1601throw new InvalidOperationException(SR.Format(SR.InvalidOperation_BadMethodBody, meth.Name)); 1691throw 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)
404throw new InvalidOperationException( 455throw new InvalidOperationException();
src\System\Reflection\RuntimePropertyInfo.cs (1)
219throw new InvalidOperationException(SR.Arg_EnumLitValueNotFound);
src\System\Runtime\CompilerServices\RuntimeHelpers.CoreCLR.cs (1)
360throw new InvalidOperationException();
src\System\Runtime\ControlledExecution.CoreCLR.cs (1)
51throw new InvalidOperationException(SR.InvalidOperation_NestedControlledExecutionRun);
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)
844throw new InvalidOperationException(SR.Arg_NotGenericParameter); 1812static void ThrowInvalidOperationException() => throw new InvalidOperationException(SR.InvalidOperation_NullModuleHandle);
src\System\RuntimeType.CoreCLR.cs (11)
1527throw new InvalidOperationException(); 2713throw new InvalidOperationException(SR.Arg_GenericParameter); 3252throw new InvalidOperationException(SR.Arg_NotGenericParameter); 3528throw new InvalidOperationException(SR.InvalidOperation_NotGenericType); 3538throw new InvalidOperationException(SR.Arg_NotGenericParameter); 3576throw new InvalidOperationException(SR.Format(SR.Arg_NotGenericTypeDefinition, this)); 3646throw new InvalidOperationException(SR.Arg_NotGenericParameter); 3658throw new InvalidOperationException(SR.Arg_NotGenericParameter); 3776throw new InvalidOperationException(SR.InvalidOperation_NotFunctionPointer); 3787throw new InvalidOperationException(SR.InvalidOperation_NotFunctionPointer); 3805throw new InvalidOperationException(SR.InvalidOperation_NotFunctionPointer);
src\System\StubHelpers.cs (1)
512throw new InvalidOperationException(SR.Interop_Marshal_SafeHandle_InvalidOperation);
src\System\Threading\WaitHandle.CoreCLR.cs (1)
26throw new InvalidOperationException(SR.Threading_WaitHandleTooManyPosts);
System.Private.CoreLib.Generators (1)
ProductVersionInfoGenerator.cs (1)
24throw 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)
1080throw 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)
694throw new InvalidOperationException(SR.net_uri_NotAbsolute); 727throw new InvalidOperationException(SR.net_uri_NotAbsolute); 750throw new InvalidOperationException(SR.net_uri_NotAbsolute); 765throw new InvalidOperationException(SR.net_uri_NotAbsolute); 780throw new InvalidOperationException(SR.net_uri_NotAbsolute); 812throw new InvalidOperationException(SR.net_uri_NotAbsolute); 832throw new InvalidOperationException(SR.net_uri_NotAbsolute); 845throw new InvalidOperationException(SR.net_uri_NotAbsolute); 863throw new InvalidOperationException(SR.net_uri_NotAbsolute); 894throw new InvalidOperationException(SR.net_uri_NotAbsolute); 931throw new InvalidOperationException(SR.net_uri_NotAbsolute); 945throw new InvalidOperationException(SR.net_uri_NotAbsolute); 1062throw new InvalidOperationException(SR.net_uri_NotAbsolute); 1089throw new InvalidOperationException(SR.net_uri_NotAbsolute); 1105throw new InvalidOperationException(SR.net_uri_NotAbsolute); 1122throw new InvalidOperationException(SR.net_uri_NotAbsolute); 1147throw new InvalidOperationException(SR.net_uri_NotAbsolute); 1171throw new InvalidOperationException(SR.net_uri_NotAbsolute); 1245throw new InvalidOperationException(SR.net_uri_NotAbsolute); 1336throw new InvalidOperationException(SR.net_uri_NotAbsolute); 1595throw new InvalidOperationException(SR.net_uri_NotAbsolute); 1600throw new InvalidOperationException(SR.Format(SR.net_uri_UserDrivenParsing, GetType())); 1605throw new InvalidOperationException(SR.net_uri_GetComponentsCalledWhenCanonicalizationDisabled); 1846throw new InvalidOperationException(SR.net_uri_NotAbsolute); 4989throw new InvalidOperationException(SR.net_uri_NotAbsolute);
System\UriExt.cs (3)
355throw new InvalidOperationException(SR.net_uri_GetComponentsCalledWhenCanonicalizationDisabled); 374throw new InvalidOperationException(SR.net_uri_NotAbsolute); 445throw 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.Windows.Core (16)
System\DisposalTracking.cs (1)
57throw new InvalidOperationException($"Did not dispose `{GetFriendlyTypeName(GetType())}`. Originating stack:\n{_originatingStack}");
System\IO\BinaryReaderExtensions.cs (1)
148throw new InvalidOperationException($"Cannot read primitives of {typeof(T).Name}.");
System\Private\Windows\BinaryFormat\BinaryFormatWriter.cs (1)
553_ => throw new InvalidOperationException()
System\Private\Windows\BinaryFormat\Serializer\ArraySingleString.StringListAdapter.cs (2)
26: throw new InvalidOperationException(), 27_ => throw new InvalidOperationException()
System\Private\Windows\BinaryFormat\Serializer\ClassRecord.cs (1)
90throw new InvalidOperationException("Not an IRecord or null.");
System\Private\Windows\BinaryFormat\Serializer\MemberTypeInfo.cs (1)
35_ => throw new InvalidOperationException()
System\Private\Windows\Id.cs (1)
30public static implicit operator int(Id value) => value._isNull ? throw new InvalidOperationException() : value._id;
System\Private\Windows\JsonData.cs (1)
127return result ?? throw new InvalidOperationException();
System\Private\Windows\Nrbf\SerializationRecordExtensions.cs (2)
355_ => throw new InvalidOperationException() 442_ => throw new InvalidOperationException()
System\Private\Windows\Ole\TypeBinder.cs (1)
73throw new InvalidOperationException();
System\Value.cs (1)
85private static void ThrowInvalidOperation() => throw new InvalidOperationException();
Windows\Win32\Graphics\GdiPlus\StatusExtensions.cs (2)
39return new InvalidOperationException(SR.GdiplusObjectBusy); 47return new InvalidOperationException(SR.GdiplusWrongState);
Windows\Win32\System\Com\SafeArrayScope.cs (1)
130throw new InvalidOperationException("Unable to create SAFEARRAY");
System.Private.Windows.Core.TestUtilities (15)
AppContextSwitchScope.cs (4)
31throw new InvalidOperationException("LocalAppContext switch caching is not disabled."); 43throw new InvalidOperationException($"Could not set {switchName} to {enable}."); 54throw new InvalidOperationException($"Could not reset {_switchName} to {_originalState}."); 64?? throw new InvalidOperationException($"Could not find {typeName} type in {assemblyName} assembly.");
DebuggerAttributes.cs (5)
97throw new InvalidOperationException($"Expected one DebuggerTypeProxyAttribute on {type}."); 123throw new InvalidOperationException($"Expected one DebuggerDisplayAttribute on {objType}."); 135throw new InvalidOperationException($"The DebuggerDisplayAttribute for {objType} lacks a closing brace."); 140throw new InvalidOperationException($"The DebuggerDisplayAttribute for {objType} doesn't reference any expressions."); 160throw new InvalidOperationException($"The DebuggerDisplayAttribute for {objType} contains the expression \"{reference}\".");
NoAssertContext.cs (1)
104throw new InvalidOperationException($"Did not dispose {nameof(NoAssertContext)}");
TestAccessor.cs (2)
195_ => throw new InvalidOperationException() 209throw new InvalidOperationException();
ThrowingTraceListener.cs (1)
12throw new InvalidOperationException(
XUnit\InvalidEnumDataAttribute.cs (1)
40throw new InvalidOperationException("Enum has all flags defined");
XUnit\UseCultureAttribute.cs (1)
119throw new InvalidOperationException("Unable to set the desired UI language.");
System.Private.Windows.GdiPlus (4)
Windows\Win32\Graphics\Gdi\DeviceContextHdcScope.cs (3)
137throw new InvalidOperationException(); 171throw new InvalidOperationException("Null HDC"); 186throw new InvalidOperationException($"Invalid handle ({type})");
Windows\Win32\Graphics\GdiPlus\GpImageExtensions.cs (1)
41_ => throw new InvalidOperationException()
System.Private.Xml (568)
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)
1003return 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); 1171throw new InvalidOperationException(SR.Format(SR.Sch_InvalidEndElementMultiple, s_methodNames[(int)ValidatorState.EndElement])); 1222throw new InvalidOperationException(SR.Sch_InvalidEndElementCallTyped); 2078throw new InvalidOperationException(SR.Format(SR.Sch_InvalidStartTransition, new string[] { methodName, s_methodNames[(int)ValidatorState.Start] })); 2080throw new InvalidOperationException(SR.Format(SR.Sch_InvalidStateTransition, new string[] { s_methodNames[(int)_currentState], methodName }));
System\Xml\Serialization\CodeGenerator.cs (2)
1041throw new InvalidOperationException(SR.Format(SR.ArrayTypeIsNotSupported, arrayElementType.AssemblyQualifiedName)); 1086throw new InvalidOperationException(SR.Format(SR.ArrayTypeIsNotSupported, arrayElementType.AssemblyQualifiedName));
System\Xml\Serialization\Compilation.cs (12)
76throw new InvalidOperationException(ex.Message, ex); 89throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorDetails, "Failed to generate XmlSerializer assembly, but did not throw")); 191throw new InvalidOperationException(SR.Format(SR.XmlPregenInvalidXmlSerializerAssemblyAttribute, "AssemblyName", "CodeBase")); 351throw new InvalidOperationException(SR.Format(SR.XmlPregenTypeDynamic, types[i]!.FullName)); 545throw new InvalidOperationException(SR.Format(SR.XmlMissingType, typeName, assembly.FullName)); 571throw new InvalidOperationException(SR.Format(SR.XmlInvalidEncoding3, encodingStyle, Soap.Encoding, Soap12.Encoding)); 576throw new InvalidOperationException(SR.Format(SR.XmlInvalidEncodingNotEncoded1, encodingStyle)); 603throw new InvalidOperationException(SR.Format(SR.XmlTypeInBadLoadContext, t.FullName)); 621throw new InvalidOperationException(SR.Format(SR.XmlNotSerializable, mapping.Accessor.Name)); 629throw new InvalidOperationException(SR.XmlNoPartialTrust, e); 648throw new InvalidOperationException(SR.Format(SR.XmlNotSerializable, mapping.Accessor.Name)); 656throw 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)); 1108throw new InvalidOperationException(SR.Format(SR.XmlCircularDerivation, TypeDesc!.FullName)); 1233throw new InvalidOperationException(SR.Format(SR.XmlSerializableSchemaError, nameof(IXmlSerializable), args.Message)); 1266throw new InvalidOperationException(SR.Format(SR.XmlSerializableRootDupName, _getSchemaMethod!.DeclaringType!.FullName, e.Name, elementNs)); 1319throw new InvalidOperationException(SR.Format(SR.XmlGetSchemaEmptyTypeName, _type!.FullName, _getSchemaMethod.Name)); 1324throw new InvalidOperationException(SR.Format(SR.XmlGetSchemaMethodReturnType, _type!.Name, _getSchemaMethod.Name, nameof(XmlSchemaProviderAttribute), typeof(XmlQualifiedName).FullName)); 1348throw new InvalidOperationException(SR.Format(SR.XmlMissingSchema, _xsiType.Namespace)); 1352throw new InvalidOperationException(SR.Format(SR.XmlGetSchemaInclude, _xsiType.Namespace, _getSchemaMethod.DeclaringType!.FullName, _getSchemaMethod.Name)); 1357throw new InvalidOperationException(SR.Format(SR.XmlMissingSchema, _xsiType.Namespace)); 1362throw new InvalidOperationException(SR.Format(SR.XmlGetSchemaTypeMissing, _getSchemaMethod.DeclaringType!.FullName, _getSchemaMethod.Name, _xsiType.Name, _xsiType.Namespace)); 1375if (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 (17)
585throw new InvalidOperationException(SR.XmlInternalError); 627throw new InvalidOperationException(SR.XmlInternalError); 643throw new InvalidOperationException(SR.XmlInternalError); 671throw new InvalidOperationException(SR.XmlInternalError); 692throw new InvalidOperationException(SR.XmlInternalError); 926throw new InvalidOperationException(SR.XmlInternalError); 998throw new InvalidOperationException(SR.XmlInternalError); 1003throw new InvalidOperationException(SR.XmlInternalError); 1064throw new InvalidOperationException(SR.XmlInternalError); 1109throw new InvalidOperationException(SR.XmlInternalError); 1210_ => throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorDetails, $"unknown FormatterName: {mapping.TypeDesc.FormatterName}")), 1220throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorDetails, $"unknown FormatterName: {mapping.TypeDesc.FormatterName}")); 1495throw new InvalidOperationException(SR.XmlInternalError); 1629throw new InvalidOperationException(SR.Format(SR.XmlSequenceHierarchy, structMapping.TypeDesc.FullName, mapping.Name, declaringMapping!.TypeDesc!.FullName, "Order")); 1665member.Source = (value) => throw new InvalidOperationException(SR.Format(SR.XmlReadOnlyPropertyError, pi.Name, pi.DeclaringType!.FullName)); 1684throw new InvalidOperationException(SR.Format(SR.XmlReadOnlyPropertyError, pi.Name, pi.DeclaringType!.FullName)); 1980throw new InvalidOperationException(SR.XmlInternalError);
System\Xml\Serialization\ReflectionXmlSerializationWriter.cs (11)
342throw new InvalidOperationException(SR.Format(SR.XmlChoiceMissingAnyValue, choiceMapping.TypeDesc!.FullName)); 345throw new InvalidOperationException(SR.Format(SR.XmlChoiceMissingValue, choiceMapping.TypeDesc!.FullName, element.Namespace + ":" + element.Name, element.Name, element.Namespace)); 386throw new InvalidOperationException(SR.XmlInternalError); 420throw new InvalidOperationException(SR.XmlInternalError); 526throw new InvalidOperationException(SR.XmlInternalError); 548throw new InvalidOperationException(SR.XmlInternalError); 834throw new InvalidOperationException(SR.XmlInternalError); 958throw new InvalidOperationException(SR.XmlInternalError); 1178throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorDetails, "Invalid DateTime")); 1220throw new InvalidOperationException(SR.XmlInternalError); 1432throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorDetails, $"Could not find member named {memberName} of type {declaringType}"));
System\Xml\Serialization\SchemaImporter.cs (2)
97throw new InvalidOperationException(SR.Format(SR.XmlInvalidBaseType, structMapping.TypeDesc!.FullName, baseType.FullName, typeDescToChange.BaseTypeDesc.FullName)); 148throw 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)
392_exception = new InvalidOperationException(SR.Format(SR.XmlConstructorInaccessible, FullName)); 702throw new InvalidOperationException(SR.Format(SR.XmlUnsupportedOpenGenericType, type)); 766exception = new InvalidOperationException(SR.Format(SR.XmlTypeInaccessible, type.FullName)); 771exception = new InvalidOperationException(SR.Format(SR.XmlTypeStatic, type.FullName)); 1082throw new InvalidOperationException(SR.Format(SR.XmlReadOnlyPropertyError, propertyInfo.DeclaringType, propertyInfo.Name)); 1320throw new InvalidOperationException(SR.Format(SR.XmlNoAddMethod, type.FullName, currentType, "IEnumerable")); 1371throw new InvalidOperationException(SR.Format(SR.XmlNoDefaultAccessors, type.FullName)); 1376throw new InvalidOperationException(SR.Format(SR.XmlNoAddMethod, type.FullName, indexer.PropertyType, "ICollection")); 1406throw 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 (98)
130throw new InvalidOperationException(SR.Format(SR.XmlAnonymousInclude, type.FullName)); 286throw new InvalidOperationException(SR.Format(SR.XmlInvalidNotNullable, model.TypeDesc.BaseTypeDesc!.FullName, "XmlRoot")); 341throw new InvalidOperationException(SR.Format(SR.XmlCannotReconcileAccessorDefault, accessor.Name, accessor.Namespace, value1, value2)); 346throw new InvalidOperationException(SR.Format(SR.XmlMethodTypeNameConflict, accessor.Name, accessor.Namespace)); 352throw new InvalidOperationException(SR.Format(SR.XmlCannotReconcileAccessor, accessor.Name, accessor.Namespace, GetMappingName(existing.Mapping!), GetMappingName(accessor.Mapping))); 369throw new InvalidOperationException(SR.Format(SR.XmlCannotReconcileAttributeAccessor, accessor.Name, accessor.Namespace, GetMappingName(existing.Mapping!), GetMappingName(accessor.Mapping!))); 371throw new InvalidOperationException(SR.Format(SR.XmlCannotReconcileAccessor, accessor.Name, accessor.Namespace, GetMappingName(existing.Mapping!), GetMappingName(accessor.Mapping!))); 376return new InvalidOperationException(SR.Format(SR.XmlReflectionError, context), e); 381return new InvalidOperationException(SR.Format(SR.XmlTypeReflectionError, context), e); 386return new InvalidOperationException(SR.Format(model.IsProperty ? SR.XmlPropertyReflectionError : SR.XmlFieldReflectionError, model.Name), e); 407throw new InvalidOperationException(SR.Format(SR.XmlInvalidDataTypeUsage, dataType, "XmlElementAttribute.DataType")); 412throw new InvalidOperationException(SR.Format(SR.XmlInvalidXsdDataType, dataType, "XmlElementAttribute.DataType", new XmlQualifiedName(dataType, XmlSchema.Namespace).ToString())); 416throw new InvalidOperationException(SR.Format(SR.XmlDataTypeMismatch, dataType, "XmlElementAttribute.DataType", modelTypeDesc.FullName)); 423throw new InvalidOperationException(SR.Format(SR.XmlInvalidTypeAttributes, model.Type.FullName)); 464throw new InvalidOperationException(SR.Format(SR.XmlSerializableAttributes, model.TypeDesc.FullName, nameof(XmlSchemaProviderAttribute))); 500throw new InvalidOperationException(SR.Format(SR.XmlGetSchemaMethodMissing, provider.MethodName, nameof(XmlSchemaSet), type.FullName)); 503throw new InvalidOperationException(SR.Format(SR.XmlGetSchemaMethodReturnType, type.Name, provider.MethodName, nameof(XmlSchemaProviderAttribute), typeof(XmlQualifiedName).FullName, typeof(XmlSchemaType).FullName)); 594throw new InvalidOperationException(SR.Format(SR.XmlMissingSchema, baseQname.Namespace)); 598throw new InvalidOperationException(SR.Format(SR.XmlGetSchemaInclude, baseQname.Namespace, nameof(IXmlSerializable), "GetSchema")); 625return new InvalidOperationException(SR.Format(SR.XmlInvalidAttributeUse, type.FullName)); 630return new InvalidOperationException(SR.Format(SR.XmlIllegalTypeContext, typeDesc.FullName, GetContextName(context))); 674throw new InvalidOperationException(SR.Format(SR.XmlTypesDuplicate, typeDesc.FullName, existingMapping.TypeDesc!.FullName, typeDesc.Name, existingMapping.Namespace)); 679throw new InvalidOperationException(SR.Format(SR.XmlTypesDuplicate, typeDesc.FullName, existingMapping.TypeDesc!.FullName, typeDesc.Name, existingMapping.Namespace)); 722throw new InvalidOperationException(SR.Format(SR.XmlTypesDuplicate, typeDesc.FullName, mapping.TypeDesc!.FullName, typeName, ns)); 779throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorDetails, "DeferredWorkItems.Count have changed")); 781throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorDetails, "DeferredWorkItems.Top have changed")); 878throw new InvalidOperationException(SR.Format(SR.XmlIllegalTypedTextAttribute, typeName, member.Text.Name, member.Text.Mapping.TypeDesc.FullName)); 881throw new InvalidOperationException(SR.Format(SR.XmlIllegalMultipleText, model.Type.FullName)); 888throw new InvalidOperationException(SR.Format(SR.XmlMultipleXmlns, model.Type.FullName)); 919throw new InvalidOperationException(SR.Format(SR.XmlSequenceUnique, member.SequenceId.ToString(CultureInfo.InvariantCulture), "Order", member.Name)); 925throw new InvalidOperationException(SR.Format(SR.XmlSequenceInconsistent, "Order", member.Name)); 935throw new InvalidOperationException(SR.Format(SR.XmlMultipleXmlns, model.Type.FullName)); 1176throw new InvalidOperationException(SR.Format(SR.XmlUdeclaredXsdType, dataType)); 1211throw new InvalidOperationException(SR.Format(SR.XmlIllegalAttributeFlagsArray, model.TypeDesc.FullName)); 1226throw new InvalidOperationException(SR.Format(SR.XmlNoSerializableMembers, model.TypeDesc.FullName)); 1239throw new InvalidOperationException(SR.XmlInvalidConstantAttribute); 1272throw new InvalidOperationException(SR.XmlRpcLitAttributeAttributes); 1276throw new InvalidOperationException(SR.Format(SR.XmlInvalidAttributeType, "XmlAttribute")); 1282if (i > 0) throw new InvalidOperationException(SR.XmlInvalidReturnPosition); 1298throw new InvalidOperationException(SR.XmlIllegalMultipleTextMembers); 1306throw new InvalidOperationException(SR.XmlMultipleXmlnsMembers); 1321throw new InvalidOperationException(SR.Format(SR.XmlSequenceMembers, "Order")); 1438throw new InvalidOperationException(SR.Format(SR.XmlChoiceIdentifierType, identifierName, memberName, type.GetElementType()!.FullName)); 1445throw new InvalidOperationException(SR.Format(SR.XmlChoiceIdentifierArrayType, identifierName, memberName, type.FullName)); 1451throw new InvalidOperationException(SR.Format(SR.XmlChoiceIdentifierTypeEnum, identifierName)); 1466throw new InvalidOperationException(SR.Format(SR.XmlChoiceIdentifierMemberMissing, choice.MemberName, accessorName)); 1483throw new InvalidOperationException(SR.Format(SR.XmlChoiceIdentifierMemberMissing, choice.MemberName, accessorName)); 1490throw new InvalidOperationException(SR.Format(SR.XmlChoiceIdentifierAmbiguous, choice.MemberName)); 1497throw new InvalidOperationException(SR.Format(SR.XmlChoiceIdentifierMemberMissing, choice.MemberName, accessorName)); 1580throw new InvalidOperationException(SR.XmlIllegalAttributesArrayAttribute); 1586throw new InvalidOperationException(SR.Format(SR.XmlIllegalAttrOrTextInterface, accessorName, accessor.TypeDesc.ArrayElementTypeDesc.FullName, nameof(IXmlSerializable))); 1590throw new InvalidOperationException(SR.Format(SR.XmlIllegalAttrOrText, accessorName, accessor.TypeDesc.ArrayElementTypeDesc.FullName)); 1627throw new InvalidOperationException(SR.XmlIllegalElementsArrayAttribute); 1637throw new InvalidOperationException(SR.Format(SR.XmlIllegalArrayTextAttribute, accessorName)); 1665throw new InvalidOperationException(SR.Format(SR.XmlInvalidNotNullable, typeModel.TypeDesc.BaseTypeDesc!.FullName, "XmlElement")); 1678throw new InvalidOperationException(SR.Format(SR.XmlSequenceMatch, "Order")); 1690throw new InvalidOperationException(SR.Format(SR.XmlIllegalAnyElement, arrayElementType.FullName)); 1701throw new InvalidOperationException(SR.Format(SR.XmlAnyElementDuplicate, accessorName, xmlAnyElement.Name, xmlAnyElement.Namespace ?? "null")); 1728throw new InvalidOperationException(SR.Format(SR.XmlSequenceMatch, "Order")); 1738throw new InvalidOperationException(SR.XmlIllegalArrayArrayAttribute); 1772throw new InvalidOperationException(SR.XmlIllegalAttribute); 1776if (a.XmlAnyElements.Count > 0) throw new InvalidOperationException(SR.Format(SR.XmlIllegalAnyElement, accessor.TypeDesc.FullName)); 1780if (a.XmlElements.Count > 0) throw new InvalidOperationException(SR.XmlIllegalAttribute); 1781if (a.XmlAttribute.Type != null) throw new InvalidOperationException(SR.Format(SR.XmlIllegalType, "XmlAttribute")); 1807throw new InvalidOperationException(SR.Format(SR.XmlIllegalType, "XmlText")); 1824throw new InvalidOperationException(SR.Format(SR.XmlIllegalType, "XmlElement")); 1838throw new InvalidOperationException(SR.Format(SR.XmlInvalidNotNullable, typeModel.TypeDesc.BaseTypeDesc!.FullName, "XmlElement")); 1851throw new InvalidOperationException(SR.Format(SR.XmlSequenceMatch, "Order")); 1862throw new InvalidOperationException(SR.XmlSoleXmlnsAttribute); 1866throw new InvalidOperationException(SR.Format(SR.XmlXmlnsInvalidType, accessorName, accessorType.FullName, typeof(System.Xml.Serialization.XmlSerializerNamespaces).FullName)); 1877throw new InvalidOperationException(SR.Format(SR.XmlIllegalAttrOrTextInterface, accessorName, accessor.TypeDesc.FullName, nameof(IXmlSerializable))); 1881throw new InvalidOperationException(SR.Format(SR.XmlIllegalAttrOrText, accessorName, accessor.TypeDesc)); 1906throw new InvalidOperationException(SR.Format(SR.XmlInvalidNotNullable, typeModel.TypeDesc.BaseTypeDesc!.FullName, "XmlElement")); 1919throw new InvalidOperationException(SR.Format(SR.XmlSequenceMatch, "Order")); 1931throw new InvalidOperationException(SR.Format(SR.XmlIllegalAnyElement, accessorType.FullName)); 1943throw new InvalidOperationException(SR.Format(SR.XmlAnyElementDuplicate, accessorName, xmlAnyElement.Name, xmlAnyElement.Namespace ?? "null")); 1968throw new InvalidOperationException(SR.Format(SR.XmlSequenceMatch, "Order")); 1982throw new InvalidOperationException(SR.Format(SR.XmlRpcLitArrayElement, accessor.Elements[0].Name)); 1985throw new InvalidOperationException(SR.Format(SR.XmlRpcLitXmlns, accessor.Name)); 2031throw new InvalidOperationException(SR.Format(SR.XmlChoiceMissingAnyValue, accessor.ChoiceIdentifier.Mapping!.TypeDesc!.FullName)); 2037throw new InvalidOperationException(SR.Format(SR.XmlChoiceMissingValue, accessor.ChoiceIdentifier.Mapping!.TypeDesc!.FullName, id, element.Name, element.Namespace)); 2053throw new InvalidOperationException(SR.XmlRpcLitAttributeAttributes); 2056throw new InvalidOperationException(SR.XmlRpcLitAttributes); 2062throw new InvalidOperationException(SR.XmlRpcLitElements); 2067throw new InvalidOperationException(SR.Format(SR.XmlRpcLitElementNamespace, "Namespace", xmlElement.Namespace)); 2071throw new InvalidOperationException(SR.Format(SR.XmlRpcLitElementNullable, "IsNullable", "true")); 2076throw new InvalidOperationException(SR.Format(SR.XmlRpcLitElementNamespace, "Namespace", a.XmlArray.Namespace)); 2093throw new InvalidOperationException(SR.Format(SR.XmlChoiceIdentifierMissing, nameof(XmlChoiceIdentifierAttribute), accessorName)); 2104throw new InvalidOperationException(SR.Format(SR.XmlChoiceIdentifierMissing, nameof(XmlChoiceIdentifierAttribute), accessorName)); 2119throw new InvalidOperationException(SR.Format(SR.XmlArrayItemAmbiguousTypes, accessorName, item.ElementName, items[i]!.ElementName, nameof(XmlElementAttribute), nameof(XmlChoiceIdentifierAttribute), accessorName)); 2142throw new InvalidOperationException(SR.Format(SR.XmlChoiceIdDuplicate, choiceMapping.TypeName, choiceId)); 2163throw new InvalidOperationException(SR.Format(SR.XmlInvalidDefaultValue, strValue, a.XmlDefaultValue.GetType().FullName)); 2196throw new InvalidOperationException(SR.Format(SR.XmlDuplicateElementName, existing.Name, existing.Namespace)); 2202throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorDetails, "Bad accessor type " + accessor.GetType().FullName)); 2204throw new InvalidOperationException(SR.Format(SR.XmlDuplicateAttributeName, existing.Name, existing.Namespace)); 2238throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorDetails, $"The XML attribute/element '{accessor.Namespace}{accessor.Name}' does not have an existing accessor to remove.")); 2260if (isQualified && form == XmlSchemaForm.Unqualified) throw new InvalidOperationException(SR.XmlInvalidFormUnqualified); 2267if (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)
71throw new InvalidOperationException(SR.Format(SR.XmlBadBaseElement, name.Name, name.Namespace, baseType.FullName)); 124throw new InvalidOperationException(SR.Format(SR.XmlBadBaseType, typeName.Name, typeName.Namespace, baseType.FullName)); 285throw new InvalidOperationException(SR.Format(SR.XmlElementHasNoName, parentType.Name, parentType.Namespace)); 365throw new InvalidOperationException(SR.Format(SR.XmlElementImportedTwice, element.Name, ns, mapping.GetType().Name, desiredMappingType.Name)); 434throw new InvalidOperationException(SR.XmlInternalError); 481if (!type.DerivedFrom.IsEmpty) throw new InvalidOperationException(SR.XmlMembersDeriveError); 544throw new InvalidOperationException(SR.Format(SR.XmlTypeUsedTwice, type.QualifiedName.Name, type.QualifiedName.Namespace)); 591throw new InvalidOperationException(SR.Format(SR.XmlIllegalOverride, type.Name, baseMember.Name, baseMember.TypeDesc!.FullName, structMapping.Members[i].TypeDesc!.FullName, declaringMapping!.TypeDesc!.FullName)); 993throw new InvalidOperationException(SR.Format(SR.XmlDuplicateElementInScope, element.Name, element.Namespace)); 997throw new InvalidOperationException(SR.Format(SR.XmlDuplicateElementInScope1, element.Name, element.Namespace)); 1614if (attribute.Name!.Length == 0) throw new InvalidOperationException(SR.XmlAttributeHasNoName); 1859throw new InvalidOperationException(SR.Format(SR.XmlMissingGroup, name.Name)); 1868throw new InvalidOperationException(SR.Format(SR.XmlMissingAttributeGroup, name.Name)); 1936throw new InvalidOperationException(SR.Format(SR.XmlInvalidEncoding, name)); 1940throw new InvalidOperationException(SR.Format(SR.XmlMissingDataType, name)); 1966throw new InvalidOperationException(SR.Format(SR.XmlMissingElement, name)); 1974throw 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)); 395throw new InvalidOperationException(SR.Format(SR.XmlSchemaIncludeLocation, this.GetType().Name, external.SchemaLocation)); 417throw new InvalidOperationException(MergeFailedMessage(o, dest, schema.TargetNamespace)); 696throw new InvalidOperationException(GetSchemaItem(source, null, message), exception); 712throw 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)); 1427if (!href.StartsWith('#')) throw new InvalidOperationException(SR.Format(SR.XmlMissingHref, href)); 1478throw new InvalidOperationException(SR.Format(SR.XmlInvalidHref, id)); 1547throw new InvalidOperationException(SR.Format(SR.XmlInvalidArrayRef, id, o.GetType().FullName, i.ToString(CultureInfo.InvariantCulture))); 1580if (arrayInfo.dimensions != 1) throw new InvalidOperationException(SR.Format(SR.XmlInvalidArrayDimentions, CurrentTag())); 2459if (choiceSource == null) throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorDetails, "Can not find " + member.ChoiceIdentifier.MemberName + " in the members mapping.")); 2826if (enumMethodName == null) throw new InvalidOperationException(SR.Format(SR.XmlMissingMethodEnum, mapping.TypeDesc!.Name)); 3070if (methodName == null) throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorMethod, derived.TypeDesc!.Name)); 3107if (methodName == null) throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorMethod, enumMapping.TypeDesc!.Name)); 3344throw new InvalidOperationException(SR.Format(SR.XmlSequenceHierarchy, structMapping.TypeDesc.FullName, mapping.Name, declaringMapping!.TypeDesc!.FullName, "Order")); 3822throw new InvalidOperationException(SR.XmlInternalError); 4085throw new InvalidOperationException(SR.XmlInternalError); 4635if (methodName == null) throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorMethod, element.Mapping.TypeDesc!.Name)); 4782if (methodName == null) throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorMethod, mapping.TypeDesc!.Name)); 4861throw new InvalidOperationException(SR.XmlInternalError); 4866throw new InvalidOperationException(SR.XmlInternalError); 4872if (choiceSource == null) throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorDetails, "need parent for the " + source));
System\Xml\Serialization\XmlSerializationReaderILGen.cs (12)
369if (choiceSource == null) throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorDetails, "Can not find " + member.ChoiceIdentifier.MemberName + " in the members mapping.")); 685if (enumMethodName == null) throw new InvalidOperationException(SR.Format(SR.XmlMissingMethodEnum, mapping.TypeDesc!.Name)); 1142if (methodName == null) throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorMethod, derived.TypeDesc!.Name)); 1197if (methodName == null) throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorMethod, enumMapping.TypeDesc!.Name)); 1568throw new InvalidOperationException(SR.Format(SR.XmlSequenceHierarchy, structMapping.TypeDesc.FullName, mapping.Name, declaringMapping!.TypeDesc!.FullName, "Order")); 2063throw new InvalidOperationException(SR.XmlInternalError); 2351throw new InvalidOperationException(SR.XmlInternalError); 2979if (methodName == null) throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorMethod, element.Mapping.TypeDesc!.Name)); 3128if (methodName == null) throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorMethod, mapping.TypeDesc!.Name)); 3246throw new InvalidOperationException(SR.XmlInternalError); 3251throw new InvalidOperationException(SR.XmlInternalError); 3257if (choiceSource == null) throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorDetails, "need parent for the " + source));
System\Xml\Serialization\XmlSerializationWriter.cs (30)
500if (_objectsInUse.ContainsKey(o)) throw new InvalidOperationException(SR.Format(SR.XmlCircularReference, o.GetType().FullName)); 546throw new InvalidOperationException(SR.Format(SR.XmlInvalidXmlns, alias)); 658if (!_objectsInUse.ContainsKey(o)) throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorDetails, "missing stack object of type " + o.GetType().FullName)); 783throw new InvalidOperationException(SR.XmlNoAttributeHere); 799throw new InvalidOperationException(SR.Format(SR.XmlElementNameMismatch, node.LocalName, node.NamespaceURI, name, ns)); 820if (typeof(IXmlSerializable).IsAssignableFrom(type)) return new InvalidOperationException(SR.Format(SR.XmlInvalidSerializable, type.FullName)); 822if (!typeDesc.IsStructLike) return new InvalidOperationException(SR.Format(SR.XmlInvalidUseOfType, type.FullName)); 823return new InvalidOperationException(SR.Format(SR.XmlUnxpectedType, type.FullName)); 829return new InvalidOperationException(SR.Format(SR.XmlChoiceMismatchChoiceException, elementName, value, enumValue)); 834return new InvalidOperationException(SR.Format(SR.XmlUnknownAnyElement, name, ns)); 839return new InvalidOperationException(SR.Format(SR.XmlInvalidChoiceIdentifierValue, type, identifier)); 845return new InvalidOperationException(SR.Format(SR.XmlChoiceIdentifierMismatch, value, identifier, name, ns)); 850return new InvalidOperationException(SR.Format(SR.XmlUnknownConstant, value, typeName)); 860return new InvalidOperationException(SR.Format(SR.XmlIllegalAnyElement, type.FullName)); 929if (attr == null) throw new InvalidOperationException(SR.XmlNeedAttributeHere); 1284if (!typeof(IEnumerable).IsAssignableFrom(type)) throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorDetails, "not array like type " + type.FullName)); 1448throw new InvalidOperationException(SR.Format(SR.XmlDuplicateNs, prefix, ns)); 1797throw new InvalidOperationException(SR.Format(SR.XmlSerializerUnsupportedType, memberInfos[0])); 2408if (methodName == null) throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorMethod, mapping.TypeDesc!.Name) + Environment.StackTrace); 2456if (defaultValue!.GetType() != typeof(string)) throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorDetails, name + " has invalid default type " + defaultValue.GetType().Name)); 2759if (enumSource == null) throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorDetails, "Can not find " + member.ChoiceIdentifier.MemberName + " in the members mapping.")); 2987if (methodName == null) throw new InvalidOperationException("derived from " + mapping.TypeDesc!.FullName + ", " + SR.Format(SR.XmlInternalErrorMethod, derived.TypeDesc.Name) + Environment.StackTrace); 3026if (methodName == null) throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorMethod, mapping.TypeDesc.Name) + Environment.StackTrace); 3473throw new InvalidOperationException(SR.XmlInternalError); 3904throw new InvalidOperationException(SR.XmlInternalError); 4113if (methodName == null) throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorMethod, structMapping.TypeDesc!.Name) + Environment.StackTrace); 4172throw new InvalidOperationException(SR.XmlInternalError); 4377throw new InvalidOperationException(SR.Format(SR.XmlUnsupportedDefaultType, type.FullName)); 4486throw new InvalidOperationException(SR.Format(SR.XmlChoiceMissingAnyValue, choiceMapping.TypeDesc!.FullName)); 4489throw new InvalidOperationException(SR.Format(SR.XmlChoiceMissingValue, choiceMapping.TypeDesc!.FullName, $"{element.Namespace}:{element.Name}", element.Name, element.Namespace));
System\Xml\Serialization\XmlSerializationWriterILGen.cs (11)
127if (methodName == null) throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorMethod, mapping.TypeDesc!.Name)); 201if (defaultValue!.GetType() != typeof(string)) throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorDetails, name + " has invalid default type " + defaultValue.GetType().Name)); 519if (enumSource == null) throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorDetails, "Can not find " + member.ChoiceIdentifier.MemberName + " in the members mapping.")); 748if (methodName == null) throw new InvalidOperationException("derived from " + mapping.TypeDesc!.FullName + ", " + SR.Format(SR.XmlInternalErrorMethod, derived.TypeDesc.Name)); 799if (methodName == null) throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorMethod, mapping.TypeDesc.Name)); 1375throw new InvalidOperationException(SR.XmlInternalError); 1891throw new InvalidOperationException(SR.XmlInternalError); 1994if (methodName == null) throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorMethod, structMapping.TypeDesc!.Name)); 2060throw new InvalidOperationException(SR.XmlInternalError); 2277throw new InvalidOperationException(SR.Format(SR.XmlChoiceMissingAnyValue, choiceMapping.TypeDesc!.FullName)); 2280throw new InvalidOperationException(SR.Format(SR.XmlChoiceMissingValue, choiceMapping.TypeDesc!.FullName, $"{element.Namespace}:{element.Name}", element.Name, element.Namespace));
System\Xml\Serialization\XmlSerializer.cs (9)
393throw new InvalidOperationException(SR.Format(SR.XmlInvalidEncodingNotEncoded1, encodingStyle)); 416throw new InvalidOperationException(SR.XmlGenError, e); 493throw new InvalidOperationException(SR.Format(SR.XmlInvalidEncodingNotEncoded1, encodingStyle)); 519throw new InvalidOperationException(SR.Format(SR.XmlSerializeErrorDetails, lineInfo.LineNumber.ToString(CultureInfo.InvariantCulture), lineInfo.LinePosition.ToString(CultureInfo.InvariantCulture)), e); 523throw new InvalidOperationException(SR.XmlSerializeError, e); 675throw new InvalidOperationException(SR.XmlMelformMapping); 684throw new InvalidOperationException(SR.Format(SR.XmlPregenTypeDynamic, type.FullName)); 931throw new InvalidOperationException(SR.Format(SR.XmlUnxpectedType, _primitiveType!.FullName)); 1013throw 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)
112throw new InvalidOperationException(SR.InvalidOperation_AddNullProperty); 116throw new InvalidOperationException(SR.InvalidOperation_AddPropertyDifferentContext); 121throw 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)
69get { throw new InvalidOperationException(); } 138throw new InvalidOperationException(SR.InvalidOperation_EnumLitValueNotFound); 143throw new InvalidOperationException(SR.InvalidOperation_EnumLitValueNotFound);
System.Reflection.Emit (33)
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)
691throw new InvalidOperationException(SR.InvalidOperation_NotAVarArgCallingConvention); 754throw new InvalidOperationException(SR.Argument_BadExceptionCodeGen); 777throw new InvalidOperationException(SR.InvalidOperation_UnmatchingSymScope);
System\Reflection\Emit\LocalBuilderImpl.cs (1)
36throw new InvalidOperationException(SR.InvalidOperation_TypeHasBeenCreated);
System\Reflection\Emit\MethodBuilderImpl.cs (6)
112private void ThrowIfGeneric() { if (IsGenericMethod && !IsGenericMethodDefinition) throw new InvalidOperationException(); } 117throw new InvalidOperationException(SR.InvalidOperation_GenericParametersAlreadySet); 151throw new InvalidOperationException(); 158throw new InvalidOperationException(SR.InvalidOperation_ShouldNotHaveMethodBody); 163throw new InvalidOperationException(SR.InvalidOperation_ShouldNotHaveMethodBody); 276public override MethodInfo GetGenericMethodDefinition() => !IsGenericMethod ? throw new InvalidOperationException() : this;
System\Reflection\Emit\ModuleBuilderImpl.cs (6)
1090throw new InvalidOperationException(SR.InvalidOperation_TokenNotPopulated); 1202throw new InvalidOperationException(SR.InvalidOperation_NotAVarArgCallingConvention); 1241throw new InvalidOperationException(SR.InvalidOperation_GlobalsHaveBeenCreated); 1261throw new InvalidOperationException(SR.InvalidOperation_GlobalsHaveBeenCreated); 1280throw new InvalidOperationException(SR.InvalidOperation_GlobalsHaveBeenCreated); 1316throw 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 (10)
139throw new InvalidOperationException(SR.InvalidOperation_BadTypeAttributesNotAbstract); 146throw new InvalidOperationException(SR.Format(SR.InvalidOperation_BadMethodBody, method.Name)); 156throw new InvalidOperationException(SR.InvalidOperation_TypeHasBeenCreated); 165throw new InvalidOperationException(SR.InvalidOperation_ConstructorNotAllowedOnInterface); 191throw new InvalidOperationException(SR.InvalidOperation_ConstructorNotAllowedOnInterface); 264throw new InvalidOperationException(); 571throw new InvalidOperationException(SR.InvalidOperation_BadInterfaceNotAbstract); 595throw new InvalidOperationException(); 615throw new InvalidOperationException(SR.InvalidOperation_NoUnderlyingTypeOnEnum); 1320throw new InvalidOperationException(SR.Argument_GenericParameter);
System.Reflection.Metadata (25)
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 (7)
366throw new InvalidOperationException(SR.Format(SR.InvalidOperation_MaxNodesExceeded, limit)); 377throw new InvalidOperationException(SR.InvalidOperation_NotGenericType); 388throw new InvalidOperationException(SR.InvalidOperation_NotNestedType); 399throw new InvalidOperationException(SR.InvalidOperation_NoElement); 410throw new InvalidOperationException(SR.Argument_HasToBeArrayClass); 421throw new InvalidOperationException(SR.InvalidOperation_NestedTypeNamespace); 445throw new InvalidOperationException(SR.Format(SR.Arg_NotSimpleTypeName, fullName));
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)
361throw new InvalidOperationException(SR.PEImageDoesNotHaveMetadata); 829throw 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)); 161throw new InvalidOperationException(SR.OutOfBoundsWrite); 215throw new InvalidOperationException(SR.Format(SR.MetadataTableNotSorted, tableIndex)); 221throw 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)
209public sealed override object[] GetCustomAttributes(bool inherit) => throw new InvalidOperationException(SR.Arg_ReflectionOnlyCA); 210public sealed override object[] GetCustomAttributes(Type attributeType, bool inherit) => throw new InvalidOperationException(SR.Arg_ReflectionOnlyCA); 211public 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 106throw 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); 95throw new InvalidOperationException(SR.Format(SR.Arg_NotGenericTypeDefinition, this)); 226public sealed override GenericParameterAttributes GenericParameterAttributes => throw new InvalidOperationException(SR.Arg_NotGenericParameter); 227public sealed override int GenericParameterPosition => throw new InvalidOperationException(SR.Arg_NotGenericParameter); 228public sealed override Type[] GetGenericParameterConstraints() => throw new InvalidOperationException(SR.Arg_NotGenericParameter); 229public sealed override MethodBase DeclaringMethod => throw new InvalidOperationException(SR.Arg_NotGenericParameter); 230public sealed override Type GetFunctionPointerReturnType() => throw new InvalidOperationException(SR.InvalidOperation_NotFunctionPointer); 231public 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)
490throw new InvalidOperationException(SR.NoMetadataTokenAvailable);
System.Resources.Extensions (19)
src\libraries\Common\src\System\Resources\ResourceWriter.cs (6)
86throw new InvalidOperationException(SR.InvalidOperation_ResourceWriterSaved); 103throw new InvalidOperationException(SR.InvalidOperation_ResourceWriterSaved); 129throw new InvalidOperationException(SR.InvalidOperation_ResourceWriterSaved); 166throw new InvalidOperationException(SR.InvalidOperation_ResourceWriterSaved); 177throw new InvalidOperationException(SR.InvalidOperation_ResourceWriterSaved); 246throw new InvalidOperationException(SR.InvalidOperation_ResourceWriterSaved);
src\libraries\System.Private.CoreLib\src\System\Resources\ResourceReader.cs (13)
239throw new InvalidOperationException(SR.ResourceReaderIsClosed); 487throw new InvalidOperationException(SR.Format(SR.InvalidOperation_ResourceNotString_Type, FindType(typeIndex).FullName)); 500throw new InvalidOperationException(SR.Format(SR.InvalidOperation_ResourceNotString_Type, typeString)); 1089if (_currentName == ENUM_DONE) throw new InvalidOperationException(SR.InvalidOperation_EnumEnded); 1090if (!_currentIsValid) throw new InvalidOperationException(SR.InvalidOperation_EnumNotStarted); 1091if (_reader._resCache == null) throw new InvalidOperationException(SR.ResourceReaderIsClosed); 1106if (_currentName == ENUM_DONE) throw new InvalidOperationException(SR.InvalidOperation_EnumEnded); 1107if (!_currentIsValid) throw new InvalidOperationException(SR.InvalidOperation_EnumNotStarted); 1108if (_reader._resCache == null) throw new InvalidOperationException(SR.ResourceReaderIsClosed); 1143if (_currentName == ENUM_DONE) throw new InvalidOperationException(SR.InvalidOperation_EnumEnded); 1144if (!_currentIsValid) throw new InvalidOperationException(SR.InvalidOperation_EnumNotStarted); 1145if (_reader._resCache == null) throw new InvalidOperationException(SR.ResourceReaderIsClosed); 1157if (_reader._resCache == null) throw new InvalidOperationException(SR.ResourceReaderIsClosed);
System.Resources.Writer (7)
src\libraries\Common\src\System\Resources\ResourceWriter.cs (6)
86throw new InvalidOperationException(SR.InvalidOperation_ResourceWriterSaved); 103throw new InvalidOperationException(SR.InvalidOperation_ResourceWriterSaved); 129throw new InvalidOperationException(SR.InvalidOperation_ResourceWriterSaved); 166throw new InvalidOperationException(SR.InvalidOperation_ResourceWriterSaved); 177throw new InvalidOperationException(SR.InvalidOperation_ResourceWriterSaved); 246throw 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); 228throw new InvalidOperationException(SR.Method_already_invoked);
System\Runtime\Caching\ObjectCache.cs (1)
35throw new InvalidOperationException(SR.Property_already_set);
System.Runtime.InteropServices (4)
System\Runtime\InteropServices\ComAwareEventInfo.cs (2)
107throw new InvalidOperationException(SR.InvalidOperation_NoComEventInterfaceAttribute); 123throw new InvalidOperationException(SR.InvalidOperation_NoDispIdAttribute);
System\Runtime\InteropServices\HandleCollector.cs (2)
60throw new InvalidOperationException(SR.InvalidOperation_HCCountOverflow); 96throw new InvalidOperationException(SR.InvalidOperation_HCCountOverflow);
System.Runtime.Serialization.Schema (11)
System\Runtime\Serialization\Schema\CodeExporter.cs (7)
81throw ExceptionUtil.ThrowHelperError(new InvalidOperationException(SR.Format(SR.CLRNamespaceMappedMultipleTimes, currentDataContractNamespace, dataContractNamespace, clrNamespace))); 551throw ExceptionUtil.ThrowHelperError(new InvalidOperationException(SR.Format(SR.ReferencedTypeDoesNotMatch, type.AssemblyQualifiedName, dataContract.XmlName.Name, dataContract.XmlName.Namespace))); 569throw ExceptionUtil.ThrowHelperError(new InvalidOperationException(SR.Format(SR.ReferencedTypeDoesNotMatch, type.AssemblyQualifiedName, dataContract.XmlName.Name, dataContract.XmlName.Namespace))); 579throw ExceptionUtil.ThrowHelperError(new InvalidOperationException(SR.Format(SR.ReferencedTypeDoesNotMatch, 1054throw ExceptionUtil.ThrowHelperError(new InvalidOperationException(SR.Format(SR.CannotDeriveFromSealedReferenceType, dataContract.XmlName.Name, dataContract.XmlName.Namespace, GetClrTypeFullName(baseType)))); 1201throw ExceptionUtil.ThrowHelperError(new InvalidOperationException( 1229throw ExceptionUtil.ThrowHelperError(new InvalidOperationException(SR.Format(SR.ReferencedBaseTypeDoesNotExist,
System\Runtime\Serialization\Schema\ContractCodeDomInfo.cs (2)
29throw ExceptionUtil.ThrowHelperError(new InvalidOperationException(SR.Format(SR.CannotSetNamespaceForReferencedType, TypeReference?.BaseType))); 50throw ExceptionUtil.ThrowHelperError(new InvalidOperationException(SR.Format(SR.CannotSetMembersForReferencedType, TypeReference?.BaseType)));
System\Runtime\Serialization\Schema\XsdDataContractImporter.cs (2)
255throw ExceptionUtil.ThrowHelperError(new InvalidOperationException(SR.Format(SR.TypeHasNotBeenImported, typeName.Name, typeName.Namespace))); 276throw ExceptionUtil.ThrowHelperError(new InvalidOperationException(SR.Format(SR.TypeHasNotBeenImported, typeName.Name, typeName.Namespace)));
System.Security.Claims (3)
System\Security\Claims\ClaimsIdentity.cs (3)
177throw new InvalidOperationException(SR.InvalidOperationException_ActorGraphCircular); 340throw new InvalidOperationException(SR.InvalidOperationException_ActorGraphCircular); 549throw new InvalidOperationException(SR.Format(SR.InvalidOperation_ClaimCannotBeRemoved, claim));
System.Security.Cryptography (68)
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\MLDsaPrivateKeyAsn.xml.cs (1)
26throw new InvalidOperationException($"Tag '{tag}' is in use by both '{existing}' and '{fieldName}'");
src\libraries\Common\src\System\Security\Cryptography\Asn1\MLKemPrivateKeyAsn.xml.cs (1)
26throw 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\Asn1\Pkcs7\CertificateChoiceAsn.xml.cs (1)
28throw new InvalidOperationException($"Tag '{tag}' is in use by both '{existing}' and '{fieldName}'");
src\libraries\Common\src\System\Security\Cryptography\Asn1\Pkcs7\SignerIdentifierAsn.xml.cs (1)
25throw new InvalidOperationException($"Tag '{tag}' is in use by both '{existing}' and '{fieldName}'");
src\libraries\Common\src\System\Security\Cryptography\CryptographicAttributeObject.cs (1)
45throw new InvalidOperationException(SR.Format(SR.InvalidOperation_WrongOidInAsnCollection, oid.Value, asn.Oid.Value));
src\libraries\Common\src\System\Security\Cryptography\CryptographicAttributeObjectCollection.cs (1)
54throw new InvalidOperationException(SR.InvalidOperation_DuplicateItemNotAllowed);
src\libraries\Common\src\System\Security\Cryptography\ECOpenSsl.ImportExport.cs (1)
271throw new InvalidOperationException(SR.Cryptography_InvalidKeySize);
src\libraries\Common\src\System\Security\Cryptography\Pkcs\Pkcs12Builder.cs (8)
51throw new InvalidOperationException(SR.Cryptography_Pkcs12_PfxIsSealed); 95throw new InvalidOperationException(SR.Cryptography_Pkcs12_PfxIsSealed); 119throw new InvalidOperationException(SR.Cryptography_Pkcs12_PfxIsSealed); 130throw new InvalidOperationException(SR.Cryptography_Pkcs12_PfxMustBeSealed); 156throw new InvalidOperationException(SR.Cryptography_Pkcs12_PfxIsSealed); 185throw new InvalidOperationException(); 307throw new InvalidOperationException(SR.Cryptography_Pkcs12_PfxIsSealed); 353throw new InvalidOperationException(SR.Cryptography_Pkcs12_PfxMustBeSealed);
src\libraries\Common\src\System\Security\Cryptography\Pkcs\Pkcs12CertBag.cs (1)
84throw new InvalidOperationException(SR.Cryptography_Pkcs12_CertBagNotX509);
src\libraries\Common\src\System\Security\Cryptography\Pkcs\Pkcs12Info.cs (1)
41throw new InvalidOperationException(
src\libraries\Common\src\System\Security\Cryptography\Pkcs\Pkcs12SafeContents.cs (8)
68throw new InvalidOperationException(SR.Cryptography_Pkcs12_SafeContentsIsReadOnly); 80throw new InvalidOperationException(SR.Cryptography_Pkcs12_SafeContentsIsReadOnly); 92throw new InvalidOperationException(SR.Cryptography_Pkcs12_SafeContentsIsReadOnly); 107throw new InvalidOperationException(SR.Cryptography_Pkcs12_SafeContentsIsReadOnly); 134throw new InvalidOperationException(SR.Cryptography_Pkcs12_SafeContentsIsReadOnly); 162throw new InvalidOperationException(SR.Cryptography_Pkcs12_SafeContentsIsReadOnly); 208throw new InvalidOperationException( 269throw new InvalidOperationException(SR.Cryptography_Pkcs12_SafeContentsIsEncrypted);
src\libraries\Common\src\System\Security\Cryptography\RsaPaddingProcessor.cs (1)
639throw new InvalidOperationException();
src\libraries\Common\src\System\Security\Cryptography\X509Certificates\Pkcs12LoaderLimits.cs (1)
146throw new InvalidOperationException(SR.Cryptography_X509_PKCS12_LimitsReadOnly);
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)
68throw new InvalidOperationException(SR.Cryptography_OpenInvalidHandle);
System\Security\Cryptography\Shake128.cs (1)
489throw new InvalidOperationException(SR.InvalidOperation_AlreadyReading);
System\Security\Cryptography\Shake256.cs (1)
489throw new InvalidOperationException(SR.InvalidOperation_AlreadyReading);
System\Security\Cryptography\SymmetricAlgorithm.cs (1)
369throw 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 (9)
400throw new InvalidOperationException(SR.Cryptography_CertReq_NoKeyProvided); 464throw new InvalidOperationException(SR.Cryptography_CertReq_NoHashAlgorithmProvided); 481throw new InvalidOperationException( 487throw new InvalidOperationException( 493throw new InvalidOperationException(SR.Cryptography_CertReq_ExtensionRequestInOtherAttributes); 636throw new InvalidOperationException(SR.Cryptography_CertReq_NoKeyProvided); 854throw new InvalidOperationException(SR.Cryptography_CertReq_RSAPaddingRequired); 976throw new InvalidOperationException(SR.Cryptography_CertReq_NoHashAlgorithmProvided); 1024throw 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\X500RelativeDistinguishedName.cs (2)
93throw new InvalidOperationException(SR.Cryptography_X500_MultiValued); 119throw new InvalidOperationException(SR.Cryptography_X500_MultiValued);
System\Security\Cryptography\X509Certificates\X509Certificate2.cs (4)
763throw new InvalidOperationException(SR.Cryptography_Cert_AlreadyHasPrivateKey); 854throw new InvalidOperationException(SR.Cryptography_Cert_AlreadyHasPrivateKey); 955throw new InvalidOperationException(SR.Cryptography_Cert_AlreadyHasPrivateKey); 1047throw 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 (37)
System\Security\Cryptography\Cose\CoseHeaderMap.cs (1)
241throw new InvalidOperationException(SR.CoseHeaderMapDecodedMapIsReadOnlyCannotSetValue);
System\Security\Cryptography\Cose\CoseHeaderValue.cs (8)
137throw new InvalidOperationException(SR.CoseHeaderValueErrorWhileDecoding, ex); 142throw new InvalidOperationException(SR.Format(SR.CoseHeaderMapCborEncodedValueNotValid)); 164throw new InvalidOperationException(SR.CoseHeaderValueErrorWhileDecoding, ex); 169throw new InvalidOperationException(SR.Format(SR.CoseHeaderMapCborEncodedValueNotValid)); 191throw new InvalidOperationException(SR.CoseHeaderValueErrorWhileDecoding, ex); 196throw new InvalidOperationException(SR.Format(SR.CoseHeaderMapCborEncodedValueNotValid)); 223throw new InvalidOperationException(SR.CoseHeaderValueErrorWhileDecoding, ex); 228throw new InvalidOperationException(SR.Format(SR.CoseHeaderMapCborEncodedValueNotValid));
System\Security\Cryptography\Cose\CoseMultiSignMessage.cs (7)
575throw new InvalidOperationException(SR.Sign1SignHeaderDuplicateLabels); 580throw new InvalidOperationException(SR.MultiSignMessageMustCarryAtLeastOneSignature); 609throw new InvalidOperationException(SR.Sign1SignHeaderDuplicateLabels); 671throw new InvalidOperationException(SR.ContentWasDetached); 724throw new InvalidOperationException(SR.ContentWasEmbedded); 757throw new InvalidOperationException(SR.ContentWasEmbedded); 833throw new InvalidOperationException(SR.ContentWasEmbedded);
System\Security\Cryptography\Cose\CoseSign1Message.cs (11)
391throw new InvalidOperationException(SR.ContentWasDetached); 434throw new InvalidOperationException(SR.ContentWasDetached); 477throw new InvalidOperationException(SR.ContentWasDetached); 519throw new InvalidOperationException(SR.ContentWasEmbedded); 600throw new InvalidOperationException(SR.ContentWasEmbedded); 643throw new InvalidOperationException(SR.ContentWasEmbedded); 703throw new InvalidOperationException(SR.ContentWasEmbedded); 765throw new InvalidOperationException(SR.ContentWasEmbedded); 870throw new InvalidOperationException(SR.ContentWasEmbedded); 932throw new InvalidOperationException(SR.ContentWasEmbedded); 1006throw new InvalidOperationException(SR.Sign1SignHeaderDuplicateLabels);
System\Security\Cryptography\Cose\CoseSignature.cs (10)
106throw new InvalidOperationException(SR.ContentWasDetached); 149throw new InvalidOperationException(SR.ContentWasDetached); 189throw new InvalidOperationException(SR.ContentWasDetached); 235throw new InvalidOperationException(SR.ContentWasEmbedded); 316throw new InvalidOperationException(SR.ContentWasEmbedded); 360throw new InvalidOperationException(SR.ContentWasEmbedded); 421throw new InvalidOperationException(SR.ContentWasEmbedded); 483throw new InvalidOperationException(SR.ContentWasEmbedded); 544throw new InvalidOperationException(SR.ContentWasEmbedded); 608throw new InvalidOperationException(SR.ContentWasEmbedded);
System.Security.Cryptography.Pkcs (41)
Internal\Cryptography\Pal\AnyOS\ManagedPal.KeyAgree.cs (2)
45throw new InvalidOperationException(SR.Cryptography_Cms_Key_Agree_Date_Not_Available); 70throw new InvalidOperationException(SR.Cryptography_Cms_Key_Agree_Date_Not_Available);
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\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\Asn1\Pkcs7\CertificateChoiceAsn.xml.cs (1)
28throw new InvalidOperationException($"Tag '{tag}' is in use by both '{existing}' and '{fieldName}'");
src\libraries\Common\src\System\Security\Cryptography\Asn1\Pkcs7\SignerIdentifierAsn.xml.cs (1)
25throw new InvalidOperationException($"Tag '{tag}' is in use by both '{existing}' and '{fieldName}'");
src\libraries\Common\src\System\Security\Cryptography\CryptographicAttributeObject.cs (1)
45throw new InvalidOperationException(SR.Format(SR.InvalidOperation_WrongOidInAsnCollection, oid.Value, asn.Oid.Value));
src\libraries\Common\src\System\Security\Cryptography\CryptographicAttributeObjectCollection.cs (1)
54throw new InvalidOperationException(SR.InvalidOperation_DuplicateItemNotAllowed);
src\libraries\Common\src\System\Security\Cryptography\Pkcs\Pkcs12Builder.cs (8)
51throw new InvalidOperationException(SR.Cryptography_Pkcs12_PfxIsSealed); 95throw new InvalidOperationException(SR.Cryptography_Pkcs12_PfxIsSealed); 119throw new InvalidOperationException(SR.Cryptography_Pkcs12_PfxIsSealed); 130throw new InvalidOperationException(SR.Cryptography_Pkcs12_PfxMustBeSealed); 156throw new InvalidOperationException(SR.Cryptography_Pkcs12_PfxIsSealed); 185throw new InvalidOperationException(); 307throw new InvalidOperationException(SR.Cryptography_Pkcs12_PfxIsSealed); 353throw new InvalidOperationException(SR.Cryptography_Pkcs12_PfxMustBeSealed);
src\libraries\Common\src\System\Security\Cryptography\Pkcs\Pkcs12CertBag.cs (1)
84throw new InvalidOperationException(SR.Cryptography_Pkcs12_CertBagNotX509);
src\libraries\Common\src\System\Security\Cryptography\Pkcs\Pkcs12Info.cs (1)
41throw new InvalidOperationException(
src\libraries\Common\src\System\Security\Cryptography\Pkcs\Pkcs12SafeContents.cs (8)
68throw new InvalidOperationException(SR.Cryptography_Pkcs12_SafeContentsIsReadOnly); 80throw new InvalidOperationException(SR.Cryptography_Pkcs12_SafeContentsIsReadOnly); 92throw new InvalidOperationException(SR.Cryptography_Pkcs12_SafeContentsIsReadOnly); 107throw new InvalidOperationException(SR.Cryptography_Pkcs12_SafeContentsIsReadOnly); 134throw new InvalidOperationException(SR.Cryptography_Pkcs12_SafeContentsIsReadOnly); 162throw new InvalidOperationException(SR.Cryptography_Pkcs12_SafeContentsIsReadOnly); 208throw new InvalidOperationException( 269throw new InvalidOperationException(SR.Cryptography_Pkcs12_SafeContentsIsEncrypted);
System\Security\Cryptography\Pkcs\Asn1\KeyAgreeRecipientIdentifierAsn.xml.cs (1)
25throw new InvalidOperationException($"Tag '{tag}' is in use by both '{existing}' and '{fieldName}'");
System\Security\Cryptography\Pkcs\Asn1\OriginatorIdentifierOrKeyAsn.xml.cs (1)
26throw new InvalidOperationException($"Tag '{tag}' is in use by both '{existing}' and '{fieldName}'");
System\Security\Cryptography\Pkcs\Asn1\RecipientIdentifierAsn.xml.cs (1)
25throw new InvalidOperationException($"Tag '{tag}' is in use by both '{existing}' and '{fieldName}'");
System\Security\Cryptography\Pkcs\Asn1\RecipientInfoAsn.xml.cs (1)
25throw new InvalidOperationException($"Tag '{tag}' is in use by both '{existing}' and '{fieldName}'");
System\Security\Cryptography\Pkcs\Asn1\SignedAttributesSet.xml.cs (1)
25throw new InvalidOperationException($"Tag '{tag}' is in use by both '{existing}' and '{fieldName}'");
System\Security\Cryptography\Pkcs\EnvelopedCms.cs (4)
77throw new InvalidOperationException(); 115throw new InvalidOperationException(SR.Cryptography_Cms_MessageNotEncrypted); 273throw new InvalidOperationException(SR.Cryptography_Cms_MessageNotEncrypted); 286throw new InvalidOperationException();
System\Security\Cryptography\Pkcs\SignedCms.cs (5)
120throw new InvalidOperationException(SR.Cryptography_Cms_MessageNotSigned); 332throw new InvalidOperationException(SR.Cryptography_Cms_NoSignerCertSilent); 392throw new InvalidOperationException(SR.Cryptography_Cms_MessageNotSigned); 606throw new InvalidOperationException(SR.Cryptography_Cms_MessageNotSigned); 641throw new InvalidOperationException(SR.Cryptography_Cms_MessageNotSigned);
System.ServiceModel.Federation (14)
System\IdentityModel\Security\WrapperSecurityCommunicationObject.cs (1)
149return new InvalidOperationException(SR.Format(SR.CommunicationObjectCannotBeUsed, GetCommunicationObjectType().ToString(), State.ToString()));
System\Runtime\OperationWithTimeoutAsyncResult.cs (6)
132throw new InvalidOperationException(SR.Format(SR.AsyncResultCompletedTwice, GetType())); 209throw new InvalidOperationException(InternalSR.InvalidNullAsyncResult); 306throw new InvalidOperationException(InternalSR.InvalidNullAsyncResult); 339throw new InvalidOperationException(InternalSR.InvalidAsyncResultImplementation(result.GetType())); 351throw new InvalidOperationException(message); 371throw new InvalidOperationException(InternalSR.AsyncResultAlreadyEnded);
System\ServiceModel\Federation\WSTrustChannel.cs (1)
32throw new InvalidOperationException(SR.Format(SR.IRequestChannelMustBeCreated, requestChannel.State));
System\ServiceModel\Federation\WSTrustUtilities.cs (6)
53throw new InvalidOperationException(SR.BearerKeyShouldNotIincludeAProofToken); 64throw new InvalidOperationException(SR.RSTRProofTokenShouldNotHaveAComputedKeyAlgorithmOrIssuerEntropy); 73throw new InvalidOperationException(SR.ComputedKeyProofTokensAreOnlySupportedWithSymmetricKeyTypes); 86throw new InvalidOperationException(SR.ComputedKeyProofTokensRequireIssuerToSupplyKeyMaterialViaEntropy); 90throw new InvalidOperationException(SR.ComputedKeyProofTokensRequireRequesterToSupplyKeyMaterialViaEntropy); 101throw new InvalidOperationException(SR.NoKeySizeProvided);
System.ServiceModel.NetFramingBase (17)
System\ServiceModel\Channels\FramingChannels.cs (1)
78return ValueTask.FromException(new InvalidOperationException());
System\ServiceModel\Channels\FramingDecoders.cs (8)
37throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SR.FramingValueNotAvailable)); 58throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SR.FramingValueNotAvailable)); 113throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SR.FramingValueNotAvailable)); 246throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SR.FramingValueNotAvailable)); 495throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SR.FramingValueNotAvailable)); 649throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SR.FramingValueNotAvailable)); 662throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SR.FramingValueNotAvailable)); 816throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SR.FramingValueNotAvailable));
System\ServiceModel\Channels\NetFramingTransportChannelFactory.cs (2)
35throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SR.MultipleMebesInParameters)); 76throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SR.MultipleStreamUpgradeProvidersInParameters));
System\ServiceModel\Channels\SslStreamSecurityUpgradeProvider.cs (2)
187throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SR.Format( 293throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SR.Format(SR.ClientCredentialsUnableToCreateLocalTokenProvider, clientCertRequirement)));
System\ServiceModel\Channels\StreamSecurityUpgradeInitiatorBase.cs (1)
39throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SR.OperationInvalidBeforeSecurityNegotiation));
System\ServiceModel\Channels\TransportChannelFactory.cs (1)
32throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SR.MultipleMebesInParameters));
System\ServiceModel\Channels\TransportDuplexSessionChannel.cs (1)
526throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SR.SendCannotBeCalledAfterCloseOutputSession));
System\ServiceModel\Channels\TransportSecurityHelpers.cs (1)
92throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SR.Format(
System.ServiceModel.Primitives.Tests (9)
Channels\CommunicationObjectTest.cs (4)
312throw new InvalidOperationException(exceptionMessage); 337throw new InvalidOperationException(exceptionMessage); 364throw new InvalidOperationException(exceptionMessage); 391throw new InvalidOperationException(exceptionMessage);
Channels\CustomChannelTest.cs (4)
229throw new InvalidOperationException(expectedExceptionMessage); 280throw new InvalidOperationException(expectedExceptionMessage); 449InvalidOperationException thrownException = new InvalidOperationException("test threw this"); 696InvalidOperationException thrownException = new InvalidOperationException("ui initialization failed");
ServiceModel\ThrowingOnCloseBindingElement.cs (1)
157throw new InvalidOperationException();
System.ServiceModel.Syndication (11)
System\ServiceModel\Syndication\Atom10FeedFormatter.cs (1)
1079throw new InvalidOperationException(SR.FeedFormatterDoesNotHaveFeed);
System\ServiceModel\Syndication\Atom10ItemFormatter.cs (1)
117throw new InvalidOperationException(SR.ItemFormatterDoesNotHaveItem);
System\ServiceModel\Syndication\AtomPub10CategoriesDocumentFormatter.cs (2)
79throw new InvalidOperationException(SR.DocumentFormatterDoesNotHaveDocument); 103throw new InvalidOperationException(SR.DocumentFormatterDoesNotHaveDocument);
System\ServiceModel\Syndication\AtomPub10ServiceDocumentFormatter.cs (2)
68throw new InvalidOperationException(SR.DocumentFormatterDoesNotHaveDocument); 93throw new InvalidOperationException(SR.DocumentFormatterDoesNotHaveDocument);
System\ServiceModel\Syndication\Rss20FeedFormatter.cs (1)
810throw new InvalidOperationException(SR.FeedFormatterDoesNotHaveFeed);
System\ServiceModel\Syndication\Rss20ItemFormatter.cs (1)
140throw new InvalidOperationException(SR.ItemFormatterDoesNotHaveItem);
System\ServiceModel\Syndication\SyndicationFeed.cs (1)
101throw new InvalidOperationException(SR.UnbufferedItemsCannotBeCloned);
System\ServiceModel\Syndication\SyndicationFeedFormatter.cs (1)
465throw new InvalidOperationException(errorMsg);
System\ServiceModel\XmlBuffer.cs (1)
109private static InvalidOperationException CreateInvalidStateException() => new InvalidOperationException(SR.XmlBufferInInvalidState);
System.ServiceModel.UnixDomainSocket (1)
System\ServiceModel\UnixDomainSocketTransportSecurity.cs (1)
99throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SR.Format(
System.Text.Encoding.CodePages (1)
System\Text\BaseCodePageEncoding.cs (1)
240throw new InvalidOperationException();
System.Text.Json (104)
System\Text\Json\Document\JsonElement.cs (1)
1708throw new InvalidOperationException();
System\Text\Json\Nodes\JsonArray.cs (1)
199_ => throw new InvalidOperationException(SR.Format(SR.NodeElementWrongType, nameof(JsonValueKind.Array))),
System\Text\Json\Nodes\JsonNode.cs (1)
200throw new InvalidOperationException(SR.Format(SR.NodeWrongType, nameof(JsonValue)));
System\Text\Json\Nodes\JsonObject.cs (1)
65_ => throw new InvalidOperationException(SR.Format(SR.NodeElementWrongType, nameof(JsonValueKind.Object)))
System\Text\Json\Schema\JsonSchema.cs (1)
308static void Throw() => throw new InvalidOperationException();
System\Text\Json\Serialization\Converters\Object\ObjectWithParameterizedConstructorConverter.Small.cs (1)
51throw 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)
110throw new InvalidOperationException(); 117throw new InvalidOperationException();
System\Text\Json\Serialization\JsonConverterFactory.cs (12)
57throw new InvalidOperationException(); 69throw new InvalidOperationException(); 81throw new InvalidOperationException(); 88throw new InvalidOperationException(); 95throw new InvalidOperationException(); 102throw new InvalidOperationException(); 109throw new InvalidOperationException(); 120throw new InvalidOperationException(); 131throw new InvalidOperationException(); 138throw new InvalidOperationException(); 152throw new InvalidOperationException(); 159throw new InvalidOperationException();
System\Text\Json\Serialization\JsonConverterOfT.cs (2)
681=> throw new InvalidOperationException(); 684=> throw new InvalidOperationException();
System\Text\Json\Serialization\JsonSerializerOptions.cs (2)
406throw new InvalidOperationException(SR.DefaultIgnoreConditionAlreadySpecified); 441throw new InvalidOperationException(SR.DefaultIgnoreConditionAlreadySpecified);
System\Text\Json\Serialization\Metadata\JsonMetadataServices.Converters.cs (1)
327throw new InvalidOperationException(SR.Format(SR.SerializationConverterNotCompatible, typedConverter, typeof(T)));
System\Text\Json\Serialization\Metadata\JsonMetadataServices.cs (1)
42throw new InvalidOperationException(SR.Format(SR.FieldCannotBeVirtual, nameof(propertyInfo.IsProperty), nameof(propertyInfo.IsVirtual)));
System\Text\Json\Serialization\Metadata\JsonTypeInfo.cs (1)
1353throw new InvalidOperationException();
System\Text\Json\Serialization\Metadata\ReflectionEmitMemberAccessor.cs (1)
146_ => throw new InvalidOperationException()
System\Text\Json\Serialization\Metadata\ReflectionMemberAccessor.cs (1)
107throw 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)
226return new InvalidOperationException(message) { Source = ExceptionSourceValueToRethrowAsJsonException }; 587InvalidOperationException ex = new InvalidOperationException(message, innerException);
System\Text\Json\ThrowHelper.Node.cs (7)
34throw new InvalidOperationException(SR.NodeAlreadyHasParent); 40throw new InvalidOperationException(SR.NodeCycleDetected); 46throw new InvalidOperationException(SR.NodeElementCannotBeObjectOrArray); 60throw new InvalidOperationException(SR.Format(SR.NodeWrongType, concatenatedNames)); 66throw new InvalidOperationException(SR.Format(SR.NodeParentWrongType, typeName)); 77throw new InvalidOperationException(SR.Format(SR.NodeUnableToConvert, sourceType, destinationType)); 83throw new InvalidOperationException(SR.Format(SR.NodeUnableToConvertElement, valueKind, destinationType));
System\Text\Json\ThrowHelper.Serialization.cs (59)
64throw new InvalidOperationException(SR.Format(SR.DeserializeUnableToAssignNull, declaredType)); 88throw new InvalidOperationException(SR.Format(SR.ObjectCreationHandlingPopulateNotSupportedByConverter, propertyInfo.Name, propertyInfo.DeclaringType)); 94throw new InvalidOperationException(SR.Format(SR.ObjectCreationHandlingPropertyMustHaveAGetter, propertyInfo.Name, propertyInfo.DeclaringType)); 100throw new InvalidOperationException(SR.Format(SR.ObjectCreationHandlingPropertyValueTypeMustHaveASetter, propertyInfo.Name, propertyInfo.DeclaringType)); 106throw new InvalidOperationException(SR.Format(SR.ObjectCreationHandlingPropertyCannotAllowPolymorphicDeserialization, propertyInfo.Name, propertyInfo.DeclaringType)); 112throw new InvalidOperationException(SR.Format(SR.ObjectCreationHandlingPropertyCannotAllowReadOnlyMember, propertyInfo.Name, propertyInfo.DeclaringType)); 118throw new InvalidOperationException(SR.ObjectCreationHandlingPropertyCannotAllowReferenceHandling); 170throw new InvalidOperationException(SR.Format(SR.CannotSerializeInvalidType, typeToConvert)); 174throw new InvalidOperationException(SR.Format(SR.CannotSerializeInvalidMember, typeToConvert, memberInfo.Name, declaringType)); 180throw new InvalidOperationException(SR.Format(SR.SerializationConverterNotCompatible, converterType, type)); 186throw new InvalidOperationException(SR.Format(SR.ResolverTypeNotCompatible, actualType, requestedType)); 192throw new InvalidOperationException(SR.ResolverTypeInfoOptionsNotCompatible); 198throw new InvalidOperationException(SR.JsonSerializerOptionsNoTypeInfoResolverSpecified); 204throw new InvalidOperationException(SR.JsonSerializerIsReflectionDisabled); 216throw new InvalidOperationException(SR.Format(SR.SerializationConverterOnAttributeInvalid, location)); 229throw new InvalidOperationException(SR.Format(SR.SerializationConverterOnAttributeNotCompatible, location, typeToConvert)); 239throw new InvalidOperationException(message); 245throw new InvalidOperationException(SR.DefaultTypeInfoResolverImmutable); 251throw new InvalidOperationException(SR.TypeInfoResolverChainImmutable); 257throw new InvalidOperationException(SR.TypeInfoImmutable); 263throw new InvalidOperationException(SR.SerializerOptions_InvalidChainedResolver); 269throw new InvalidOperationException(SR.Format(SR.SerializerPropertyNameConflict, type, propertyName)); 275throw new InvalidOperationException(SR.Format(SR.SerializerPropertyNameNull, jsonPropertyInfo.DeclaringType, jsonPropertyInfo.MemberName)); 281throw new InvalidOperationException(SR.Format(SR.JsonPropertyRequiredAndNotDeserializable, jsonPropertyInfo.Name, jsonPropertyInfo.DeclaringType)); 287throw new InvalidOperationException(SR.Format(SR.JsonPropertyRequiredAndExtensionData, jsonPropertyInfo.Name, jsonPropertyInfo.DeclaringType)); 369throw new InvalidOperationException(SR.Format(SR.NamingPolicyReturnNull, namingPolicy)); 375throw new InvalidOperationException(SR.Format(SR.SerializerConverterFactoryReturnsNull, converterType)); 381throw new InvalidOperationException(SR.Format(SR.SerializerConverterFactoryReturnsJsonConverterFactory, converterType)); 391throw new InvalidOperationException( 403throw new InvalidOperationException(SR.Format(SR.ConstructorParamIncompleteBinding, parentType)); 409throw new InvalidOperationException(SR.Format(SR.ExtensionDataCannotBindToCtorParam, propertyName, jsonPropertyInfo.DeclaringType)); 415throw new InvalidOperationException(SR.Format(SR.JsonIncludeOnInaccessibleProperty, memberName, declaringType)); 421throw new InvalidOperationException(SR.Format(SR.IgnoreConditionOnValueTypeInvalid, clrPropertyName, propertyDeclaringType)); 428throw new InvalidOperationException(SR.Format(SR.NumberHandlingOnPropertyInvalid, jsonPropertyInfo.MemberName, jsonPropertyInfo.DeclaringType)); 434throw new InvalidOperationException(SR.Format(SR.ConverterCanConvertMultipleTypes, jsonConverter.GetType(), jsonConverter.Type, runtimePropertyType)); 454throw new InvalidOperationException(SR.Format(SR.InvalidJsonTypeInfoOperationForKind, kind)); 460throw new InvalidOperationException(SR.Format(SR.OnDeserializingCallbacksNotSupported, type)); 466throw new InvalidOperationException(SR.Format(SR.CreateObjectConverterNotCompatible, type)); 567throw new InvalidOperationException(SR.Format(SR.SerializationDuplicateAttribute, attribute, location)); 573throw new InvalidOperationException(SR.Format(SR.SerializationDuplicateTypeAttribute, classType, attribute)); 579throw new InvalidOperationException(SR.Format(SR.SerializationDuplicateTypeAttribute, classType, typeof(TAttribute))); 585throw new InvalidOperationException(SR.Format(SR.ExtensionDataConflictsWithUnmappedMemberHandling, classType, jsonPropertyInfo.MemberName)); 591throw new InvalidOperationException(SR.Format(SR.SerializationDataExtensionPropertyInvalid, jsonPropertyInfo.PropertyType, jsonPropertyInfo.MemberName)); 597throw new InvalidOperationException(SR.Format(SR.PropertyTypeNotNullable, jsonPropertyInfo.PropertyType)); 603throw new InvalidOperationException(SR.NodeJsonObjectCustomConverterNotAllowedOnExtensionProperty); 824throw new InvalidOperationException(SR.Format(SR.MetadataReferenceOfTypeCannotBeAssignedToType, referenceId, currentType, typeToConvert)); 831throw new InvalidOperationException(SR.Format(SR.JsonPropertyInfoBoundToDifferentParent, propertyInfo.Name, propertyInfo.DeclaringTypeInfo.Type.FullName)); 872throw new InvalidOperationException(SR.Format(SR.NoMetadataForType, type, resolver?.ToString() ?? "<null>")); 877return new InvalidOperationException(SR.Format(SR.NoMetadataForTypeProperties, resolver?.ToString() ?? "<null>", type)); 919throw new InvalidOperationException(SR.Format(SR.Polymorphism_TypeDoesNotSupportPolymorphism, baseType)); 925throw new InvalidOperationException(SR.Format(SR.Polymorphism_DerivedTypeIsNotSupported, derivedType, baseType)); 931throw new InvalidOperationException(SR.Format(SR.Polymorphism_DerivedTypeIsAlreadySpecified, baseType, derivedType)); 937throw new InvalidOperationException(SR.Format(SR.Polymorphism_TypeDicriminatorIdIsAlreadySpecified, baseType, typeDiscriminator)); 943throw new InvalidOperationException(SR.Polymorphism_InvalidCustomTypeDiscriminatorPropertyName); 949throw new InvalidOperationException(SR.Format(SR.Polymorphism_PropertyConflictsWithMetadataPropertyName, type, propertyName)); 955throw new InvalidOperationException(SR.Format(SR.Polymorphism_ConfigurationDoesNotSpecifyDerivedTypes, baseType)); 961throw new InvalidOperationException(SR.Format(SR.UnsupportedEnumIdentifier, enumType.Name, enumName)); 985throw new InvalidOperationException(SR.Format(SR.PipeWriter_DoesNotImplementUnflushedBytes, pipeWriter.GetType().Name)); 997throw new InvalidOperationException(SR.JsonSchemaExporter_DepthTooLarge);
System.Text.Json.SourceGeneration (3)
JsonSourceGenerator.Parser.cs (2)
421throw new InvalidOperationException(); 481throw 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)
688throw new InvalidOperationException(SR.InvalidOperation_MessageNotReservedByTarget); 699throw new InvalidOperationException(SR.InvalidOperation_MessageNotReservedByTarget); 1326try { target.TrySetException(target._receivedException ?? new InvalidOperationException(SR.InvalidOperation_ErrorDuringCleanup)); } 1337return Common.InitializeStackTrace(new InvalidOperationException(SR.InvalidOperation_DataNotAvailableForReceive));
Blocks\BatchBlock.cs (1)
1003throw new InvalidOperationException(SR.InvalidOperation_FailedToConsumeReservedMessage);
Blocks\BroadcastBlock.cs (2)
1108if (_nextMessageReservedFor != target) throw new InvalidOperationException(SR.InvalidOperation_MessageNotReservedByTarget); 1114if (messageHeader.Id != _nextMessageId) throw new InvalidOperationException(SR.InvalidOperation_MessageNotReservedByTarget);
Blocks\JoinBlock.cs (1)
655_sharedResources._exceptionAction(new InvalidOperationException(SR.InvalidOperation_FailedToConsumeReservedMessage));
Blocks\WriteOnceBlock.cs (1)
416if (_header.Id != messageHeader.Id) throw new InvalidOperationException(SR.InvalidOperation_MessageNotReservedByTarget);
Internal\SourceCore.cs (2)
249if (_nextMessageReservedFor != target) throw new InvalidOperationException(SR.InvalidOperation_MessageNotReservedByTarget); 254if (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)
696Enumerator = source.GetEnumerator() ?? throw new InvalidOperationException(SR.Parallel_ForEach_NullEnumerator); 718Enumerator = source.GetAsyncEnumerator(Cancellation.Token) ?? throw new InvalidOperationException(SR.Parallel_ForEach_NullEnumerator);
System\Threading\Tasks\ParallelLoopState.cs (2)
198throw new InvalidOperationException( 337throw 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)
87throw new InvalidOperationException(Microsoft.Windows.Controls.SR.SetFocusFailed); 90throw new InvalidOperationException(Microsoft.Windows.Controls.SR.SetFocusFailed); 95throw new InvalidOperationException(Microsoft.Windows.Controls.SR.SetFocusFailed);
Microsoft\Windows\Automation\Peers\RibbonGalleryItemDataAutomationPeer.cs (1)
95throw new InvalidOperationException();
Microsoft\Windows\Automation\Peers\RibbonMenuButtonAutomationPeer.cs (6)
172throw new InvalidOperationException(Microsoft.Windows.Controls.SR.UIA_OperationCannotBePerformed); 186throw new InvalidOperationException(Microsoft.Windows.Controls.SR.UIA_OperationCannotBePerformed); 236throw new InvalidOperationException(Microsoft.Windows.Controls.SR.UIA_OperationCannotBePerformed); 245throw new InvalidOperationException(Microsoft.Windows.Controls.SR.UIA_OperationCannotBePerformed); 249throw new InvalidOperationException(Microsoft.Windows.Controls.SR.ResizeParametersNotValid); 255throw new InvalidOperationException(Microsoft.Windows.Controls.SR.UIA_OperationCannotBePerformed);
Microsoft\Windows\Automation\Peers\RibbonMenuItemDataAutomationPeer.cs (13)
151throw new InvalidOperationException(Microsoft.Windows.Controls.SR.UIA_OperationCannotBePerformed); 158throw new InvalidOperationException(Microsoft.Windows.Controls.SR.UIA_OperationCannotBePerformed); 182throw new InvalidOperationException(Microsoft.Windows.Controls.SR.UIA_OperationCannotBePerformed); 189throw new InvalidOperationException(Microsoft.Windows.Controls.SR.UIA_OperationCannotBePerformed); 222throw new InvalidOperationException(Microsoft.Windows.Controls.SR.UIA_OperationCannotBePerformed); 247throw new InvalidOperationException(Microsoft.Windows.Controls.SR.UIA_OperationCannotBePerformed); 271throw new InvalidOperationException(Microsoft.Windows.Controls.SR.UIA_OperationCannotBePerformed); 291throw new InvalidOperationException(Microsoft.Windows.Controls.SR.UIA_OperationCannotBePerformed); 328throw new InvalidOperationException(Microsoft.Windows.Controls.SR.UIA_OperationCannotBePerformed); 345throw new InvalidOperationException(Microsoft.Windows.Controls.SR.UIA_OperationCannotBePerformed); 349throw new InvalidOperationException(Microsoft.Windows.Controls.SR.UIA_OperationCannotBePerformed); 353throw new InvalidOperationException(Microsoft.Windows.Controls.SR.ResizeParametersNotValid); 359throw new InvalidOperationException(Microsoft.Windows.Controls.SR.UIA_OperationCannotBePerformed);
Microsoft\Windows\Automation\Peers\RibbonQuickAccessToolBarAutomationPeer.cs (2)
107throw new InvalidOperationException(Microsoft.Windows.Controls.SR.UIA_OperationCannotBePerformed); 119throw new InvalidOperationException(Microsoft.Windows.Controls.SR.UIA_OperationCannotBePerformed);
Microsoft\Windows\Automation\Peers\RibbonSplitButtonAutomationPeer.cs (2)
74throw new InvalidOperationException(Microsoft.Windows.Controls.SR.UIA_OperationCannotBePerformed); 107throw new InvalidOperationException(Microsoft.Windows.Controls.SR.UIA_OperationCannotBePerformed);
Microsoft\Windows\Automation\Peers\RibbonTabDataAutomationPeer.cs (2)
146throw new InvalidOperationException(Microsoft.Windows.Controls.SR.UIA_OperationCannotBePerformed); 161throw new InvalidOperationException(Microsoft.Windows.Controls.SR.UIA_OperationCannotBePerformed);
Microsoft\Windows\Controls\KeyTipService.cs (1)
964throw new InvalidOperationException(Microsoft.Windows.Controls.SR.ElementNotKeyTipScope);
Microsoft\Windows\Controls\Ribbon\Ribbon.cs (3)
752throw new InvalidOperationException(Microsoft.Windows.Controls.SR.Ribbon_ContextualTabHeadersSourceInvalid); 1451throw new InvalidOperationException(Microsoft.Windows.Controls.SR.Ribbon_ContextualTabHeadersSourceInvalid); 1461throw new InvalidOperationException(Microsoft.Windows.Controls.SR.Ribbon_ContextualTabHeadersSourceInvalid);
Microsoft\Windows\Controls\Ribbon\RibbonApplicationMenu.cs (1)
241throw new InvalidOperationException(Microsoft.Windows.Controls.SR.Format(Microsoft.Windows.Controls.SR.InvalidApplicationMenuOrItemContainer, this.GetType().Name, itemContainer));
Microsoft\Windows\Controls\Ribbon\RibbonApplicationMenuItem.cs (1)
75throw new InvalidOperationException(Microsoft.Windows.Controls.SR.Format(Microsoft.Windows.Controls.SR.InvalidApplicationMenuOrItemContainer, this.GetType().Name, itemContainer));
Microsoft\Windows\Controls\Ribbon\RibbonApplicationSplitMenuItem.cs (1)
73throw new InvalidOperationException(Microsoft.Windows.Controls.SR.Format(Microsoft.Windows.Controls.SR.InvalidApplicationMenuOrItemContainer, this.GetType().Name, itemContainer));
Microsoft\Windows\Controls\Ribbon\RibbonContextMenu.cs (1)
529throw new InvalidOperationException(Microsoft.Windows.Controls.SR.Format(Microsoft.Windows.Controls.SR.InvalidMenuButtonOrItemContainer, this.GetType().Name, itemContainer));
Microsoft\Windows\Controls\Ribbon\RibbonMenuButton.cs (1)
557throw new InvalidOperationException(Microsoft.Windows.Controls.SR.Format(Microsoft.Windows.Controls.SR.InvalidMenuButtonOrItemContainer, this.GetType().Name, itemContainer));
Microsoft\Windows\Controls\Ribbon\RibbonMenuItem.cs (1)
519throw new InvalidOperationException(Microsoft.Windows.Controls.SR.Format(Microsoft.Windows.Controls.SR.InvalidMenuButtonOrItemContainer, this.GetType().Name, itemContainer));
System.Windows.Forms (595)
System\Resources\ResXDataNode.cs (2)
88throw new InvalidOperationException(string.Format(SR.NotSerializableType, name, valueType.FullName)); 242throw new InvalidOperationException(string.Format(SR.NotSerializableType, _name, valueType.FullName));
System\Resources\ResXResourceReader.cs (2)
148throw new InvalidOperationException(SR.InvalidResXBasePathOperation); 168throw new InvalidOperationException(SR.InvalidResXBasePathOperation);
System\Resources\ResXResourceWriter.cs (2)
387throw new InvalidOperationException(SR.ResXResourceWriterSaved); 584throw new InvalidOperationException(SR.ResXResourceWriterSaved);
System\Windows\Forms\Accessibility\Control.ControlAccessibleObject.cs (1)
493? throw new InvalidOperationException(SR.OwnerControlIsNotALiveRegion)
System\Windows\Forms\Accessibility\LabelEditNativeWindow.cs (1)
178throw new InvalidOperationException(SR.RichControlLresult, ex);
System\Windows\Forms\ActiveX\AxHost.cs (3)
1843throw new InvalidOperationException(SR.AXOcxStateLoaded); 2778throw new InvalidOperationException(SR.UnableToInitComponent); 2845throw new InvalidOperationException(SR.UnableToInitComponent);
System\Windows\Forms\ActiveX\AxHost.OleInterfaces.cs (1)
320throw new InvalidOperationException(SR.AXWindowlessControl);
System\Windows\Forms\Application.cs (2)
1335throw new InvalidOperationException(string.Format(SR.Win32WindowAlreadyCreated, nameof(SetCompatibleTextRenderingDefault))); 1364throw new InvalidOperationException(string.Format(SR.Win32WindowAlreadyCreated, nameof(SetDefaultFont)));
System\Windows\Forms\Application.ThreadContext.cs (2)
689throw new InvalidOperationException(SR.CantShowModalOnNonInteractive); 713throw new InvalidOperationException(SR.CantNestMessageLoops);
System\Windows\Forms\Control.cs (10)
2193throw new InvalidOperationException(string.Format(SR.IllegalCrossThreadCall, Name)); 4788throw new InvalidOperationException(string.Format(SR.ClosingWhileCreatingHandle, "Dispose")); 4890throw new InvalidOperationException(string.Format(SR.ClipboardOrDragDrop_CannotJsonSerializeDataObject, nameof(DoDragDrop))); 5671Control? parent = ctl._parent ?? throw new InvalidOperationException( 5674ControlCollection? siblings = parent.ChildControls ?? throw new InvalidOperationException( 5681throw new InvalidOperationException(string.Format( 6479throw new InvalidOperationException(SR.ErrorNoMarshalingThread); 9578throw new InvalidOperationException(SR.DragDropRegFailed, e); 10364throw new InvalidOperationException(SR.TopLevelNotAllowedIfActiveX); 11343throw new InvalidOperationException(SR.RichControlLresult, e);
System\Windows\Forms\Controls\ComboBox\ComboBox.ComboBoxChildNativeWindow.cs (1)
153throw new InvalidOperationException(SR.RichControlLresult, e);
System\Windows\Forms\Controls\ComboBox\ComboBox.cs (1)
2839throw new InvalidOperationException(SR.ComboBoxDataSourceWithSort);
System\Windows\Forms\Controls\ComboBox\ComboBox.ObjectCollection.EntryEnumerator.cs (1)
64throw new InvalidOperationException(SR.ListEnumCurrentOutOfRange);
System\Windows\Forms\Controls\DataGridView\DataGridView.cs (28)
904throw new InvalidOperationException(SR.DataGridView_CannotAutoSizeColumnsInvisibleColumnHeaders); 910throw new InvalidOperationException(SR.DataGridView_CannotAutoFillFrozenColumns); 964throw new InvalidOperationException(SR.DataGridView_CannotAutoSizeRowsInvisibleRowHeader); 1392throw new InvalidOperationException(SR.DataGridView_CannotSetColumnCountOnDataBoundDataGridView); 1659throw new InvalidOperationException(SR.DataGridView_ColumnHeadersCannotBeInvisible); 1735throw new InvalidOperationException(SR.DataGridView_CellChangeCannotBeCommittedOrAborted); 1747throw new InvalidOperationException(SR.DataGridView_CurrentCellCannotBeInvisible); 1752throw new InvalidOperationException(SR.DataGridView_CellChangeCannotBeCommittedOrAborted); 1768throw new InvalidOperationException(SR.DataGridView_CellChangeCannotBeCommittedOrAborted); 2306throw new InvalidOperationException(SR.DataGridView_FirstDisplayedCellCannotBeAHeaderOrSharedCell); 2316throw new InvalidOperationException(SR.DataGridView_FirstDisplayedCellCannotBeInvisible); 2457throw new InvalidOperationException(SR.DataGridView_FirstDisplayedScrollingColumnCannotBeInvisible); 2462throw new InvalidOperationException(SR.DataGridView_FirstDisplayedScrollingColumnCannotBeFrozen); 2473throw new InvalidOperationException(SR.DataGridView_NoRoomForDisplayedColumns); 2480throw new InvalidOperationException(SR.DataGridView_FrozenColumnsPreventFirstDisplayedScrollingColumn); 2537throw new InvalidOperationException(SR.DataGridView_FirstDisplayedScrollingRowCannotBeInvisible); 2542throw new InvalidOperationException(SR.DataGridView_FirstDisplayedScrollingRowCannotBeFrozen); 2553throw new InvalidOperationException(SR.DataGridView_NoRoomForDisplayedRows); 2560throw new InvalidOperationException(SR.DataGridView_FrozenRowsPreventFirstDisplayedScrollingRow); 3086throw new InvalidOperationException(SR.DataGridView_CommitFailedCannotCompleteOperation); 3151throw new InvalidOperationException(SR.DataGridView_CellChangeCannotBeCommittedOrAborted); 3185throw new InvalidOperationException(SR.DataGridView_CannotSetRowCountOnDataBoundDataGridView); 3354throw new InvalidOperationException(SR.DataGridView_RowHeadersCannotBeInvisible); 3550throw new InvalidOperationException(SR.DataGridView_RowAlreadyBelongsToDataGridView); 3603throw new InvalidOperationException(SR.DataGridView_CellChangeCannotBeCommittedOrAborted); 3760throw new InvalidOperationException(string.Format(SR.DataGridView_SelectionModeAndSortModeClash, (value).ToString())); 4939throw new InvalidOperationException(SR.DataGridViewBeginInit); 4968throw new InvalidOperationException(
System\Windows\Forms\Controls\DataGridView\DataGridView.DataConnection.cs (3)
605throw new InvalidOperationException(); 1241throw new InvalidOperationException(SR.DataGridView_CellChangeCannotBeCommittedOrAborted); 1279throw new InvalidOperationException(SR.DataGridView_CellChangeCannotBeCommittedOrAborted);
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (63)
526throw new InvalidOperationException(SR.DataGridView_CannotAlterAutoFillColumnParameter); 1718throw new InvalidOperationException(SR.DataGridView_CannotAutoSizeInvisibleColumnHeader); 1963throw new InvalidOperationException(SR.DataGridView_CannotAutoSizeRowInvisibleRowHeader); 2370throw new InvalidOperationException(SR.DataGridView_CannotAutoSizeRowsInvisibleRowHeader); 2386throw new InvalidOperationException(SR.DataGridView_CannotAutoSizeRowsInvisibleRowHeader); 2565? throw new InvalidOperationException(SR.DataGridView_NoCurrentCell) 2572throw new InvalidOperationException(SR.DataGridView_BeginEditNotReentrant); 4196throw new InvalidOperationException(SR.DataGridView_AColumnHasNoCellTemplate); 5028throw new InvalidOperationException(SR.DataGridView_CannotAddFrozenColumn); 5042throw new InvalidOperationException(SR.DataGridView_CannotAddNonFrozenColumn); 5167throw new InvalidOperationException(SR.DataGridView_CannotMoveNonFrozenColumn); 5186throw new InvalidOperationException(SR.DataGridView_CannotMoveFrozenColumn); 5234throw new InvalidOperationException(SR.DataGridView_CannotAddFrozenRow); 5247throw new InvalidOperationException(SR.DataGridView_CannotAddNonFrozenRow); 5276throw new InvalidOperationException(SR.DataGridView_CannotAddFrozenRow); 5282throw new InvalidOperationException(SR.DataGridView_CannotAddNonFrozenRow); 10741throw new InvalidOperationException(SR.DataGridView_ColumnAlreadyBelongsToDataGridView); 10748throw new InvalidOperationException(string.Format(SR.DataGridViewColumn_SortModeAndSelectionModeClash, DataGridViewColumnSortMode.Automatic.ToString(), SelectionMode.ToString())); 10761throw new InvalidOperationException(SR.DataGridView_CannotAddAutoSizedColumn); 10770throw new InvalidOperationException(SR.DataGridView_CannotAddAutoFillColumn); 10781throw new InvalidOperationException(string.Format(SR.DataGridView_WeightSumCannotExceedLongMaxValue, ushort.MaxValue)); 10793throw new InvalidOperationException(SR.DataGridView_CannotAddUntypedColumn); 10860throw new InvalidOperationException(SR.DataGridView_AtLeastOneColumnIsNull); 10865throw new InvalidOperationException(SR.DataGridView_ColumnAlreadyBelongsToDataGridView); 10871throw new InvalidOperationException(SR.DataGridView_CannotAddUntypedColumn); 10878throw new InvalidOperationException(string.Format( 10894throw new InvalidOperationException(SR.DataGridView_CannotAddAutoSizedColumn); 10903throw new InvalidOperationException(SR.DataGridView_CannotAddAutoFillColumn); 10913throw new InvalidOperationException(string.Format(SR.DataGridView_WeightSumCannotExceedLongMaxValue, ushort.MaxValue)); 10927throw new InvalidOperationException(SR.DataGridView_CannotAddIdenticalColumns); 11041throw new InvalidOperationException(SR.DataGridView_AtLeastOneRowIsNull); 11046throw new InvalidOperationException(SR.DataGridView_RowAlreadyBelongsToDataGridView); 11051throw new InvalidOperationException(SR.DataGridViewRowCollection_CannotAddOrInsertSelectedRow); 11056throw new InvalidOperationException(SR.DataGridViewRowCollection_TooManyCells); 11068throw new InvalidOperationException(SR.DataGridView_CannotAddIdenticalRows); 11162?? throw new InvalidOperationException(string.Format(SR.InvalidNullArgument, "e.Column")); 11442throw new InvalidOperationException(SR.DataGridView_CannotAlterAutoFillColumnParameter); 13371throw new InvalidOperationException(SR.DataGridView_CannotAlterDisplayIndexWithinAdjustments); 13524throw new InvalidOperationException(SR.DataGridView_CannotAlterAutoFillColumnParameter); 13531throw new InvalidOperationException(string.Format(SR.DataGridView_WeightSumCannotExceedLongMaxValue, ushort.MaxValue)); 14713throw new InvalidOperationException(SR.DataGridView_CannotMakeAutoSizedColumnVisible); 14765throw new InvalidOperationException(SR.DataGridView_CommitFailedCannotCompleteOperation); 14796throw new InvalidOperationException(SR.DataGridView_CurrencyManagerRowCannotBeInvisible); 14827throw new InvalidOperationException(SR.DataGridView_CommitFailedCannotCompleteOperation); 14868throw new InvalidOperationException(SR.DataGridView_CommitFailedCannotCompleteOperation); 15371throw new InvalidOperationException(SR.DataGridView_ColumnAlreadyBelongsToDataGridView); 15378throw new InvalidOperationException(string.Format( 15394throw new InvalidOperationException(SR.DataGridView_CannotAddAutoSizedColumn); 15403throw new InvalidOperationException(SR.DataGridView_CannotAddAutoFillColumn); 15428throw new InvalidOperationException(SR.DataGridView_CannotAddUntypedColumn); 19709throw new InvalidOperationException(SR.DataGridView_CannotAlterAutoFillColumnParameter); 19848throw new InvalidOperationException(); 19888throw new InvalidOperationException(); 26474throw new InvalidOperationException(); 26768throw new InvalidOperationException(SR.DataGridView_CurrentCellCannotBeInvisible); 26774throw new InvalidOperationException(SR.DataGridView_SetCurrentCellAddressCoreNotReentrant); 27737throw new InvalidOperationException(SR.DataGridView_CurrentCellCannotBeInvisible); 28175throw new InvalidOperationException(SR.DataGridView_OperationDisabledInVirtualMode); 28187throw new InvalidOperationException(SR.DataGridView_OperationDisabledInVirtualMode); 28193throw new InvalidOperationException(SR.DataGridView_CannotUseAComparerToSortDataGridViewWhenDataBound); 28203throw new InvalidOperationException(SR.DataGridView_CannotSortDataBoundDataGridViewBoundToNonIBindingList); 28208throw new InvalidOperationException(SR.DataGridView_IBindingListNeedsToSupportSorting); 30117throw new InvalidOperationException();
System\Windows\Forms\Controls\DataGridView\DataGridView.TopRowAccessibleObject.cs (9)
32throw new InvalidOperationException(SR.DataGridViewTopRowAccessibleObject_OwnerNotSet); 59throw new InvalidOperationException(SR.DataGridViewTopRowAccessibleObject_OwnerAlreadySet); 72throw new InvalidOperationException(SR.DataGridViewTopRowAccessibleObject_OwnerNotSet); 102throw new InvalidOperationException(SR.DataGridViewTopRowAccessibleObject_OwnerNotSet); 140throw new InvalidOperationException(SR.DataGridViewTopRowAccessibleObject_OwnerNotSet); 157throw new InvalidOperationException(SR.DataGridViewTopRowAccessibleObject_OwnerNotSet); 191? throw new InvalidOperationException(SR.DataGridViewTopRowAccessibleObject_OwnerNotSet) 205throw new InvalidOperationException(SR.DataGridViewTopRowAccessibleObject_OwnerNotSet); 251? throw new InvalidOperationException(SR.DataGridViewTopRowAccessibleObject_OwnerNotSet)
System\Windows\Forms\Controls\DataGridView\DataGridViewBand.cs (4)
415throw new InvalidOperationException(string.Format(SR.DataGridView_InvalidPropertySetOnSharedRow, nameof(ReadOnly))); 546throw new InvalidOperationException(string.Format(SR.DataGridView_InvalidPropertySetOnSharedRow, nameof(Selected))); 566throw new InvalidOperationException(SR.DataGridViewBand_CannotSelect); 694throw new InvalidOperationException(SR.DataGridViewBand_NewRowCannotBeInvisible);
System\Windows\Forms\Controls\DataGridView\DataGridViewButtonCell.DataGridViewButtonCellAccessibleObject.cs (2)
25throw new InvalidOperationException(SR.DataGridViewCellAccessibleObject_OwnerNotSet); 35throw new InvalidOperationException(SR.DataGridView_InvalidOperationOnSharedCell);
System\Windows\Forms\Controls\DataGridView\DataGridViewButtonColumn.cs (2)
64throw new InvalidOperationException(SR.DataGridViewColumn_CellTemplateRequired); 152throw new InvalidOperationException(SR.DataGridViewColumn_CellTemplateRequired);
System\Windows\Forms\Controls\DataGridView\DataGridViewCell.cs (13)
402throw new InvalidOperationException(SR.DataGridView_InvalidOperationOnSharedCell); 456throw new InvalidOperationException(SR.DataGridView_InvalidOperationOnSharedCell); 474throw new InvalidOperationException(SR.DataGridViewCell_CannotSetReadOnlyState); 558throw new InvalidOperationException(SR.DataGridView_InvalidOperationOnSharedCell); 567throw new InvalidOperationException(SR.DataGridViewCell_CannotSetSelectedState); 1051throw new InvalidOperationException(); 1732throw new InvalidOperationException(); 1874throw new InvalidOperationException(SR.DataGridView_CellNeedsDataGridViewForInheritedStyle); 1882throw new InvalidOperationException(); 2357throw new InvalidOperationException(string.Format(SR.DataGridView_InvalidPropertyGetOnSharedCell, "Size")); 2420throw new InvalidOperationException(); 2466throw new InvalidOperationException(); 3794throw new InvalidOperationException();
System\Windows\Forms\Controls\DataGridView\DataGridViewCell.DataGridViewCellAccessibleObject.cs (15)
37throw new InvalidOperationException(SR.DataGridViewCellAccessibleObject_OwnerNotSet); 52throw new InvalidOperationException(SR.DataGridViewCellAccessibleObject_OwnerNotSet); 98throw new InvalidOperationException(SR.DataGridViewCellAccessibleObject_OwnerAlreadySet); 113throw new InvalidOperationException(SR.DataGridViewCellAccessibleObject_OwnerNotSet); 130throw new InvalidOperationException(SR.DataGridViewCellAccessibleObject_OwnerNotSet); 187throw new InvalidOperationException(SR.DataGridViewCellAccessibleObject_OwnerNotSet); 221throw new InvalidOperationException(SR.DataGridViewCellAccessibleObject_OwnerNotSet); 264throw new InvalidOperationException(SR.DataGridViewCellAccessibleObject_OwnerNotSet); 276throw new InvalidOperationException(SR.DataGridView_InvalidOperationOnSharedCell); 314throw new InvalidOperationException(SR.DataGridViewCellAccessibleObject_OwnerNotSet); 394throw new InvalidOperationException(SR.DataGridViewCellAccessibleObject_OwnerNotSet); 415throw new InvalidOperationException(SR.DataGridViewCellAccessibleObject_OwnerNotSet); 439throw new InvalidOperationException(SR.DataGridViewCellAccessibleObject_OwnerNotSet); 568throw new InvalidOperationException(SR.DataGridViewCellAccessibleObject_OwnerNotSet); 642throw new InvalidOperationException(SR.DataGridViewCellAccessibleObject_OwnerNotSet);
System\Windows\Forms\Controls\DataGridView\DataGridViewCellCollection.cs (13)
74throw new InvalidOperationException(SR.DataGridViewCellCollection_CellAlreadyBelongsToDataGridView); 79throw new InvalidOperationException(SR.DataGridViewCellCollection_CellAlreadyBelongsToDataGridViewRow); 160throw new InvalidOperationException(SR.DataGridViewCellCollection_OwningRowAlreadyBelongsToDataGridView); 165throw new InvalidOperationException(SR.DataGridViewCellCollection_CellAlreadyBelongsToDataGridViewRow); 194throw new InvalidOperationException(SR.DataGridViewCellCollection_OwningRowAlreadyBelongsToDataGridView); 201throw new InvalidOperationException(SR.DataGridViewCellCollection_AtLeastOneCellIsNull); 206throw new InvalidOperationException(SR.DataGridViewCellCollection_CellAlreadyBelongsToDataGridViewRow); 218throw new InvalidOperationException(SR.DataGridViewCellCollection_CannotAddIdenticalCells); 237throw new InvalidOperationException(SR.DataGridViewCellCollection_OwningRowAlreadyBelongsToDataGridView); 269throw new InvalidOperationException(SR.DataGridViewCellCollection_OwningRowAlreadyBelongsToDataGridView); 274throw new InvalidOperationException(SR.DataGridViewCellCollection_CellAlreadyBelongsToDataGridViewRow); 307throw new InvalidOperationException(SR.DataGridViewCellCollection_OwningRowAlreadyBelongsToDataGridView); 335throw new InvalidOperationException(SR.DataGridViewCellCollection_OwningRowAlreadyBelongsToDataGridView);
System\Windows\Forms\Controls\DataGridView\DataGridViewCellPaintingEventArgs.cs (6)
82throw new InvalidOperationException(SR.DataGridViewElementPaintingEventArgs_RowIndexOutOfRange); 87throw new InvalidOperationException(SR.DataGridViewElementPaintingEventArgs_ColumnIndexOutOfRange); 111throw new InvalidOperationException(SR.DataGridViewElementPaintingEventArgs_RowIndexOutOfRange); 116throw new InvalidOperationException(SR.DataGridViewElementPaintingEventArgs_ColumnIndexOutOfRange); 146throw new InvalidOperationException(SR.DataGridViewElementPaintingEventArgs_RowIndexOutOfRange); 151throw new InvalidOperationException(SR.DataGridViewElementPaintingEventArgs_ColumnIndexOutOfRange);
System\Windows\Forms\Controls\DataGridView\DataGridViewCheckBoxCell.cs (1)
127throw new InvalidOperationException(SR.DataGridViewCell_FormattedValueTypeNull);
System\Windows\Forms\Controls\DataGridView\DataGridViewCheckBoxCell.DataGridViewCheckBoxCellAccessibleObject.cs (5)
25throw new InvalidOperationException(SR.DataGridViewCellAccessibleObject_OwnerNotSet); 53throw new InvalidOperationException(SR.DataGridViewCellAccessibleObject_OwnerNotSet); 81throw new InvalidOperationException(SR.DataGridViewCellAccessibleObject_OwnerNotSet); 91throw new InvalidOperationException(SR.DataGridView_InvalidOperationOnSharedCell); 155throw new InvalidOperationException(string.Format(SR.DataGridViewCellAccessibleObject_OwnerWrongType, Owner is null ? "null" : Owner.GetType().Name));
System\Windows\Forms\Controls\DataGridView\DataGridViewCheckBoxColumn.cs (5)
68throw new InvalidOperationException(SR.DataGridViewColumn_CellTemplateRequired); 111throw new InvalidOperationException(SR.DataGridViewColumn_CellTemplateRequired); 155throw new InvalidOperationException(SR.DataGridViewColumn_CellTemplateRequired); 198throw new InvalidOperationException(SR.DataGridViewColumn_CellTemplateRequired); 249throw new InvalidOperationException(SR.DataGridViewColumn_CellTemplateRequired);
System\Windows\Forms\Controls\DataGridView\DataGridViewColumn.cs (4)
104throw new InvalidOperationException(SR.DataGridViewColumn_AutoSizeCriteriaCannotUseInvisibleHeaders); 112throw new InvalidOperationException(SR.DataGridViewColumn_FrozenColumnCannotAutoFill); 681throw new InvalidOperationException(SR.DataGridView_ColumnBoundToAReadOnlyFieldMustRemainReadOnly); 732throw new InvalidOperationException(string.Format(SR.DataGridViewColumn_SortModeAndSelectionModeClash, (value).ToString(), DataGridView.SelectionMode.ToString()));
System\Windows\Forms\Controls\DataGridView\DataGridViewColumnCollection.cs (10)
148throw new InvalidOperationException(SR.DataGridView_ForbiddenOperationInEventHandler); 155throw new InvalidOperationException(SR.DataGridView_CannotAlterDisplayIndexWithinAdjustments); 181throw new InvalidOperationException(SR.DataGridView_ForbiddenOperationInEventHandler); 188throw new InvalidOperationException(SR.DataGridView_CannotAlterDisplayIndexWithinAdjustments); 271throw new InvalidOperationException(SR.DataGridView_ForbiddenOperationInEventHandler); 278throw new InvalidOperationException(SR.DataGridView_CannotAlterDisplayIndexWithinAdjustments); 869throw new InvalidOperationException(SR.DataGridView_ForbiddenOperationInEventHandler); 876throw new InvalidOperationException(SR.DataGridView_CannotAlterDisplayIndexWithinAdjustments); 1038throw new InvalidOperationException(SR.DataGridView_ForbiddenOperationInEventHandler); 1045throw new InvalidOperationException(SR.DataGridView_CannotAlterDisplayIndexWithinAdjustments);
System\Windows\Forms\Controls\DataGridView\DataGridViewColumnHeaderCell.cs (3)
70throw new InvalidOperationException(SR.DataGridView_CellDoesNotYetBelongToDataGridView); 77throw new InvalidOperationException(string.Format(SR.DataGridViewColumnHeaderCell_SortModeAndSortGlyphDirectionClash, (value).ToString())); 279throw new InvalidOperationException(SR.DataGridView_CellNeedsDataGridViewForInheritedStyle);
System\Windows\Forms\Controls\DataGridView\DataGridViewColumnHeaderCell.DataGridViewColumnHeaderCellAccessibleObject.cs (9)
31? throw new InvalidOperationException(SR.DataGridViewCellAccessibleObject_OwnerNotSet) 40throw new InvalidOperationException(SR.DataGridViewCellAccessibleObject_OwnerNotSet); 62? throw new InvalidOperationException(SR.DataGridViewCellAccessibleObject_OwnerNotSet) 67? throw new InvalidOperationException(SR.DataGridViewCellAccessibleObject_OwnerNotSet) 78throw new InvalidOperationException(SR.DataGridViewCellAccessibleObject_OwnerNotSet); 109throw new InvalidOperationException(SR.DataGridViewCellAccessibleObject_OwnerNotSet); 142throw new InvalidOperationException(SR.DataGridViewCellAccessibleObject_OwnerNotSet); 204throw new InvalidOperationException(SR.DataGridViewCellAccessibleObject_OwnerNotSet); 244throw new InvalidOperationException(SR.DataGridViewCellAccessibleObject_OwnerNotSet);
System\Windows\Forms\Controls\DataGridView\DataGridViewComboBoxCell.cs (1)
714throw new InvalidOperationException();
System\Windows\Forms\Controls\DataGridView\DataGridViewComboBoxCell.DataGridViewComboBoxCellAccessibleObject.cs (1)
42throw new InvalidOperationException(SR.DataGridViewCellAccessibleObject_OwnerNotSet);
System\Windows\Forms\Controls\DataGridView\DataGridViewComboBoxCell.ObjectCollection.cs (2)
109throw new InvalidOperationException(SR.InvalidNullItemInCollection); 133throw new InvalidOperationException(SR.InvalidNullItemInCollection);
System\Windows\Forms\Controls\DataGridView\DataGridViewComboBoxColumn.cs (11)
34throw new InvalidOperationException(SR.DataGridViewColumn_CellTemplateRequired); 97throw new InvalidOperationException(SR.DataGridViewColumn_CellTemplateRequired); 143throw new InvalidOperationException(SR.DataGridViewColumn_CellTemplateRequired); 186throw new InvalidOperationException(SR.DataGridViewColumn_CellTemplateRequired); 230throw new InvalidOperationException(SR.DataGridViewColumn_CellTemplateRequired); 274throw new InvalidOperationException(SR.DataGridViewColumn_CellTemplateRequired); 315throw new InvalidOperationException(SR.DataGridViewColumn_CellTemplateRequired); 358throw new InvalidOperationException(SR.DataGridViewColumn_CellTemplateRequired); 378throw new InvalidOperationException(SR.DataGridViewColumn_CellTemplateRequired); 421throw new InvalidOperationException(SR.DataGridViewColumn_CellTemplateRequired); 462throw new InvalidOperationException(SR.DataGridViewColumn_CellTemplateRequired);
System\Windows\Forms\Controls\DataGridView\DataGridViewHeaderCell.cs (2)
121set => throw new InvalidOperationException(string.Format(SR.DataGridView_HeaderCellReadOnlyProperty, "ReadOnly")); 152set => throw new InvalidOperationException(string.Format(SR.DataGridView_HeaderCellReadOnlyProperty, "Selected"));
System\Windows\Forms\Controls\DataGridView\DataGridViewImageCell.DataGridViewImageCellAccessibleObject.cs (1)
36throw new InvalidOperationException(SR.DataGridViewCellAccessibleObject_OwnerNotSet);
System\Windows\Forms\Controls\DataGridView\DataGridViewImageColumn.cs (3)
74throw new InvalidOperationException(SR.DataGridViewColumn_CellTemplateRequired); 143throw new InvalidOperationException(SR.DataGridViewColumn_CellTemplateRequired); 191throw new InvalidOperationException(SR.DataGridViewColumn_CellTemplateRequired);
System\Windows\Forms\Controls\DataGridView\DataGridViewLinkCell.DataGridViewLinkCellAccessibleObject.cs (2)
23throw new InvalidOperationException(SR.DataGridViewCellAccessibleObject_OwnerNotSet); 33throw new InvalidOperationException(SR.DataGridView_InvalidOperationOnSharedCell);
System\Windows\Forms\Controls\DataGridView\DataGridViewLinkColumn.cs (6)
33throw new InvalidOperationException(SR.DataGridViewColumn_CellTemplateRequired); 102throw new InvalidOperationException(SR.DataGridViewColumn_CellTemplateRequired); 144throw new InvalidOperationException(SR.DataGridViewColumn_CellTemplateRequired); 239throw new InvalidOperationException(SR.DataGridViewColumn_CellTemplateRequired); 282throw new InvalidOperationException(SR.DataGridViewColumn_CellTemplateRequired); 324throw new InvalidOperationException(SR.DataGridViewColumn_CellTemplateRequired);
System\Windows\Forms\Controls\DataGridView\DataGridViewRow.cs (24)
98throw new InvalidOperationException(string.Format(SR.DataGridView_InvalidPropertySetOnSharedRow, nameof(DefaultCellStyle))); 112throw new InvalidOperationException(string.Format(SR.DataGridView_InvalidPropertyGetOnSharedRow, nameof(Displayed))); 130throw new InvalidOperationException(string.Format(SR.DataGridView_InvalidPropertySetOnSharedRow, nameof(DividerHeight))); 183throw new InvalidOperationException(string.Format(SR.DataGridView_InvalidPropertyGetOnSharedRow, nameof(Frozen))); 192throw new InvalidOperationException(string.Format(SR.DataGridView_InvalidPropertySetOnSharedRow, nameof(Frozen))); 220throw new InvalidOperationException(string.Format(SR.DataGridView_InvalidPropertySetOnSharedRow, nameof(Height))); 233throw new InvalidOperationException(string.Format(SR.DataGridView_InvalidPropertyGetOnSharedRow, nameof(InheritedStyle))); 260throw new InvalidOperationException(string.Format(SR.DataGridView_InvalidPropertySetOnSharedRow, nameof(MinimumHeight))); 278throw new InvalidOperationException(string.Format(SR.DataGridView_InvalidPropertyGetOnSharedRow, nameof(ReadOnly))); 295throw new InvalidOperationException(string.Format(SR.DataGridView_InvalidPropertyGetOnSharedRow, nameof(Resizable))); 309throw new InvalidOperationException(string.Format(SR.DataGridView_InvalidPropertyGetOnSharedRow, nameof(Selected))); 323throw new InvalidOperationException(string.Format(SR.DataGridView_InvalidPropertyGetOnSharedRow, nameof(State))); 337throw new InvalidOperationException(string.Format(SR.DataGridView_InvalidPropertyGetOnSharedRow, nameof(Visible))); 346throw new InvalidOperationException(string.Format(SR.DataGridView_InvalidPropertySetOnSharedRow, nameof(Visible))); 1103throw new InvalidOperationException(SR.DataGridView_RowAlreadyBelongsToDataGridView); 1114throw new InvalidOperationException(SR.DataGridView_AColumnHasNoCellTemplate); 1185throw new InvalidOperationException(SR.DataGridView_RowDoesNotYetBelongToDataGridView); 1211throw new InvalidOperationException(SR.DataGridView_InvalidOperationOnSharedRow); 1238throw new InvalidOperationException(SR.DataGridView_InvalidOperationOnSharedRow); 1420throw new InvalidOperationException(SR.DataGridView_RowDoesNotYetBelongToDataGridView); 1496throw new InvalidOperationException(SR.DataGridView_RowDoesNotYetBelongToDataGridView); 1689throw new InvalidOperationException(SR.DataGridView_RowDoesNotYetBelongToDataGridView); 1780throw new InvalidOperationException(SR.DataGridView_InvalidOperationInVirtualMode); 1785throw new InvalidOperationException(SR.DataGridView_InvalidOperationOnSharedRow);
System\Windows\Forms\Controls\DataGridView\DataGridViewRow.DataGridViewRowAccessibleObject.cs (13)
45throw new InvalidOperationException(SR.DataGridViewRowAccessibleObject_OwnerNotSet); 94throw new InvalidOperationException(SR.DataGridViewRowAccessibleObject_OwnerNotSet); 114throw new InvalidOperationException(SR.DataGridViewRowAccessibleObject_OwnerAlreadySet); 129throw new InvalidOperationException(SR.DataGridViewRowAccessibleObject_OwnerNotSet); 153throw new InvalidOperationException(SR.DataGridViewRowAccessibleObject_OwnerNotSet); 168throw new InvalidOperationException(SR.DataGridViewRowAccessibleObject_OwnerNotSet); 214throw new InvalidOperationException(SR.DataGridViewRowAccessibleObject_OwnerNotSet); 255throw new InvalidOperationException(SR.DataGridViewRowAccessibleObject_OwnerNotSet); 285throw new InvalidOperationException(SR.DataGridViewRowAccessibleObject_OwnerNotSet); 309throw new InvalidOperationException(SR.DataGridViewRowAccessibleObject_OwnerNotSet); 329throw new InvalidOperationException(SR.DataGridViewRowAccessibleObject_OwnerNotSet); 400throw new InvalidOperationException(SR.DataGridViewRowAccessibleObject_OwnerNotSet); 454throw new InvalidOperationException(SR.DataGridViewRowAccessibleObject_OwnerNotSet);
System\Windows\Forms\Controls\DataGridView\DataGridViewRowCollection.cs (50)
179throw new InvalidOperationException(SR.DataGridViewRowCollection_AddUnboundRow); 184throw new InvalidOperationException(SR.DataGridView_ForbiddenOperationInEventHandler); 196throw new InvalidOperationException(SR.DataGridViewRowCollection_NoColumns); 201throw new InvalidOperationException(SR.DataGridViewRowCollection_RowTemplateTooManyCells); 279throw new InvalidOperationException(SR.DataGridView_InvalidOperationInVirtualMode); 284throw new InvalidOperationException(SR.DataGridViewRowCollection_AddUnboundRow); 289throw new InvalidOperationException(SR.DataGridView_ForbiddenOperationInEventHandler); 302throw new InvalidOperationException(SR.DataGridViewRowCollection_NoColumns); 307throw new InvalidOperationException(SR.DataGridViewRowCollection_AddUnboundRow); 312throw new InvalidOperationException(SR.DataGridView_ForbiddenOperationInEventHandler); 330throw new InvalidOperationException(SR.DataGridViewRowCollection_NoColumns); 335throw new InvalidOperationException(SR.DataGridViewRowCollection_AddUnboundRow); 340throw new InvalidOperationException(SR.DataGridView_ForbiddenOperationInEventHandler); 345throw new InvalidOperationException(SR.DataGridViewRowCollection_RowTemplateTooManyCells); 388throw new InvalidOperationException(SR.DataGridView_RowAlreadyBelongsToDataGridView); 393throw new InvalidOperationException(SR.DataGridViewRowCollection_NoColumns); 403throw new InvalidOperationException(SR.DataGridViewRowCollection_CannotAddOrInsertSelectedRow); 464throw new InvalidOperationException(SR.DataGridViewRowCollection_AddUnboundRow); 469throw new InvalidOperationException(SR.DataGridView_ForbiddenOperationInEventHandler); 535throw new InvalidOperationException(SR.DataGridViewRowCollection_AddUnboundRow); 540throw new InvalidOperationException(SR.DataGridView_ForbiddenOperationInEventHandler); 720throw new InvalidOperationException(SR.DataGridView_ForbiddenOperationInEventHandler); 725throw new InvalidOperationException(SR.DataGridViewRowCollection_AddUnboundRow); 738throw new InvalidOperationException(SR.DataGridViewRowCollection_NoColumns); 789throw new InvalidOperationException(SR.DataGridView_ForbiddenOperationInEventHandler); 800throw new InvalidOperationException(SR.DataGridViewRowCollection_CantClearRowCollectionWithWrongSource); 1359throw new InvalidOperationException(SR.DataGridView_InvalidOperationInVirtualMode); 1364throw new InvalidOperationException(SR.DataGridViewRowCollection_AddUnboundRow); 1379throw new InvalidOperationException(SR.DataGridViewRowCollection_AddUnboundRow); 1384throw new InvalidOperationException(SR.DataGridView_ForbiddenOperationInEventHandler); 1394throw new InvalidOperationException(SR.DataGridViewRowCollection_AddUnboundRow); 1409throw new InvalidOperationException(SR.DataGridView_ForbiddenOperationInEventHandler); 1414throw new InvalidOperationException(SR.DataGridViewRowCollection_NoColumns); 1419throw new InvalidOperationException(SR.DataGridViewRowCollection_RowTemplateTooManyCells); 1426throw new InvalidOperationException(SR.DataGridViewRowCollection_NoInsertionAfterNewRow); 1464throw new InvalidOperationException(SR.DataGridView_RowAlreadyBelongsToDataGridView); 1471throw new InvalidOperationException(SR.DataGridViewRowCollection_NoInsertionAfterNewRow); 1476throw new InvalidOperationException(SR.DataGridViewRowCollection_NoColumns); 1486throw new InvalidOperationException(SR.DataGridViewRowCollection_CannotAddOrInsertSelectedRow); 1508throw new InvalidOperationException(SR.DataGridViewRowCollection_NoColumns); 1569throw new InvalidOperationException(SR.DataGridViewRowCollection_AddUnboundRow); 1574throw new InvalidOperationException(SR.DataGridView_ForbiddenOperationInEventHandler); 1603throw new InvalidOperationException(SR.DataGridViewRowCollection_NoInsertionAfterNewRow); 1766throw new InvalidOperationException(SR.DataGridView_ForbiddenOperationInEventHandler); 1773throw new InvalidOperationException(SR.DataGridViewRowCollection_NoInsertionAfterNewRow); 1778throw new InvalidOperationException(SR.DataGridViewRowCollection_AddUnboundRow); 1783throw new InvalidOperationException(SR.DataGridViewRowCollection_NoColumns); 2171throw new InvalidOperationException(SR.DataGridViewRowCollection_CannotDeleteNewRow); 2176throw new InvalidOperationException(SR.DataGridView_ForbiddenOperationInEventHandler); 2198throw new InvalidOperationException(SR.DataGridViewRowCollection_CantRemoveRowsWithWrongSource);
System\Windows\Forms\Controls\DataGridView\DataGridViewRowCollection.RowComparer.cs (1)
79throw new InvalidOperationException();
System\Windows\Forms\Controls\DataGridView\DataGridViewRowCollection.UnsharingRowEnumerator.cs (2)
58throw new InvalidOperationException(SR.DataGridViewRowCollection_EnumNotStarted); 63throw new InvalidOperationException(SR.DataGridViewRowCollection_EnumFinished);
System\Windows\Forms\Controls\DataGridView\DataGridViewRowHeaderCell.DataGridViewRowHeaderCellAccessibleObject.cs (8)
24throw new InvalidOperationException(SR.DataGridViewCellAccessibleObject_OwnerNotSet); 51throw new InvalidOperationException(SR.DataGridViewCellAccessibleObject_OwnerNotSet); 75throw new InvalidOperationException(SR.DataGridViewCellAccessibleObject_OwnerNotSet); 90throw new InvalidOperationException(SR.DataGridViewCellAccessibleObject_OwnerNotSet); 122throw new InvalidOperationException(SR.DataGridViewCellAccessibleObject_OwnerNotSet); 138throw new InvalidOperationException(SR.DataGridViewCellAccessibleObject_OwnerNotSet); 209throw new InvalidOperationException(SR.DataGridViewCellAccessibleObject_OwnerNotSet); 249throw new InvalidOperationException(SR.DataGridViewCellAccessibleObject_OwnerNotSet);
System\Windows\Forms\Controls\DataGridView\DataGridViewRowPostPaintEventArgs.cs (5)
66throw new InvalidOperationException(SR.DataGridViewElementPaintingEventArgs_RowIndexOutOfRange); 83throw new InvalidOperationException(SR.DataGridViewElementPaintingEventArgs_RowIndexOutOfRange); 101throw new InvalidOperationException(SR.DataGridViewElementPaintingEventArgs_RowIndexOutOfRange); 125throw new InvalidOperationException(SR.DataGridViewElementPaintingEventArgs_RowIndexOutOfRange); 154throw new InvalidOperationException(SR.DataGridViewElementPaintingEventArgs_RowIndexOutOfRange);
System\Windows\Forms\Controls\DataGridView\DataGridViewRowPrePaintEventArgs.cs (5)
83throw new InvalidOperationException(SR.DataGridViewElementPaintingEventArgs_RowIndexOutOfRange); 100throw new InvalidOperationException(SR.DataGridViewElementPaintingEventArgs_RowIndexOutOfRange); 118throw new InvalidOperationException(SR.DataGridViewElementPaintingEventArgs_RowIndexOutOfRange); 142throw new InvalidOperationException(SR.DataGridViewElementPaintingEventArgs_RowIndexOutOfRange); 171throw new InvalidOperationException(SR.DataGridViewElementPaintingEventArgs_RowIndexOutOfRange);
System\Windows\Forms\Controls\DataGridView\DataGridViewTextBoxCell.cs (1)
124throw new InvalidOperationException();
System\Windows\Forms\Controls\DataGridView\DataGridViewTextBoxColumn.cs (1)
45throw new InvalidOperationException(SR.DataGridViewColumn_CellTemplateRequired);
System\Windows\Forms\Controls\DataGridView\DataGridViewTopLeftHeaderCell.DataGridViewTopLeftHeaderCellAccessibleObject.cs (8)
24throw new InvalidOperationException(SR.DataGridViewCellAccessibleObject_OwnerNotSet); 43throw new InvalidOperationException(SR.DataGridViewCellAccessibleObject_OwnerNotSet); 63throw new InvalidOperationException(SR.DataGridViewCellAccessibleObject_OwnerNotSet); 107throw new InvalidOperationException(SR.DataGridViewCellAccessibleObject_OwnerNotSet); 151throw new InvalidOperationException(SR.DataGridViewCellAccessibleObject_OwnerNotSet); 195throw new InvalidOperationException(SR.DataGridViewCellAccessibleObject_OwnerNotSet); 249throw new InvalidOperationException(SR.DataGridViewCellAccessibleObject_OwnerNotSet); 266throw new InvalidOperationException(SR.DataGridViewCellAccessibleObject_OwnerNotSet);
System\Windows\Forms\Controls\ImageList\ImageList.cs (2)
354return index == -1 ? throw new InvalidOperationException(SR.ImageListAddFailed) : index; 390return index == -1 ? throw new InvalidOperationException(SR.ImageListAddFailed) : index;
System\Windows\Forms\Controls\ImageList\ImageList.ImageCollection.cs (2)
173throw new InvalidOperationException(SR.ImageListReplaceFailed); 550throw new InvalidOperationException(SR.ImageListRemoveFailed);
System\Windows\Forms\Controls\ImageList\ImageList.NativeImageList.cs (2)
59throw new InvalidOperationException(SR.ImageListCreateFailed); 109throw new InvalidOperationException(SR.ImageListDuplicateFailed);
System\Windows\Forms\Controls\ImageList\ImageList.Original.cs (1)
34throw new InvalidOperationException(SR.ImageListEntryType);
System\Windows\Forms\Controls\ImageList\ImageListStreamer.cs (3)
82throw new InvalidOperationException(SR.ImageListStreamerLoadFailed); 94throw new InvalidOperationException(SR.ImageListStreamerSaveFailed); 105throw new InvalidOperationException(SR.ImageListStreamerSaveFailed);
System\Windows\Forms\Controls\Labels\LinkLabel.cs (2)
1672throw new InvalidOperationException(SR.LinkLabelOverlap); 1684throw new InvalidOperationException(SR.LinkLabelOverlap);
System\Windows\Forms\Controls\ListBoxes\ListBox.cs (1)
2151throw new InvalidOperationException(SR.ListBoxInvalidSelectionMode);
System\Windows\Forms\Controls\ListBoxes\ListBox.IntegerCollection.CustomTabOffsetsEnumerator.cs (1)
64throw new InvalidOperationException(SR.ListEnumCurrentOutOfRange);
System\Windows\Forms\Controls\ListBoxes\ListBox.SelectedIndexCollection.SelectedIndexEnumerator.cs (1)
64throw new InvalidOperationException(SR.ListEnumCurrentOutOfRange);
System\Windows\Forms\Controls\ListControl\ListControl.cs (1)
374throw new InvalidOperationException(SR.ListControlEmptyValueMemberInSettingSelectedValue);
System\Windows\Forms\Controls\ListView\ListView.CheckedListViewItemCollection.cs (12)
37throw new InvalidOperationException(SR.ListViewCantAccessCheckedItemsCollectionWhenInVirtualMode); 71throw new InvalidOperationException(SR.ListViewCantAccessCheckedItemsCollectionWhenInVirtualMode); 85throw new InvalidOperationException(SR.ListViewCantAccessCheckedItemsCollectionWhenInVirtualMode); 105throw new InvalidOperationException(SR.ListViewCantAccessCheckedItemsCollectionWhenInVirtualMode); 163throw new InvalidOperationException(SR.ListViewCantAccessCheckedItemsCollectionWhenInVirtualMode); 180throw new InvalidOperationException(SR.ListViewCantAccessCheckedItemsCollectionWhenInVirtualMode); 200throw new InvalidOperationException(SR.ListViewCantAccessCheckedItemsCollectionWhenInVirtualMode); 210throw new InvalidOperationException(SR.ListViewCantAccessCheckedItemsCollectionWhenInVirtualMode); 232throw new InvalidOperationException(SR.ListViewCantAccessCheckedItemsCollectionWhenInVirtualMode); 277throw new InvalidOperationException(SR.ListViewCantAccessCheckedItemsCollectionWhenInVirtualMode); 319throw new InvalidOperationException(SR.ListViewCantAccessCheckedItemsCollectionWhenInVirtualMode); 332throw new InvalidOperationException(SR.ListViewCantAccessCheckedItemsCollectionWhenInVirtualMode);
System\Windows\Forms\Controls\ListView\ListView.cs (12)
1718throw new InvalidOperationException(SR.ListViewGetTopItem); 1733throw new InvalidOperationException(SR.ListViewSetTopItem); 1929throw new InvalidOperationException(SR.ListViewVirtualListViewRequiresNoItems); 1934throw new InvalidOperationException(SR.ListViewVirtualListViewRequiresNoCheckedItems); 1939throw new InvalidOperationException(SR.ListViewVirtualListViewRequiresNoSelectedItems); 3229throw new InvalidOperationException(SR.ListViewFindNearestItemWorksOnlyInIconView); 3840throw new InvalidOperationException(SR.ListViewAddColumnFailed); 4218throw new InvalidOperationException(SR.ListViewAddItemFailed); 5289throw new InvalidOperationException(SR.ListViewColumnInfoSet); 5584throw new InvalidOperationException(SR.ListViewSortNotAllowedInVirtualListView); 6826ListViewItem lvItem = rVI.Item ?? throw new InvalidOperationException(SR.ListViewVirtualItemRequired); 6840throw new InvalidOperationException(SR.ListViewVirtualModeCantAccessSubItem);
System\Windows\Forms\Controls\ListView\ListView.ListViewItemCollection.cs (1)
310throw new InvalidOperationException(SR.ListViewCantGetEnumeratorInVirtualMode);
System\Windows\Forms\Controls\ListView\ListView.ListViewNativeItemCollection.cs (7)
43throw new InvalidOperationException(SR.ListViewCantModifyTheItemCollInAVirtualListView); 73return !throwInVirtualMode ? null : throw new InvalidOperationException(SR.ListViewVirtualItemRequired); 101throw new InvalidOperationException(SR.ListViewCantAddItemsToAVirtualListView); 134throw new InvalidOperationException(SR.ListViewCantAddItemsToAVirtualListView); 339throw new InvalidOperationException(SR.ListViewCantAddItemsToAVirtualListView); 386throw new InvalidOperationException(SR.ListViewCantRemoveItemsFromAVirtualListView); 399throw new InvalidOperationException(SR.ListViewCantRemoveItemsFromAVirtualListView);
System\Windows\Forms\Controls\ListView\ListView.SelectedIndexCollection.cs (1)
70throw new InvalidOperationException(SR.SelectedNotEqualActual);
System\Windows\Forms\Controls\ListView\ListView.SelectedListViewItemCollection.cs (14)
53throw new InvalidOperationException(SR.SelectedNotEqualActual); 89throw new InvalidOperationException(SR.ListViewCantAccessSelectedItemsCollectionWhenInVirtualMode); 117throw new InvalidOperationException(SR.ListViewCantAccessSelectedItemsCollectionWhenInVirtualMode); 157throw new InvalidOperationException(SR.ListViewCantAccessSelectedItemsCollectionWhenInVirtualMode); 185throw new InvalidOperationException(SR.ListViewCantAccessSelectedItemsCollectionWhenInVirtualMode); 268throw new InvalidOperationException(SR.ListViewCantAccessSelectedItemsCollectionWhenInVirtualMode); 285throw new InvalidOperationException(SR.ListViewCantAccessSelectedItemsCollectionWhenInVirtualMode); 295throw new InvalidOperationException(SR.ListViewCantAccessSelectedItemsCollectionWhenInVirtualMode); 305throw new InvalidOperationException(SR.ListViewCantAccessSelectedItemsCollectionWhenInVirtualMode); 322throw new InvalidOperationException(SR.ListViewCantAccessSelectedItemsCollectionWhenInVirtualMode); 335throw new InvalidOperationException(SR.ListViewCantAccessSelectedItemsCollectionWhenInVirtualMode); 353throw new InvalidOperationException(SR.ListViewCantAccessSelectedItemsCollectionWhenInVirtualMode); 372throw new InvalidOperationException(SR.ListViewCantAccessSelectedItemsCollectionWhenInVirtualMode); 392throw new InvalidOperationException(SR.ListViewCantAccessSelectedItemsCollectionWhenInVirtualMode);
System\Windows\Forms\Controls\ListView\ListViewGroup.cs (1)
413throw new InvalidOperationException(nameof(ListView));
System\Windows\Forms\Controls\ListView\ListViewGroup.ListViewGroupAccessibleObject.cs (1)
26?? throw new InvalidOperationException(nameof(_owningListView.AccessibilityObject));
System\Windows\Forms\Controls\ListView\ListViewGroupCollection.cs (1)
308throw new InvalidOperationException(SR.ListViewCannotAddGroupsToVirtualListView);
System\Windows\Forms\Controls\ListView\ListViewItem.cs (3)
252?? throw new InvalidOperationException(SR.ListViewItemAccessibilityObjectRequiresListView); 264_ => throw new InvalidOperationException() 872throw new InvalidOperationException(SR.ListViewBeginEditFailed);
System\Windows\Forms\Controls\ListView\ListViewItem.ListViewItemBaseAccessibleObject.cs (3)
29_owningListView = owningItem.ListView ?? owningItem.Group?.ListView ?? throw new InvalidOperationException(nameof(owningItem.ListView)); 153throw new InvalidOperationException(string.Format(SR.ListViewItemAccessibilityObjectInvalidViewException, View.ToString())); 165throw new InvalidOperationException(string.Format(SR.ListViewItemAccessibilityObjectInvalidViewException, View.ToString()));
System\Windows\Forms\Controls\ListView\ListViewItem.ListViewItemDetailsAccessibleObject.cs (2)
48throw new InvalidOperationException(string.Format(SR.ListViewItemAccessibilityObjectInvalidViewException, nameof(View.Details))); 75throw new InvalidOperationException(string.Format(SR.ListViewItemAccessibilityObjectInvalidViewException, nameof(View.Details)));
System\Windows\Forms\Controls\ListView\ListViewItem.ListViewItemTileAccessibleObject.cs (2)
42throw new InvalidOperationException(string.Format(SR.ListViewItemAccessibilityObjectInvalidViewException, nameof(View.Tile))); 68throw new InvalidOperationException(string.Format(SR.ListViewItemAccessibilityObjectInvalidViewException, nameof(View.Tile)));
System\Windows\Forms\Controls\ListView\ListViewItem.ListViewItemWithImageAccessibleObject.cs (2)
50throw new InvalidOperationException(string.Format(SR.ListViewItemAccessibilityObjectInvalidViewException, View.ToString())); 70throw new InvalidOperationException(string.Format(SR.ListViewItemAccessibilityObjectInvalidViewException, View.ToString()));
System\Windows\Forms\Controls\ListView\ListViewItem.ListViewSubItem.ListViewSubItemAccessibleObject.cs (1)
27_owningListView = owningItem.ListView ?? owningItem.Group?.ListView ?? throw new InvalidOperationException(nameof(owningItem.ListView));
System\Windows\Forms\Controls\ListView\ListViewItem.ListViewSubItemCollection.cs (1)
236throw new InvalidOperationException(SR.ErrorCollectionFull);
System\Windows\Forms\Controls\MonthCalendar\MonthCalendar.cs (2)
806throw new InvalidOperationException(SR.InvalidSingleMonthSize); 1746throw new InvalidOperationException(
System\Windows\Forms\Controls\PictureBox\PictureBox.cs (2)
462throw new InvalidOperationException(SR.PictureBoxNoImageLocation); 522throw new InvalidOperationException(SR.PictureBoxNoImageLocation);
System\Windows\Forms\Controls\ProgressBar\ProgressBar.cs (2)
574throw new InvalidOperationException(SR.ProgressBarIncrementMarqueeException); 645throw new InvalidOperationException(SR.ProgressBarPerformStepMarqueeException);
System\Windows\Forms\Controls\ProgressBar\ProgressBar.ProgressBarAccessibleObject.cs (1)
46=> throw new InvalidOperationException("Progress Bar is read-only.");
System\Windows\Forms\Controls\PropertyGrid\PropertyGrid.cs (5)
1622throw new InvalidOperationException("PERF REGRESSION - Creating item in grid view create"); 1984throw new InvalidOperationException(); 2082throw new InvalidOperationException(); 2421throw new InvalidOperationException(); 2468throw new InvalidOperationException();
System\Windows\Forms\Controls\PropertyGrid\PropertyGrid.PropertyTabCollection.cs (5)
50throw new InvalidOperationException(SR.PropertyGridPropertyTabCollectionReadOnly); 61throw new InvalidOperationException(SR.PropertyGridPropertyTabCollectionReadOnly); 71throw new InvalidOperationException(SR.PropertyGridPropertyTabCollectionReadOnly); 85throw new InvalidOperationException(SR.PropertyGridPropertyTabCollectionReadOnly); 126throw new InvalidOperationException(SR.PropertyGridPropertyTabCollectionReadOnly);
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\GridEntry.cs (3)
1513throw new InvalidOperationException(); 1679throw new InvalidOperationException(); 1791throw new InvalidOperationException();
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyDescriptorGridEntry.cs (3)
584throw new InvalidOperationException(); 653throw new InvalidOperationException(); 836throw new InvalidOperationException();
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.MouseHook.cs (1)
41throw new InvalidOperationException($"Finalizing an active mouse hook. This will crash the process. Calling stack: {_callingStack}");
System\Windows\Forms\Controls\RichTextBox\RichTextBox.cs (2)
2932throw new InvalidOperationException(SR.LoadTextError); 3023throw new InvalidOperationException(SR.SaveTextError);
System\Windows\Forms\Controls\TextBox\MaskedTextBox.cs (3)
849throw new InvalidOperationException(SR.MaskedTextBoxPasswordAndPromptCharError); 908throw new InvalidOperationException(SR.MaskedTextBoxPasswordAndPromptCharError); 1401throw new InvalidOperationException(SR.MaskedTextBoxPasswordAndPromptCharError);
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDownItem.cs (1)
715throw new InvalidOperationException(SR.ToolStripShowDropDownInvalidOperation);
System\Windows\Forms\Controls\ToolStrips\ToolStripDropTargetManager.cs (1)
184throw new InvalidOperationException(SR.DragDropRegFailed, e);
System\Windows\Forms\Controls\TreeView\TreeNode.cs (3)
467throw new InvalidOperationException(SR.TreeNodeNoParent); 1282throw new InvalidOperationException(SR.TreeNodeBeginEditFailed); 1828throw new InvalidOperationException(SR.InvalidCrossThreadControlCall);
System\Windows\Forms\Controls\WebBrowser\WebBrowser.cs (1)
1403return _axIWebBrowser2 ?? throw new InvalidOperationException(SR.WebBrowserNoCastToIWebBrowser2);
System\Windows\Forms\Controls\WebBrowser\WebBrowserSiteBase.cs (1)
202throw new InvalidOperationException(SR.AXWindowlessControl);
System\Windows\Forms\DataBinding\BindingSource.cs (10)
497throw new InvalidOperationException(SR.BindingSourceRecursionDetected); 1017throw new InvalidOperationException(SR.BindingSourceRemoveCurrentNotAllowed); 1022throw new InvalidOperationException(SR.BindingSourceRemoveCurrentNoCurrentItem); 1439throw new InvalidOperationException(SR.BindingSourceRecursionDetected); 1474throw new InvalidOperationException(SR.BindingSourceItemTypeMismatchOnAdd); 1479throw new InvalidOperationException(SR.BindingSourceItemTypeIsValueType); 1565throw new InvalidOperationException(SR.BindingSourceBindingListWrapperAddToReadOnlyList); 1570throw new InvalidOperationException(string.Format( 1609throw new InvalidOperationException(string.Format( 1658throw new InvalidOperationException(SR.NoAllowNewOnReadOnlyList);
System\Windows\Forms\DataBinding\CurrencyManager.cs (2)
393throw new InvalidOperationException(SR.ListManagerEmptyList); 512throw new InvalidOperationException(SR.DataBindingPushDataException);
System\Windows\Forms\Dialogs\CommonDialogs\CommonDialog.cs (1)
172throw new InvalidOperationException(SR.CantShowModalOnNonInteractive);
System\Windows\Forms\Dialogs\CommonDialogs\FileDialog.cs (1)
242throw new InvalidOperationException(SR.FileDialogInvalidFilterIndex);
System\Windows\Forms\Dialogs\CommonDialogs\OpenFileDialog.cs (3)
124throw new InvalidOperationException(string.Format(SR.FileDialogInvalidFileName, FileName)); 126throw new InvalidOperationException(SR.FileDialogSubLassFailure); 128throw new InvalidOperationException(SR.FileDialogBufferTooSmall);
System\Windows\Forms\Dialogs\CommonDialogs\SaveFileDialog.cs (1)
150throw new InvalidOperationException(string.Format(SR.FileDialogInvalidFileName, FileName));
System\Windows\Forms\Dialogs\MessageBox.cs (1)
55throw new InvalidOperationException(SR.CantShowModalOnNonInteractive);
System\Windows\Forms\Dialogs\TaskDialog\TaskDialog.cs (12)
218throw new InvalidOperationException(string.Format(SR.IllegalCrossThreadCall, nameof(TaskDialog))); 412?? throw new InvalidOperationException(SR.FormOrTaskDialog_NoSyncContextForShowAsync); 557throw new InvalidOperationException(string.Format(SR.TaskDialogInstanceAlreadyShown, nameof(TaskDialog))); 619throw new InvalidOperationException(string.Format( 1217throw new InvalidOperationException(string.Format( 1226throw new InvalidOperationException(SR.TaskDialogCannotNavigateWithinNavigationEventHandler); 1239throw new InvalidOperationException(SR.TaskDialogCannotNavigateClosedDialog); 1262throw new InvalidOperationException(SR.TaskDialogCannotNavigateClosedDialog); 1585throw new InvalidOperationException(); 1617throw new InvalidOperationException(SR.TaskDialogCannotSetPropertyOfShownDialog); 1627throw new InvalidOperationException(SR.TaskDialogCanUpdateStateOnlyWhenShown); 1641throw new InvalidOperationException(string.Format(
System\Windows\Forms\Dialogs\TaskDialog\TaskDialogButton.cs (4)
286throw new InvalidOperationException(SR.TaskDialogCannotSetTextForStandardButton); 298internal TaskDialogResult StandardButtonResult => _standardButtonResult ?? throw new InvalidOperationException(); 380throw new InvalidOperationException(); 410? throw new InvalidOperationException()
System\Windows\Forms\Dialogs\TaskDialog\TaskDialogButtonCollection.cs (1)
153throw new InvalidOperationException(SR.TaskDialogControlIsPartOfOtherCollection);
System\Windows\Forms\Dialogs\TaskDialog\TaskDialogControl.cs (2)
140throw new InvalidOperationException(SR.TaskDialogControlNotBound); 148throw new InvalidOperationException(SR.TaskDialogControlNotCreated);
System\Windows\Forms\Dialogs\TaskDialog\TaskDialogFootnote.cs (1)
127throw new InvalidOperationException(SR.TaskDialogCannotUpdateIconType);
System\Windows\Forms\Dialogs\TaskDialog\TaskDialogIcon.cs (2)
180public IntPtr IconHandle => _iconHandle ?? throw new InvalidOperationException(); 182internal TaskDialogStandardIcon StandardIcon => _standardIcon ?? throw new InvalidOperationException();
System\Windows\Forms\Dialogs\TaskDialog\TaskDialogPage.cs (18)
411throw new InvalidOperationException(SR.TaskDialogCannotUpdateIconType); 624throw new InvalidOperationException(SR.TaskDialogCannotNavigateWithoutDialog); 691throw new InvalidOperationException(SR.TaskDialogCannotSetPropertyOfBoundPage); 699throw new InvalidOperationException(string.Format( 709throw new InvalidOperationException(); 736throw new InvalidOperationException(); 747throw new InvalidOperationException(string.Format( 758throw new InvalidOperationException(string.Format( 771throw new InvalidOperationException(string.Format( 784throw new InvalidOperationException(SR.TaskDialogTooManyButtonsAdded); 789throw new InvalidOperationException(SR.TaskDialogOnlySingleRadioButtonCanBeChecked); 809throw new InvalidOperationException(SR.TaskDialogCannotShowCustomButtonsAndCommandLinks); 817throw new InvalidOperationException(SR.TaskDialogButtonTextMustNotBeNull); 822throw new InvalidOperationException(SR.TaskDialogRadioButtonTextMustNotBeNull); 828throw new InvalidOperationException(SR.TaskDialogDefaultButtonMustExistInCollection); 845throw new InvalidOperationException(); 966throw new InvalidOperationException(); 1001throw new InvalidOperationException();
System\Windows\Forms\Dialogs\TaskDialog\TaskDialogProgressBar.cs (1)
79throw new InvalidOperationException(
System\Windows\Forms\Dialogs\TaskDialog\TaskDialogRadioButton.cs (2)
156throw new InvalidOperationException(SR.TaskDialogCannotUncheckRadioButtonWhileBound); 206throw new InvalidOperationException(string.Format(
System\Windows\Forms\Dialogs\TaskDialog\TaskDialogRadioButtonCollection.cs (1)
153throw new InvalidOperationException(SR.TaskDialogControlIsPartOfOtherCollection);
System\Windows\Forms\Form.cs (17)
1772throw new InvalidOperationException(SR.FormScreenCaptureModeRequiresTopLevel); 3260throw new InvalidOperationException(string.Format(SR.ClosingWhileCreatingHandle, "Close")); 5125throw new InvalidOperationException(SR.TooManyResumeUpdateMenuHandles); 5465throw new InvalidOperationException(string.Format(SR.OwnsSelfOrOwner, nameof(Show))); 5470throw new InvalidOperationException(string.Format(SR.ShowDialogOnVisible, nameof(Show))); 5475throw new InvalidOperationException(string.Format(SR.ShowDialogOnDisabled, nameof(Show))); 5480throw new InvalidOperationException(string.Format(SR.ShowDialogOnNonTopLevel, nameof(Show))); 5485throw new InvalidOperationException(SR.CantShowModalOnNonInteractive); 5588throw new InvalidOperationException(SR.Form_HasAlreadyBeenShownAsync); 5600?? throw new InvalidOperationException(SR.FormOrTaskDialog_NoSyncContextForShowAsync); 5664throw new InvalidOperationException(string.Format(SR.ShowDialogOnVisible, nameof(ShowDialog))); 5669throw new InvalidOperationException(string.Format(SR.ShowDialogOnDisabled, nameof(ShowDialog))); 5674throw new InvalidOperationException(string.Format(SR.ShowDialogOnNonTopLevel, nameof(ShowDialog))); 5679throw new InvalidOperationException(string.Format(SR.ShowDialogOnModal, nameof(ShowDialog))); 5684throw new InvalidOperationException(SR.CantShowModalOnNonInteractive); 5899throw new InvalidOperationException(SR.Form_HasAlreadyBeenShownAsync); 5911?? throw new InvalidOperationException(SR.FormOrTaskDialog_NoSyncContextForShowAsync);
System\Windows\Forms\Input\Cursor.cs (1)
452? new InvalidOperationException(SR.InvalidPictureFormat)
System\Windows\Forms\Input\KeysConverter.cs (1)
91throw new InvalidOperationException(string.Format(SR.ResourceValueNotFound, resourceName));
System\Windows\Forms\Internal\ItemArray.EntryEnumerator.cs (3)
41throw new InvalidOperationException(SR.ListEnumVersionMismatch); 82throw new InvalidOperationException(SR.ListEnumVersionMismatch); 97throw new InvalidOperationException(SR.ListEnumCurrentOutOfRange);
System\Windows\Forms\Layout\Containers\SplitContainer.cs (2)
664throw new InvalidOperationException(SR.SplitterDistanceNotAllowed); 685throw new InvalidOperationException(SR.SplitterDistanceNotAllowed);
System\Windows\Forms\Layout\TableLayout.SorterObjectArray.cs (2)
39throw new InvalidOperationException(); 83throw new InvalidOperationException();
System\Windows\Forms\MDI\MDIClient.cs (3)
297throw new InvalidOperationException(SR.ErrorSettingWindowRegion); 302throw new InvalidOperationException(SR.ErrorSettingWindowRegion); 307throw new InvalidOperationException(SR.ErrorSettingWindowRegion);
System\Windows\Forms\NativeWindow.cs (3)
390throw new InvalidOperationException(SR.HandleAlreadyExists); 779throw new InvalidOperationException(SR.ApplicationCannotChangeApplicationExceptionMode); 784throw new InvalidOperationException(SR.ApplicationCannotChangeThreadExceptionMode);
System\Windows\Forms\Panels\TableLayoutPanel\TableLayoutSettingsTypeConverter.cs (1)
78throw new InvalidOperationException(SR.TableLayoutSettingsConverterNoName);
System\Windows\Forms\Rendering\GdiCache.cs (1)
73throw new InvalidOperationException(string.Format(SR.InvalidHdcType, type));
System\Windows\Forms\Scrolling\ScrollableControl.cs (1)
859throw new InvalidOperationException(SR.ScrollableControlActiveControlParentNull);
System\Windows\Forms\SendKeys\SendKeys.cs (3)
312throw new InvalidOperationException(); 323throw new InvalidOperationException(); 912throw new InvalidOperationException(SR.SendKeysNoMessageLoop);
System\Windows\Forms\ToolTip\ToolTip.cs (1)
839throw new InvalidOperationException(SR.ToolTipAddFailed);
System\Windows\Forms\VisualStyles\VisualStyleRenderer.cs (4)
89throw new InvalidOperationException(VisualStyleInformation.IsEnabledByUser 174? throw new InvalidOperationException(VisualStyleInformation.IsEnabledByUser 868return htheme.IsNull ? throw new InvalidOperationException(SR.VisualStyleHandleCreationFailed) : htheme; 892? throwExceptionOnFail ? throw new InvalidOperationException(SR.VisualStyleHandleCreationFailed) : null
System\Windows\Forms\WindowSubclassHandler.cs (2)
91throw new InvalidOperationException(); 198throw new InvalidOperationException(SR.WindowSubclassHandlerWndProcIsNotExceptedOne);
System.Windows.Forms.Design (86)
System\ComponentModel\Design\ArrayEditor.cs (1)
26return type is null ? throw new InvalidOperationException() : type;
System\ComponentModel\Design\CollectionEditor.CollectionEditorCollectionForm.cs (1)
897throw new InvalidOperationException(string.Format(SR.CollectionEditorCantRemoveItem, GetDisplayText(item)));
System\ComponentModel\Design\CollectionEditor.cs (1)
121throw new InvalidOperationException(
System\ComponentModel\Design\ComponentDesigner.cs (2)
172public IComponent Component => _component ?? throw new InvalidOperationException("Designer is not initialized"); 564ISite componentSite = Component.Site ?? throw new InvalidOperationException("Component should have a site");
System\ComponentModel\Design\ComponentDesigner.ShadowPropertyCollection.cs (1)
85PropertyDescriptor shadowedPropertyDescriptor = GetShadowedPropertyDescriptor(propertyName) ?? throw new InvalidOperationException("Failed to retrieve the shadowed PropertyDescriptor");
System\ComponentModel\Design\DesignerActionMethodItem.cs (2)
113throw new InvalidOperationException(); 120throw new InvalidOperationException(string.Format(SR.DesignerActionPanel_CouldNotFindMethod, MemberName));
System\ComponentModel\Design\DesignerActionPanel.cs (1)
670?? throw new InvalidOperationException(string.Format(
System\ComponentModel\Design\DesignerHost.cs (12)
187throw new InvalidOperationException(SR.DesignerHostUnloading) 196throw new InvalidOperationException(string.Format( 250throw new InvalidOperationException(string.Format(SR.DesignerHostNoTopLevelDesigner, component.GetType().FullName)) 277throw new InvalidOperationException(SR.DesignerHostDesignerNeedsComponent); 310throw new InvalidOperationException(SR.DesignerHostLoaderSpecified) 352e = new InvalidOperationException(string.Format(SR.DesignSurfaceFatalError, e), e); 425throw new InvalidOperationException(SR.DesignSurfaceContainerDispose); 952throw new InvalidOperationException(); 964throw new InvalidOperationException(string.Format(SR.DesignerHostFailedComponentCreate, componentType.Name)) 1003throw new InvalidOperationException(string.Format(SR.DesignerHostCantDestroyInheritedComponent, name)) 1067new InvalidOperationException(SR.DesignerHostNoBaseClass) 1098?? throw new InvalidOperationException("Root designer is null.");
System\ComponentModel\Design\DesignerHost.DesignerHostTransaction.cs (2)
40throw new InvalidOperationException(string.Format(SR.DesignerHostNestedTransaction, Description, nestedDescription)); 73throw new InvalidOperationException(string.Format(SR.DesignerHostNestedTransaction, Description, nestedDescription));
System\ComponentModel\Design\DesignerHost.Site.cs (1)
241throw new InvalidOperationException(string.Format(SR.DesignerHostDuplicateName, value))
System\ComponentModel\Design\DesignSurface.cs (5)
140throw new InvalidOperationException(ex.Message, ex); 144throw new InvalidOperationException(o.ToString()); 150throw new InvalidOperationException(SR.DesignSurfaceNoRootComponent) 158throw new InvalidOperationException(SR.DesignSurfaceDesignerNotLoaded) 447Exception ex = new InvalidOperationException(SR.DesignSurfaceNoRootComponent)
System\ComponentModel\Design\DesignSurfaceServiceContainer.cs (1)
46throw new InvalidOperationException(string.Format(SR.DesignSurfaceServiceIsFixed, serviceType.Name));
System\ComponentModel\Design\EventBindingService.EventPropertyDescriptor.cs (3)
136throw new InvalidOperationException(string.Format(SR.EventBindingServiceEventReadOnly, Name)) 173throw new InvalidOperationException(SR.EventBindingServiceNoSite) 182throw new InvalidOperationException(string.Format(SR.EventBindingServiceMissingService, nameof(IDictionaryService)))
System\ComponentModel\Design\ReferenceService.cs (1)
81throw new InvalidOperationException();
System\ComponentModel\Design\Serialization\BasicDesignerLoader.cs (9)
87throw new InvalidOperationException(SR.BasicDesignerLoaderNotInitialized); 109throw new InvalidOperationException(SR.BasicDesignerLoaderNotInitialized); 118throw new InvalidOperationException(SR.BasicDesignerLoaderNotInitialized); 144Exception ex = new InvalidOperationException(SR.BasicDesignerLoaderAlreadyLoaded) 154Exception ex = new InvalidOperationException(SR.BasicDesignerLoaderDifferentHost) 372throw new InvalidOperationException(string.Format(SR.BasicDesignerLoaderMissingService, typeof(T).Name)) 862ex ??= new InvalidOperationException(lastError.ToString()); 902throw new InvalidOperationException(); 922throw new InvalidOperationException();
System\ComponentModel\Design\Serialization\CodeDomComponentSerializationService.CodeDomSerializationStore.cs (1)
92throw new InvalidOperationException(SR.CodeDomComponentSerializationServiceClosedStore);
System\ComponentModel\Design\Serialization\CodeDomComponentSerializationService.cs (7)
65throw new InvalidOperationException(SR.CodeDomComponentSerializationServiceUnknownStore); 82throw new InvalidOperationException(SR.CodeDomComponentSerializationServiceUnknownStore); 101throw new InvalidOperationException(SR.CodeDomComponentSerializationServiceUnknownStore); 125throw new InvalidOperationException(SR.CodeDomComponentSerializationServiceUnknownStore); 141throw new InvalidOperationException(SR.CodeDomComponentSerializationServiceUnknownStore); 158throw new InvalidOperationException(SR.CodeDomComponentSerializationServiceUnknownStore); 179throw new InvalidOperationException(SR.CodeDomComponentSerializationServiceUnknownStore);
System\ComponentModel\Design\Serialization\CodeDomDesignerLoader.cs (5)
282throw new InvalidOperationException(string.Format(SR.CodeDomDesignerLoaderSerializerTypeNotFirstType, typeDeclaration.Name)); 300throw new InvalidOperationException(string.Format(SR.CodeDomDesignerLoaderSerializerTypeNotFirstType, typeDeclaration.Name)); 353ex = new InvalidOperationException(string.Format(SR.CodeDomDesignerLoaderNoRootSerializerWithFailures, builder)) 360ex = new InvalidOperationException(SR.CodeDomDesignerLoaderNoRootSerializer) 600throw new InvalidOperationException(SR.CodeDomDesignerLoaderNoTypeResolution);
System\ComponentModel\Design\Serialization\DesignerSerializationManager.cs (3)
196throw new InvalidOperationException(SR.SerializationManagerWithinSession); 207throw new InvalidOperationException(SR.SerializationManagerNoSession); 411throw new InvalidOperationException(SR.SerializationManagerAlreadyInSession);
System\ComponentModel\Design\Serialization\StatementContext.cs (3)
65throw new InvalidOperationException(); 214throw new InvalidOperationException(); 219throw new InvalidOperationException();
System\ComponentModel\Design\Serialization\TypeCodeDomSerializer.cs (3)
111?? throw new InvalidOperationException(); 498?? throw new InvalidOperationException(); 520?? throw new InvalidOperationException();
System\ComponentModel\Design\UndoEngine.cs (1)
288Exception ex = new InvalidOperationException(string.Format(SR.UndoEngineMissingService, serviceType.Name))
System\Drawing\Design\ToolboxItem.cs (1)
208throw new InvalidOperationException(SR.ToolboxItemLocked);
System\Windows\Forms\Design\Behavior\BehaviorService.cs (1)
391throw new InvalidOperationException();
System\Windows\Forms\Design\Behavior\ToolStripPanelSelectionGlyph.cs (1)
192throw new InvalidOperationException(SR.ToolStripPanelGlyphUnsupportedDock);
System\Windows\Forms\Design\ControlDesigner.cs (3)
676throw new InvalidOperationException(); 753throw new InvalidOperationException(); 2504InvalidOperationException wrapper = new(
System\Windows\Forms\Design\DataGridViewCellStyleEditor.cs (1)
20throw new InvalidOperationException($"Service provider couldn't fetch {nameof(IWindowsFormsEditorService)}.");
System\Windows\Forms\Design\DataGridViewColumnCollectionDialog.cs (1)
80?? throw new InvalidOperationException());
System\Windows\Forms\Design\DataGridViewDesigner.cs (2)
395throw new InvalidOperationException(SR.DataGridViewDataSourceNoLongerValid, ex); 572throw new InvalidOperationException(SR.DataGridViewDataSourceNoLongerValid, ex);
System\Windows\Forms\Design\DesignBindingPicker.cs (1)
163?? throw new InvalidOperationException());
System\Windows\Forms\Design\DesignerToolStripControlHost.cs (2)
41throw new InvalidOperationException(); 49throw new InvalidOperationException();
System\Windows\Forms\Design\ListAdapter.cs (1)
22get => (T?)_list[index] ?? throw new InvalidOperationException();
System\Windows\Forms\Design\OleDragDropHandler.ComponentDataObject.cs (1)
288throw new InvalidOperationException(SR.DragDropSetDataError);
System\Windows\Forms\Design\SelectionUIService.cs (4)
924throw new InvalidOperationException(); 1069throw new InvalidOperationException(SR.DesignerBeginDragNotCalled); 1115throw new InvalidOperationException(); 1235throw new InvalidOperationException();
System\Windows\Forms\Design\VsPropertyGrid.cs (1)
24BitmapSelector.GetResourceStream(typeof(PropertyGrid), resourceName) ?? throw new InvalidOperationException(),
System.Windows.Forms.Design.Tests (30)
System\ComponentModel\Design\CollectionFormTests.cs (1)
728InvalidOperationException exception = new();
System\ComponentModel\Design\ComponentDesignerTests.cs (2)
1317.Throws(new InvalidOperationException()) 1399.Throws(new InvalidOperationException())
System\ComponentModel\Design\DesignerActionMethodItemTests.cs (2)
255throw new InvalidOperationException(); 260throw new InvalidOperationException();
System\ComponentModel\Design\DesignerHostTests.cs (6)
2191yield return new object[] { null, true, new object[] { new InvalidOperationException() } }; 2196yield return new object[] { null, false, new object[] { new InvalidOperationException() } }; 2201yield return new object[] { string.Empty, true, new object[] { new InvalidOperationException() } }; 2206yield return new object[] { string.Empty, false, new object[] { new InvalidOperationException() } }; 2210yield return new object[] { "baseClassName", true, new object[] { new InvalidOperationException() } }; 2214yield return new object[] { "baseClassName", false, new object[] { new InvalidOperationException() } };
System\ComponentModel\Design\DesignSurfaceTests.cs (6)
353InvalidOperationException exception = new(); 367yield return new object[] { new object[] { new InvalidOperationException() } }; 434InvalidOperationException exception = new(); 480InvalidOperationException exception = new(); 582.Throws(new InvalidOperationException()) 909throw new InvalidOperationException();
System\ComponentModel\Design\ExceptionCollectionTests.cs (3)
18yield return new object[] { new ArrayList { new InvalidOperationException(), new InvalidOperationException(), new InvalidOperationException() } };
System\ComponentModel\Design\Serialization\CodeDomSerializerExceptionTests.cs (3)
34yield return new object[] { new InvalidOperationException(), new CodeLinePragma() }; 68yield return new object[] { new InvalidOperationException(), mockDesignerSerializationManager.Object }; 86Assert.Throws<ArgumentNullException>("manager", () => new CodeDomSerializerException(new InvalidOperationException(), (IDesignerSerializationManager)null));
System\Drawing\Design\ToolboxItemTests.cs (4)
557.Throws(new InvalidOperationException()); 560.Throws(new InvalidOperationException()); 876.Throws(new InvalidOperationException()); 879.Throws(new InvalidOperationException());
System\Resources\Tools\CodeDomCompileHelper.cs (1)
55throw new InvalidOperationException(string.Join('\n', result.Diagnostics.Select(d => d.GetMessage())));
System\Windows\Forms\Design\ToolStripEditorManagerTests.cs (2)
49?? throw new InvalidOperationException("ToolStripEditorControl type not found."); 52?? throw new InvalidOperationException("Constructor for ToolStripEditorControl not found.");
System.Windows.Forms.IntegrationTests.Common (1)
TestHelpers.cs (1)
202throw new InvalidOperationException("global.json does not contain a tools:dotnet version");
System.Windows.Forms.Primitives (5)
System\Drawing\ImageExtensions.cs (1)
55throw new InvalidOperationException(nameof(type));
System\ServiceExtensions.cs (1)
88?? throw new InvalidOperationException(string.Format(SR.General_MissingService, typeof(TInterface).FullName))
System\Windows\Forms\SinglyLinkedList.cs (2)
142throw new InvalidOperationException(); 188throw new InvalidOperationException();
Windows\Win32\UI\Shell\FolderBrowserHelper.cs (1)
30throw new InvalidOperationException(SR.FolderBrowserDialogNoRootFolder);
System.Windows.Forms.Primitives.TestUtilities (2)
Metafiles\Validators\RepeatValidator.cs (1)
24throw new InvalidOperationException();
PlatformDetection.Windows.cs (1)
117_ => throw new InvalidOperationException($"Failed to get AppId, result was {result}."),
System.Windows.Forms.Tests (13)
ExceptionHandlingTests.cs (1)
30throw new InvalidOperationException();
System\Windows\Forms\BinaryFormat\WinFormsBinaryFormattedObjectTests.cs (2)
101return result ?? throw new InvalidOperationException(); 115throw new InvalidOperationException();
System\Windows\Forms\BindingCompleteEventArgsTests.cs (2)
51yield return new object[] { new Binding(null, new object(), "member"), BindingCompleteState.DataError, BindingCompleteContext.DataSourceUpdate, "errorText", new InvalidOperationException() }; 70yield return new object[] { new Binding(null, new object(), "member"), BindingCompleteState.DataError, BindingCompleteContext.DataSourceUpdate, "errorText", new InvalidOperationException(), true };
System\Windows\Forms\BindingManagerDataErrorEventArgsTests.cs (1)
13yield return new object[] { new InvalidOperationException() };
System\Windows\Forms\DataGridViewDataErrorEventArgsTests.cs (3)
14yield return new object[] { new InvalidOperationException(), 0, 0, DataGridViewDataErrorContexts.Formatting }; 15yield return new object[] { new InvalidOperationException(), 1, 2, DataGridViewDataErrorContexts.Formatting }; 48DataGridViewDataErrorEventArgs e = new(new InvalidOperationException(), 1, 2, DataGridViewDataErrorContexts.Formatting) { ThrowException = value };
System\Windows\Forms\DataGridViewElementTests.cs (2)
256yield return new object[] { new DataGridViewDataErrorEventArgs(new InvalidOperationException(), 1, 2, DataGridViewDataErrorContexts.Formatting) }; 270DataGridViewDataErrorEventArgs eventArgs = new(new InvalidOperationException(), 1, 2, DataGridViewDataErrorContexts.Formatting);
System\Windows\Forms\FeatureSupportTests.cs (1)
177throw new InvalidOperationException();
System\Windows\Forms\ListControlTests.cs (1)
3064throw new InvalidOperationException();
System.Windows.Forms.UI.IntegrationTests (9)
DataGridViewTests.cs (1)
83throw new InvalidOperationException(ex.Message);
DesignBehaviorsTests.cs (1)
30throw new InvalidOperationException(e.Exception.Message, e.Exception);
ImageListTests.cs (1)
55throw new InvalidOperationException("Unexpected GDI handle count increase during cleanup.");
Infra\ControlTestBase.cs (2)
312throw new InvalidOperationException("Not reachable"); 358throw new InvalidOperationException("Not reachable");
Infra\DenyExecutionSynchronizationContext.cs (2)
31private static void MainThreadStart() => throw new InvalidOperationException("This thread should never be started."); 88throw new InvalidOperationException("Tests cannot use SwitchToMainThreadAsync unless they are marked with ApartmentState.STA.");
Infra\ScreenRecordService.cs (1)
416throw new InvalidOperationException();
Infra\SendInput.cs (1)
92throw new InvalidOperationException(message);
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)
51throw new InvalidOperationException(); 76throw new InvalidOperationException("Opening bracket character cannot be the same as closing bracket character."); 80throw new InvalidOperationException("Bracket characters cannot be alpha-numeric or whitespace."); 84throw new InvalidOperationException("Bracket characters cannot be one of the following: '=' , ',', '\'', '\"', '{ ', ' }', '\\'");
src\Microsoft.DotNet.Wpf\src\Shared\MS\Utility\FrugalList.cs (2)
1789throw new InvalidOperationException(SR.FrugalList_CannotPromoteBeyondArray); 2169throw new InvalidOperationException(SR.FrugalList_CannotPromoteBeyondArray);
src\Microsoft.DotNet.Wpf\src\Shared\System\Windows\Markup\ReflectionHelper.cs (1)
425throw new InvalidOperationException(SR.Format(SR.ParserAssemblyLoadVersionMismatch, request, found));
System\Windows\Markup\ArrayExtension.cs (2)
84throw new InvalidOperationException(SR.MarkupExtensionArrayType); 96throw new InvalidOperationException(SR.Format(SR.MarkupExtensionArrayBadType, Type.Name));
System\Windows\Markup\NameReferenceConverter.cs (3)
31throw new InvalidOperationException(SR.MissingNameResolver); 37throw new InvalidOperationException(SR.MustHaveName); 72throw new InvalidOperationException(SR.MissingNameProvider);
System\Windows\Markup\Reference.cs (2)
30throw new InvalidOperationException(SR.MissingNameResolver); 35throw new InvalidOperationException(SR.MustHaveName);
System\Windows\Markup\StaticExtension.cs (1)
51throw new InvalidOperationException(SR.MarkupExtensionStaticMember);
System\Windows\Markup\TypeExtension.cs (3)
63throw new InvalidOperationException(SR.MarkupExtensionTypeName); 71throw new InvalidOperationException(SR.Format(SR.MarkupExtensionNoContext, GetType().Name, nameof(IXamlTypeResolver))); 78throw new InvalidOperationException(SR.Format(SR.MarkupExtensionTypeNameBad, _typeName));
System\Xaml\AttachablePropertyServices.cs (1)
198throw new InvalidOperationException(SR.DefaultAttachablePropertyStoreCannotAddInstance);
System\Xaml\Context\ObjectWriterContext.cs (1)
883throw new InvalidOperationException(SR.NameScopeOnRootInstance);
System\Xaml\Context\ServiceProviderContext.cs (1)
123set { throw new InvalidOperationException(SR.MustNotCallSetter); }
System\Xaml\InfosetObjects\XamlObjectWriter.cs (1)
1087throw new InvalidOperationException(SR.Format(SR.ObjectWriterTypeNotAllowed,
System\Xaml\Parser\NodeStreamSorter.cs (2)
304throw new InvalidOperationException("premature end of stream before EoA"); 367throw new InvalidOperationException("premature end of stream after EoA");
System\Xaml\XamlBackgroundReader.cs (1)
87throw new InvalidOperationException(SR.ThreadAlreadyStarted);
System\Xaml\XamlMarkupExtensionWriter.cs (9)
136throw 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); 607throw new InvalidOperationException(SR.XamlMarkupExtensionWriterInputInvalid); 614throw new InvalidOperationException(SR.XamlMarkupExtensionWriterInputInvalid);
System\Xaml\XamlObjectReader.cs (4)
311throw new InvalidOperationException(SR.ExpectedObjectMarkupInfo); 908throw new InvalidOperationException(SR.Format(SR.AttachedPropertyOnTypeConvertedOrStringProperty, property.Name, value.ToString(), props[0].Key.ToString())); 912throw new InvalidOperationException(SR.Format(SR.AttachedPropertyOnDictionaryKey, value.ToString(), props[0].Key.ToString())); 2949throw new InvalidOperationException(SR.Format(SR.XamlFactoryInvalidXamlNode, reader.NodeType));
System\Xaml\XamlTypeName.cs (3)
206throw new InvalidOperationException(SR.XamlTypeNameNamespaceIsNull); 211throw new InvalidOperationException(SR.XamlTypeNameNameIsNullOrEmpty); 225throw new InvalidOperationException(SR.Format(SR.XamlTypeNameCannotGetPrefix, Namespace));
System\Xaml\XamlXmlWriter.cs (11)
398throw new InvalidOperationException(SR.Format(SR.PrefixNotInFrames, prefix)); 1041throw new InvalidOperationException(SR.Format(SR.XamlXmlWriterWriteNotSupportedInCurrentState, "WriteStartMember")); 1048throw new InvalidOperationException(SR.Format(SR.XamlXmlWriterWriteNotSupportedInCurrentState, "WriteStartMember")); 1092throw new InvalidOperationException(SR.Format(SR.XamlXmlWriterWriteNotSupportedInCurrentState, "WriteEndObject")); 1251throw new InvalidOperationException(SR.Format(SR.XamlXmlWriterWriteNotSupportedInCurrentState, "WriteValue")); 1288throw new InvalidOperationException(SR.Format(SR.WhiteSpaceInCollection, value, containingXamlType.Name)); 1387throw new InvalidOperationException(SR.XamlXmlWriterWriteObjectNotSupportedInCurrentState); 1399throw new InvalidOperationException(SR.XamlXmlWriterIsObjectFromMemberSetForArraysOrNonCollections); 1492throw new InvalidOperationException(SR.Format(SR.WhiteSpaceInCollection, writer.deferredValue, containingXamlType.Name)); 2040throw new InvalidOperationException(SR.Format(SR.XamlXmlWriterWriteNotSupportedInCurrentState, operation)); 2065throw new InvalidOperationException(SR.Format(SR.XamlXmlWriterWriteNotSupportedInCurrentState, "WriteGetObject"));
Templates.Blazor.Tests (21)
BlazorWasmTemplateTest.cs (1)
206throw new InvalidOperationException(
src\ProjectTemplates\Shared\AspNetProcess.cs (1)
239throw new InvalidOperationException(@$"Couldn't find listening url:
src\ProjectTemplates\Shared\DevelopmentCertificate.cs (3)
24?? throw new InvalidOperationException($"The aspnetcore-https.json file does not exist. Searched locations: {Environment.NewLine}{string.Join(Environment.NewLine, locations)}"); 28throw new InvalidOperationException($"The aspnetcore-https.json file does not contain valid JSON."); 34throw new InvalidOperationException($"The certificate file does not exist. Expected at: '{path}'.");
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)
97throw new InvalidOperationException($"Failed to find required templates in {packagesDir}. Please ensure the *Templates*.nupkg have been built."); 124throw new InvalidOperationException($"Couldn't find {templateName} as an option in {proc.Output}."); 140throw new InvalidOperationException($"Failed to uninstall previous templates. The template '{templateName}' could still be found.");
src\Shared\CertificateGeneration\CertificateManager.cs (5)
369throw new InvalidOperationException($"The directory '{exportDir}' does not exist. Choose permissions carefully when creating it."); 605throw new InvalidOperationException("Unknown format."); 791throw new InvalidOperationException($"'{nameof(RemoveLocations.Undefined)}' is not a valid location."); 803throw new InvalidOperationException("Invalid location."); 833throw new InvalidOperationException($"Failed to create a key with a size of {minimumKeySize} bits");
src\Shared\CertificateGeneration\MacOSCertificateManager.cs (4)
110throw new InvalidOperationException("There was an error trusting the certificate."); 265throw new InvalidOperationException($@"There was an error removing the certificate with thumbprint '{certificate.Thumbprint}'. 282throw new InvalidOperationException($"Can't determine the subject for the certificate with subject '{certificate.Subject}'."); 366throw 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)
447throw new InvalidOperationException($@"There was an error removing the certificate with thumbprint '{certificate.Thumbprint}'.");
src\Shared\CommandLineUtils\CommandLine\CommandLineApplication.cs (1)
124throw new InvalidOperationException(message);
Templates.Blazor.WebAssembly.Auth.Tests (27)
src\ProjectTemplates\Shared\AspNetProcess.cs (1)
239throw new InvalidOperationException(@$"Couldn't find listening url:
src\ProjectTemplates\Shared\DevelopmentCertificate.cs (3)
24?? throw new InvalidOperationException($"The aspnetcore-https.json file does not exist. Searched locations: {Environment.NewLine}{string.Join(Environment.NewLine, locations)}"); 28throw new InvalidOperationException($"The aspnetcore-https.json file does not contain valid JSON."); 34throw new InvalidOperationException($"The certificate file does not exist. Expected at: '{path}'.");
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)
97throw new InvalidOperationException($"Failed to find required templates in {packagesDir}. Please ensure the *Templates*.nupkg have been built."); 124throw new InvalidOperationException($"Couldn't find {templateName} as an option in {proc.Output}."); 140throw new InvalidOperationException($"Failed to uninstall previous templates. The template '{templateName}' could still be found.");
src\Shared\CertificateGeneration\CertificateManager.cs (5)
369throw new InvalidOperationException($"The directory '{exportDir}' does not exist. Choose permissions carefully when creating it."); 605throw new InvalidOperationException("Unknown format."); 791throw new InvalidOperationException($"'{nameof(RemoveLocations.Undefined)}' is not a valid location."); 803throw new InvalidOperationException("Invalid location."); 833throw new InvalidOperationException($"Failed to create a key with a size of {minimumKeySize} bits");
src\Shared\CertificateGeneration\MacOSCertificateManager.cs (4)
110throw new InvalidOperationException("There was an error trusting the certificate."); 265throw new InvalidOperationException($@"There was an error removing the certificate with thumbprint '{certificate.Thumbprint}'. 282throw new InvalidOperationException($"Can't determine the subject for the certificate with subject '{certificate.Subject}'."); 366throw 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)
447throw new InvalidOperationException($@"There was an error removing the certificate with thumbprint '{certificate.Thumbprint}'.");
src\Shared\CommandLineUtils\CommandLine\CommandLineApplication.cs (1)
124throw new InvalidOperationException(message);
src\Shared\E2ETesting\BrowserFixture.cs (1)
222throw 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)
148throw new InvalidOperationException("The assertion succeeded after the timeout.");
Templates.Blazor.WebAssembly.Tests (27)
src\ProjectTemplates\Shared\AspNetProcess.cs (1)
239throw new InvalidOperationException(@$"Couldn't find listening url:
src\ProjectTemplates\Shared\DevelopmentCertificate.cs (3)
24?? throw new InvalidOperationException($"The aspnetcore-https.json file does not exist. Searched locations: {Environment.NewLine}{string.Join(Environment.NewLine, locations)}"); 28throw new InvalidOperationException($"The aspnetcore-https.json file does not contain valid JSON."); 34throw new InvalidOperationException($"The certificate file does not exist. Expected at: '{path}'.");
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)
97throw new InvalidOperationException($"Failed to find required templates in {packagesDir}. Please ensure the *Templates*.nupkg have been built."); 124throw new InvalidOperationException($"Couldn't find {templateName} as an option in {proc.Output}."); 140throw new InvalidOperationException($"Failed to uninstall previous templates. The template '{templateName}' could still be found.");
src\Shared\CertificateGeneration\CertificateManager.cs (5)
369throw new InvalidOperationException($"The directory '{exportDir}' does not exist. Choose permissions carefully when creating it."); 605throw new InvalidOperationException("Unknown format."); 791throw new InvalidOperationException($"'{nameof(RemoveLocations.Undefined)}' is not a valid location."); 803throw new InvalidOperationException("Invalid location."); 833throw new InvalidOperationException($"Failed to create a key with a size of {minimumKeySize} bits");
src\Shared\CertificateGeneration\MacOSCertificateManager.cs (4)
110throw new InvalidOperationException("There was an error trusting the certificate."); 265throw new InvalidOperationException($@"There was an error removing the certificate with thumbprint '{certificate.Thumbprint}'. 282throw new InvalidOperationException($"Can't determine the subject for the certificate with subject '{certificate.Subject}'."); 366throw 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)
447throw new InvalidOperationException($@"There was an error removing the certificate with thumbprint '{certificate.Thumbprint}'.");
src\Shared\CommandLineUtils\CommandLine\CommandLineApplication.cs (1)
124throw new InvalidOperationException(message);
src\Shared\E2ETesting\BrowserFixture.cs (1)
222throw 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)
148throw new InvalidOperationException("The assertion succeeded after the timeout.");
Templates.Mvc.Tests (27)
src\ProjectTemplates\Shared\AspNetProcess.cs (1)
239throw new InvalidOperationException(@$"Couldn't find listening url:
src\ProjectTemplates\Shared\DevelopmentCertificate.cs (3)
24?? throw new InvalidOperationException($"The aspnetcore-https.json file does not exist. Searched locations: {Environment.NewLine}{string.Join(Environment.NewLine, locations)}"); 28throw new InvalidOperationException($"The aspnetcore-https.json file does not contain valid JSON."); 34throw new InvalidOperationException($"The certificate file does not exist. Expected at: '{path}'.");
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)
97throw new InvalidOperationException($"Failed to find required templates in {packagesDir}. Please ensure the *Templates*.nupkg have been built."); 124throw new InvalidOperationException($"Couldn't find {templateName} as an option in {proc.Output}."); 140throw new InvalidOperationException($"Failed to uninstall previous templates. The template '{templateName}' could still be found.");
src\Shared\CertificateGeneration\CertificateManager.cs (5)
369throw new InvalidOperationException($"The directory '{exportDir}' does not exist. Choose permissions carefully when creating it."); 605throw new InvalidOperationException("Unknown format."); 791throw new InvalidOperationException($"'{nameof(RemoveLocations.Undefined)}' is not a valid location."); 803throw new InvalidOperationException("Invalid location."); 833throw new InvalidOperationException($"Failed to create a key with a size of {minimumKeySize} bits");
src\Shared\CertificateGeneration\MacOSCertificateManager.cs (4)
110throw new InvalidOperationException("There was an error trusting the certificate."); 265throw new InvalidOperationException($@"There was an error removing the certificate with thumbprint '{certificate.Thumbprint}'. 282throw new InvalidOperationException($"Can't determine the subject for the certificate with subject '{certificate.Subject}'."); 366throw 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)
447throw new InvalidOperationException($@"There was an error removing the certificate with thumbprint '{certificate.Thumbprint}'.");
src\Shared\CommandLineUtils\CommandLine\CommandLineApplication.cs (1)
124throw new InvalidOperationException(message);
src\Shared\E2ETesting\BrowserFixture.cs (1)
222throw 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)
148throw new InvalidOperationException("The assertion succeeded after the timeout.");
Templates.Tests (27)
src\ProjectTemplates\Shared\AspNetProcess.cs (1)
239throw new InvalidOperationException(@$"Couldn't find listening url:
src\ProjectTemplates\Shared\DevelopmentCertificate.cs (3)
24?? throw new InvalidOperationException($"The aspnetcore-https.json file does not exist. Searched locations: {Environment.NewLine}{string.Join(Environment.NewLine, locations)}"); 28throw new InvalidOperationException($"The aspnetcore-https.json file does not contain valid JSON."); 34throw new InvalidOperationException($"The certificate file does not exist. Expected at: '{path}'.");
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)
97throw new InvalidOperationException($"Failed to find required templates in {packagesDir}. Please ensure the *Templates*.nupkg have been built."); 124throw new InvalidOperationException($"Couldn't find {templateName} as an option in {proc.Output}."); 140throw new InvalidOperationException($"Failed to uninstall previous templates. The template '{templateName}' could still be found.");
src\Shared\CertificateGeneration\CertificateManager.cs (5)
369throw new InvalidOperationException($"The directory '{exportDir}' does not exist. Choose permissions carefully when creating it."); 605throw new InvalidOperationException("Unknown format."); 791throw new InvalidOperationException($"'{nameof(RemoveLocations.Undefined)}' is not a valid location."); 803throw new InvalidOperationException("Invalid location."); 833throw new InvalidOperationException($"Failed to create a key with a size of {minimumKeySize} bits");
src\Shared\CertificateGeneration\MacOSCertificateManager.cs (4)
110throw new InvalidOperationException("There was an error trusting the certificate."); 265throw new InvalidOperationException($@"There was an error removing the certificate with thumbprint '{certificate.Thumbprint}'. 282throw new InvalidOperationException($"Can't determine the subject for the certificate with subject '{certificate.Subject}'."); 366throw 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)
447throw new InvalidOperationException($@"There was an error removing the certificate with thumbprint '{certificate.Thumbprint}'.");
src\Shared\CommandLineUtils\CommandLine\CommandLineApplication.cs (1)
124throw new InvalidOperationException(message);
src\Shared\E2ETesting\BrowserFixture.cs (1)
222throw 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)
148throw new InvalidOperationException("The assertion succeeded after the timeout.");
Test.Utilities (45)
src\Compilers\Core\Portable\InternalUtilities\ReaderWriterLockSlimExtensions.cs (2)
93throw new InvalidOperationException(); 101throw new InvalidOperationException();
src\Compilers\Core\Portable\Text\TextChangeRangeExtensions.cs (1)
323throw new InvalidOperationException();
src\Dependencies\Collections\Internal\ThrowHelper.cs (4)
181throw new InvalidOperationException(GetResourceString(resource), e); 199throw new InvalidOperationException(SR.InvalidOperation_EnumFailedVersion); 205throw new InvalidOperationException(SR.InvalidOperation_EnumOpCantHappen); 211throw new InvalidOperationException(SR.InvalidOperation_ConcurrentOperationsNotSupported);
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (1)
102throw new InvalidOperationException($"Unexpected concurrent access to {GetType()}");
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+ValueBuilder.cs (1)
68throw new InvalidOperationException($"Unexpected concurrent access to {GetType()}");
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+ValueBuilder.cs (1)
78throw new InvalidOperationException($"Unexpected concurrent access to {GetType()}");
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Enumerator.cs (2)
24public object? Current => throw new InvalidOperationException(); 33throw new InvalidOperationException();
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Enumerator`1.cs (1)
24public new T Current => throw new InvalidOperationException();
src\Dependencies\Contracts\Contract.cs (1)
161throw new InvalidOperationException($"{message} - file {fileName} line {lineNumber}");
src\Dependencies\Contracts\ExceptionUtilities.cs (2)
27return new InvalidOperationException(output); 31=> new InvalidOperationException($"This program location is thought to be unreachable. File='{path}' Line={line}");
src\RoslynAnalyzers\Utilities\Compiler\Extensions\IOperationExtensions.cs (1)
532throw new InvalidOperationException();
src\RoslynAnalyzers\Utilities\Compiler\Lightup\LightupHelpers.cs (2)
171throw new InvalidOperationException(); 187throw new InvalidOperationException();
src\RoslynAnalyzers\Utilities\Compiler\SmallDictionary.cs (2)
306throw new InvalidOperationException(); 573throw new InvalidOperationException();
src\RoslynAnalyzers\Utilities\Workspaces\DocumentExtensions.cs (3)
22return semanticModel ?? throw new InvalidOperationException("SyntaxTree is required to accomplish the task but is not supported by document"); 31return syntaxTree ?? throw new InvalidOperationException("SyntaxTree is required to accomplish the task but is not supported by document"); 40return root ?? throw new InvalidOperationException("SyntaxTree is required to accomplish the task but is not supported by document");
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EditorConfig\Parsing\EditorConfigFile.cs (2)
62throw new InvalidOperationException("No path was given for this editorconfig file"); 78throw new InvalidOperationException("No path was given for this editorconfig file");
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EditorConfig\Parsing\Sections\Section.cs (1)
142throw new InvalidOperationException("No path given for editorconfig");
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SemanticModelExtensions.cs (7)
37=> semanticModel.AnalyzeDataFlow(statementOrExpression) ?? throw new InvalidOperationException(); 40=> semanticModel.AnalyzeDataFlow(firstStatement, lastStatement) ?? throw new InvalidOperationException(); 43=> semanticModel.AnalyzeControlFlow(statement) ?? throw new InvalidOperationException(); 46=> semanticModel.AnalyzeControlFlow(firstStatement, lastStatement) ?? throw new InvalidOperationException(); 51?? throw new InvalidOperationException(); 57?? throw new InvalidOperationException(); 63?? throw new InvalidOperationException();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (1)
24=> node.Parent ?? throw new InvalidOperationException("Node's parent was null");
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTokenExtensions.cs (2)
22=> GetAncestor(token, predicate) ?? throw new InvalidOperationException("Could not find a valid ancestor"); 154=> token.Parent ?? throw new InvalidOperationException("Token's parent was null");
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser.cs (1)
89trimmedDictionary[key.Trim()] = allRawConventions.TryGetValue(key, out var value) ? value : throw new InvalidOperationException();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\NamingStyle.cs (2)
83throw new InvalidOperationException(); 170default: throw new InvalidOperationException();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (1)
482throw new InvalidOperationException();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Serialization\ObjectWriter.cs (1)
286throw new InvalidOperationException($"Unsupported object type: {value.GetType()}");
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\BKTree.Builder.cs (1)
201throw new InvalidOperationException();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\StringEscapeEncoder.cs (1)
138throw new InvalidOperationException();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\TaskExtensions.cs (1)
36throw new InvalidOperationException($"{nameof(WaitAndGetResult)} cannot be called from a thread pool thread.");
TestingAppHost1.AppHost (4)
Program.cs (4)
44throw new InvalidOperationException("Crashing: before-build."); 51throw new InvalidOperationException("Crashing: after-build."); 65throw new InvalidOperationException("Crashing: after-start."); 72throw new InvalidOperationException("Crashing after-shutdown.");
Text.Analyzers (57)
src\Compilers\Core\Portable\InternalUtilities\ReaderWriterLockSlimExtensions.cs (2)
93throw new InvalidOperationException(); 101throw new InvalidOperationException();
src\Compilers\Core\Portable\Text\TextChangeRangeExtensions.cs (1)
323throw new InvalidOperationException();
src\Dependencies\Collections\Internal\ThrowHelper.cs (4)
181throw new InvalidOperationException(GetResourceString(resource), e); 199throw new InvalidOperationException(SR.InvalidOperation_EnumFailedVersion); 205throw new InvalidOperationException(SR.InvalidOperation_EnumOpCantHappen); 211throw new InvalidOperationException(SR.InvalidOperation_ConcurrentOperationsNotSupported);
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (1)
102throw new InvalidOperationException($"Unexpected concurrent access to {GetType()}");
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+ValueBuilder.cs (1)
68throw new InvalidOperationException($"Unexpected concurrent access to {GetType()}");
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+ValueBuilder.cs (1)
78throw new InvalidOperationException($"Unexpected concurrent access to {GetType()}");
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Enumerator.cs (2)
24public object? Current => throw new InvalidOperationException(); 33throw new InvalidOperationException();
src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Enumerator`1.cs (1)
24public new T Current => throw new InvalidOperationException();
src\Dependencies\Contracts\Contract.cs (1)
161throw new InvalidOperationException($"{message} - file {fileName} line {lineNumber}");
src\Dependencies\Contracts\ExceptionUtilities.cs (2)
27return new InvalidOperationException(output); 31=> new InvalidOperationException($"This program location is thought to be unreachable. File='{path}' Line={line}");
src\RoslynAnalyzers\Utilities\Compiler\Extensions\IOperationExtensions.cs (1)
532throw new InvalidOperationException();
src\RoslynAnalyzers\Utilities\Compiler\Lightup\LightupHelpers.cs (2)
171throw new InvalidOperationException(); 187throw new InvalidOperationException();
src\RoslynAnalyzers\Utilities\Compiler\SmallDictionary.cs (2)
306throw new InvalidOperationException(); 573throw new InvalidOperationException();
src\RoslynAnalyzers\Utilities\Workspaces\DocumentExtensions.cs (3)
22return semanticModel ?? throw new InvalidOperationException("SyntaxTree is required to accomplish the task but is not supported by document"); 31return syntaxTree ?? throw new InvalidOperationException("SyntaxTree is required to accomplish the task but is not supported by document"); 40return root ?? throw new InvalidOperationException("SyntaxTree is required to accomplish the task but is not supported by document");
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EditorConfig\Parsing\EditorConfigFile.cs (2)
62throw new InvalidOperationException("No path was given for this editorconfig file"); 78throw new InvalidOperationException("No path was given for this editorconfig file");
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EditorConfig\Parsing\Sections\Section.cs (1)
142throw new InvalidOperationException("No path given for editorconfig");
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SemanticModelExtensions.cs (7)
37=> semanticModel.AnalyzeDataFlow(statementOrExpression) ?? throw new InvalidOperationException(); 40=> semanticModel.AnalyzeDataFlow(firstStatement, lastStatement) ?? throw new InvalidOperationException(); 43=> semanticModel.AnalyzeControlFlow(statement) ?? throw new InvalidOperationException(); 46=> semanticModel.AnalyzeControlFlow(firstStatement, lastStatement) ?? throw new InvalidOperationException(); 51?? throw new InvalidOperationException(); 57?? throw new InvalidOperationException(); 63?? throw new InvalidOperationException();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (1)
24=> node.Parent ?? throw new InvalidOperationException("Node's parent was null");
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTokenExtensions.cs (2)
22=> GetAncestor(token, predicate) ?? throw new InvalidOperationException("Could not find a valid ancestor"); 154=> token.Parent ?? throw new InvalidOperationException("Token's parent was null");
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser.cs (1)
89trimmedDictionary[key.Trim()] = allRawConventions.TryGetValue(key, out var value) ? value : throw new InvalidOperationException();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\NamingStyle.cs (2)
83throw new InvalidOperationException(); 170default: throw new InvalidOperationException();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (1)
482throw new InvalidOperationException();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Serialization\ObjectWriter.cs (1)
286throw new InvalidOperationException($"Unsupported object type: {value.GetType()}");
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\BKTree.Builder.cs (1)
201throw new InvalidOperationException();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\RoslynParallel.NetFramework.cs (2)
596Enumerator = source.GetEnumerator() ?? throw new InvalidOperationException(); 622Enumerator = source.GetAsyncEnumerator(Cancellation.Token) ?? throw new InvalidOperationException();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\StringEscapeEncoder.cs (1)
138throw new InvalidOperationException();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\TaskExtensions.cs (1)
36throw new InvalidOperationException($"{nameof(WaitAndGetResult)} cannot be called from a thread pool thread.");
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationConstructedMethodSymbol.cs (1)
85=> throw new System.InvalidOperationException();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationMethodSymbol.cs (1)
110=> throw new InvalidOperationException();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\DocumentExtensions.cs (3)
39return semanticModel ?? throw new InvalidOperationException(string.Format(WorkspaceExtensionsResources.SyntaxTree_is_required_to_accomplish_the_task_but_is_not_supported_by_document_0, document.Name)); 63return syntaxTree ?? throw new InvalidOperationException(string.Format(WorkspaceExtensionsResources.SyntaxTree_is_required_to_accomplish_the_task_but_is_not_supported_by_document_0, document.Name)); 80return root ?? throw new InvalidOperationException(string.Format(WorkspaceExtensionsResources.SyntaxTree_is_required_to_accomplish_the_task_but_is_not_supported_by_document_0, document.Name));
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\ISolutionExtensions.cs (3)
36=> solution.GetDocument(syntaxTree) ?? throw new InvalidOperationException(); 43throw new InvalidOperationException(string.Format(WorkspaceExtensionsResources.Project_of_ID_0_is_required_to_accomplish_the_task_but_is_not_available_from_the_solution, projectId)); 109=> new InvalidOperationException(WorkspaceExtensionsResources.The_solution_does_not_contain_the_specified_document);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\ProjectExtensions.cs (1)
114throw new InvalidOperationException(string.Format(WorkspaceExtensionsResources.Compilation_is_required_to_accomplish_the_task_but_is_not_supported_by_project_0, project.Name));
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\AddImports\AbstractAddImportsService.cs (1)
126throw new InvalidOperationException();
UIAutomationClient (41)
MS\Internal\Automation\HwndProxyElementProvider.cs (24)
299throw new InvalidOperationException(SR.OperationCannotBePerformed); 316throw new InvalidOperationException(SR.OperationCannotBePerformed); 325throw new InvalidOperationException(SR.OperationCannotBePerformed); 334throw new InvalidOperationException(SR.OperationCannotBePerformed); 346throw new InvalidOperationException(SR.OperationCannotBePerformed); 355throw new InvalidOperationException(SR.OperationCannotBePerformed); 367throw new InvalidOperationException(SR.OperationCannotBePerformed); 389throw new InvalidOperationException(SR.OperationCannotBePerformed); 625throw new InvalidOperationException(SR.OperationCannotBePerformed); 636throw new InvalidOperationException(SR.OperationCannotBePerformed); 645throw new InvalidOperationException(SR.OperationCannotBePerformed); 669throw new InvalidOperationException(SR.OperationCannotBePerformed); 691throw new InvalidOperationException(SR.OperationCannotBePerformed); 703throw new InvalidOperationException(SR.OperationCannotBePerformed); 709throw new InvalidOperationException(SR.OperationCannotBePerformed); 723throw new InvalidOperationException(SR.OperationCannotBePerformed); 732throw new InvalidOperationException(SR.OperationCannotBePerformed); 740throw new InvalidOperationException(SR.OperationCannotBePerformed); 749throw new InvalidOperationException(SR.OperationCannotBePerformed); 762throw new InvalidOperationException(SR.OperationCannotBePerformed); 777throw new InvalidOperationException(SR.OperationCannotBePerformed); 816throw new InvalidOperationException(SR.OperationCannotBePerformed); 828throw new InvalidOperationException(SR.OperationCannotBePerformed); 837throw new InvalidOperationException(SR.OperationCannotBePerformed);
MS\Internal\Automation\Misc.cs (3)
183throw new InvalidOperationException(SR.CacheRequestNeedCache); 192throw new InvalidOperationException(SR.CacheRequestNeedLiveForProperties); 250throw new InvalidOperationException();
System\Windows\Automation\AutomationElement.cs (9)
326throw new InvalidOperationException(SR.OperationCannotBePerformed); 550throw new InvalidOperationException(SR.UnsupportedPattern); 673throw new InvalidOperationException(SR.UnsupportedPattern); 856throw new InvalidOperationException(SR.SetFocusFailed); 1033throw new InvalidOperationException(SR.CachedPropertyNotRequested); 1062throw new InvalidOperationException(SR.CachedPropertyNotRequested); 1104throw new InvalidOperationException(SR.CacheRequestNeedElementReference); 1206throw new InvalidOperationException(SR.CachedPropertyNotRequested); 1237throw new InvalidOperationException(SR.CachedPropertyNotRequested);
System\Windows\Automation\CacheRequest.cs (2)
198throw new InvalidOperationException(SR.CacheReqestCanOnlyPopTop); 472throw new InvalidOperationException(SR.CacheReqestCantModifyWhileActive);
System\Windows\Automation\RangeValuePattern.cs (1)
98throw new InvalidOperationException(SR.ValueReadonly);
System\Windows\Automation\TextPattern.cs (1)
275throw new InvalidOperationException(SR.CantPrefetchTextPattern);
System\Windows\Automation\ValuePattern.cs (1)
85throw new InvalidOperationException(SR.ValueReadonly);
UIAutomationClientSideProviders (104)
MS\Internal\AutomationProxies\Accessible.cs (2)
533throw new InvalidOperationException(SR.OperationCannotBePerformed, e); 1126throw new InvalidOperationException(SR.OperationCannotBePerformed, e);
MS\Internal\AutomationProxies\Misc.cs (1)
1695throw new InvalidOperationException();
MS\Internal\AutomationProxies\MSAANativeProvider.cs (1)
1210throw new InvalidOperationException(SR.OperationCannotBePerformed, e);
MS\Internal\AutomationProxies\ProxySimple.cs (1)
552throw new InvalidOperationException(SR.SetFocusFailed);
MS\Internal\AutomationProxies\WindowsButton.cs (2)
366throw new InvalidOperationException(SR.DoesNotSupportMultipleSelection); 372throw new InvalidOperationException(SR.DoesNotSupportMultipleSelection);
MS\Internal\AutomationProxies\WindowsComboBox.cs (1)
394throw new InvalidOperationException(SR.OperationCannotBePerformed);
MS\Internal\AutomationProxies\WindowsEditBox.cs (5)
271throw new InvalidOperationException(SR.ValueReadonly); 293throw new InvalidOperationException (SR.OperationCannotBePerformed); 300throw new InvalidOperationException(SR.OperationCannotBePerformed); 343throw new InvalidOperationException(SR.Format(SR.EditControlsHaveNoChildren, GetType().FullName)); 882throw new InvalidOperationException();
MS\Internal\AutomationProxies\WindowsEditBoxRange.cs (7)
37throw new InvalidOperationException(SR.Format(SR.InvalidTextRangeOffset, GetType().FullName)); 444throw new InvalidOperationException(); 449throw new InvalidOperationException(); 1065throw new InvalidOperationException(SR.Format(SR.InvalidTextRangeOffset, GetType().FullName)); 1077throw new InvalidOperationException(SR.Format(SR.InvalidRangeEndpoint, GetType().FullName)); 1111throw new InvalidOperationException(SR.Format(SR.InvalidTextRangeOffset, GetType().FullName)); 1142throw new InvalidOperationException(SR.Format(SR.InvalidTextRangeOffset, GetType().FullName));
MS\Internal\AutomationProxies\WindowsFormsLinkLabel.cs (1)
115throw new InvalidOperationException(SR.OperationCannotBePerformed);
MS\Internal\AutomationProxies\WindowsHyperlink.cs (1)
429throw new InvalidOperationException(SR.OperationCannotBePerformed);
MS\Internal\AutomationProxies\WindowsIPAddress.cs (1)
143throw new InvalidOperationException (SR.OperationCannotBePerformed);
MS\Internal\AutomationProxies\WindowsListBox.cs (8)
809throw new InvalidOperationException(SR.OperationCannotBePerformed); 842throw new InvalidOperationException(SR.DoesNotSupportMultipleSelection); 861throw new InvalidOperationException(SR.OperationCannotBePerformed); 887throw new InvalidOperationException(SR.SelectionRequired); 892throw new InvalidOperationException(SR.OperationCannotBePerformed); 923throw new InvalidOperationException(SR.OperationCannotBePerformed); 928throw new InvalidOperationException(SR.OperationCannotBePerformed); 949throw new InvalidOperationException(SR.OperationCannotBePerformed);
MS\Internal\AutomationProxies\WindowsListView.cs (2)
223throw new InvalidOperationException(SR.OperationCannotBePerformed); 666throw new InvalidOperationException(SR.OperationCannotBePerformed);
MS\Internal\AutomationProxies\WindowsListViewGroup.cs (6)
200throw new InvalidOperationException(SR.OperationCannotBePerformed); 572throw new InvalidOperationException(SR.OperationCannotBePerformed); 602throw new InvalidOperationException(SR.OperationCannotBePerformed); 615throw new InvalidOperationException(SR.OperationCannotBePerformed); 673throw new InvalidOperationException(SR.OperationCannotBePerformed); 711throw new InvalidOperationException(SR.OperationCannotBePerformed);
MS\Internal\AutomationProxies\WindowsListViewGroupHelper.cs (2)
61throw new InvalidOperationException(SR.OperationCannotBePerformed); 75throw new InvalidOperationException(SR.OperationCannotBePerformed);
MS\Internal\AutomationProxies\WindowsListViewItem.cs (10)
401throw new InvalidOperationException(SR.OperationCannotBePerformed); 430throw new InvalidOperationException(SR.DoesNotSupportMultipleSelection); 439throw new InvalidOperationException(SR.OperationCannotBePerformed); 468throw new InvalidOperationException(SR.SelectionRequired); 475throw new InvalidOperationException(SR.OperationCannotBePerformed); 532throw new InvalidOperationException(SR.OperationCannotBePerformed); 665throw new InvalidOperationException(SR.OperationCannotBePerformed); 751throw new InvalidOperationException(SR.ValueReadonly); 764throw new InvalidOperationException(SR.OperationCannotBePerformed); 805throw new InvalidOperationException(SR.OperationCannotBePerformed);
MS\Internal\AutomationProxies\WindowsListViewItemCheckBox.cs (1)
218throw new InvalidOperationException(SR.OperationCannotBePerformed);
MS\Internal\AutomationProxies\WindowsMenu.cs (8)
1704throw new InvalidOperationException(SR.OperationCannotBePerformed); 1713throw new InvalidOperationException(SR.OperationCannotBePerformed); 1721throw new InvalidOperationException(SR.OperationCannotBePerformed); 1747throw new InvalidOperationException(SR.OperationCannotBePerformed); 1756throw new InvalidOperationException(SR.OperationCannotBePerformed); 1765throw new InvalidOperationException(SR.OperationCannotBePerformed); 1799throw new InvalidOperationException(SR.DoesNotSupportMultipleSelection); 1805throw new InvalidOperationException(SR.DoesNotSupportMultipleSelection);
MS\Internal\AutomationProxies\WindowsProgressbar.cs (1)
86throw new InvalidOperationException(SR.ValueReadonly);
MS\Internal\AutomationProxies\WindowsRichEdit.cs (4)
169throw new InvalidOperationException(SR.ValueReadonly); 191throw new InvalidOperationException (SR.OperationCannotBePerformed); 198throw new InvalidOperationException(SR.OperationCannotBePerformed); 260throw new InvalidOperationException(SR.Format(SR.RichEditTextPatternHasNoChildren, GetType().FullName));
MS\Internal\AutomationProxies\WindowsRichEditRange.cs (2)
336throw new InvalidOperationException(); 341throw new InvalidOperationException();
MS\Internal\AutomationProxies\WindowsScroll.cs (4)
31throw new InvalidOperationException(SR.OperationCannotBePerformed); 56throw new InvalidOperationException(SR.OperationCannotBePerformed); 64throw new InvalidOperationException(SR.OperationCannotBePerformed); 73throw new InvalidOperationException(SR.OperationCannotBePerformed);
MS\Internal\AutomationProxies\WindowsScrollBar.cs (1)
629throw new InvalidOperationException(SR.OperationCannotBePerformed);
MS\Internal\AutomationProxies\WindowsStatusBar.cs (1)
524throw new InvalidOperationException(SR.OperationCannotBePerformed);
MS\Internal\AutomationProxies\WindowsSysHeader.cs (1)
475throw new InvalidOperationException(SR.OperationCannotBePerformed);
MS\Internal\AutomationProxies\WindowsTab.cs (15)
455throw new InvalidOperationException(SR.OperationCannotBePerformed); 460throw new InvalidOperationException(SR.OperationCannotBePerformed); 465throw new InvalidOperationException(SR.OperationCannotBePerformed); 479throw new InvalidOperationException(SR.OperationCannotBePerformed); 484throw new InvalidOperationException(SR.OperationCannotBePerformed); 500throw new InvalidOperationException(SR.OperationCannotBePerformed); 678throw new InvalidOperationException(SR.OperationCannotBePerformed); 815throw new InvalidOperationException(SR.OperationCannotBePerformed); 1065throw new InvalidOperationException(SR.OperationCannotBePerformed); 1086throw new InvalidOperationException(SR.OperationCannotBePerformed); 1108throw new InvalidOperationException(SR.OperationCannotBePerformed); 1113throw new InvalidOperationException(SR.DoesNotSupportMultipleSelection); 1144throw new InvalidOperationException(SR.OperationCannotBePerformed); 1153throw new InvalidOperationException(SR.OperationCannotBePerformed); 1212throw new InvalidOperationException(SR.OperationCannotBePerformed);
MS\Internal\AutomationProxies\WindowsToolbar.cs (2)
652throw new InvalidOperationException(SR.OperationCannotBePerformed); 662throw new InvalidOperationException(SR.OperationCannotBePerformed);
MS\Internal\AutomationProxies\WindowsTreeView.cs (12)
610throw new InvalidOperationException(SR.OperationCannotBePerformed); 634throw new InvalidOperationException(SR.OperationCannotBePerformed); 979throw new InvalidOperationException(SR.OperationCannotBePerformed); 1009throw new InvalidOperationException(SR.DoesNotSupportMultipleSelection); 1015throw new InvalidOperationException(SR.OperationCannotBePerformed); 1033throw new InvalidOperationException(SR.SelectionRequired); 1085throw new InvalidOperationException (SR.OperationCannotBePerformed); 1114throw new InvalidOperationException (SR.OperationCannotBePerformed); 1153throw new InvalidOperationException(SR.OperationCannotBePerformed); 1221throw new InvalidOperationException(SR.OperationCannotBePerformed); 1411throw new InvalidOperationException(SR.OperationCannotBePerformed); 1458throw new InvalidOperationException(SR.OperationCannotBePerformed);
MS\Internal\AutomationProxies\WindowsUpDown.cs (1)
534throw new InvalidOperationException(SR.OperationCannotBePerformed);
UIAutomationTypes (1)
System\Windows\Automation\AutomationIdentifier.cs (1)
169throw new InvalidOperationException("Invalid type specified for AutomationIdentifier");
vbc (5)
src\Compilers\Shared\BuildProtocol.cs (1)
356throw new InvalidOperationException("Received invalid response type from server.");
src\Compilers\Shared\BuildServerConnection.cs (3)
695throw new InvalidOperationException("Unable to acquire guard"); 764throw new InvalidOperationException("Lock already held"); 876throw new InvalidOperationException("Lock already held");
src\Compilers\Shared\ConsoleUtil.cs (1)
47throw new InvalidOperationException("Utf8Output is only supported when writing to Console.Out");
VBCSCompiler (8)
src\Compilers\Server\VBCSCompiler\NamedPipeClientConnectionHost.cs (3)
51throw new InvalidOperationException(); 82throw new InvalidOperationException(); 139throw new InvalidOperationException();
src\Compilers\Shared\BuildProtocol.cs (1)
356throw new InvalidOperationException("Received invalid response type from server.");
src\Compilers\Shared\BuildServerConnection.cs (3)
695throw new InvalidOperationException("Unable to acquire guard"); 764throw new InvalidOperationException("Lock already held"); 876throw new InvalidOperationException("Lock already held");
src\Compilers\Shared\ConsoleUtil.cs (1)
47throw new InvalidOperationException("Utf8Output is only supported when writing to Console.Out");
VBCSCompiler.UnitTests (4)
BuildClientTests.cs (1)
63compileOnServerFunc ??= delegate { throw new InvalidOperationException(); };
CompilerServerTests.cs (1)
93throw new InvalidOperationException("Must specify a pipe name in these suites to ensure we're not running out of proc servers");
ServerUtil.cs (1)
217throw new InvalidOperationException();
TestableClientConnectionHost.cs (1)
72throw new InvalidOperationException("All Adds must be called before they are exhausted");
VersioningWebSite (1)
src\Mvc\test\WebSites\Common\TestResponseGenerator.cs (1)
20throw new InvalidOperationException("ActionContext should not be null here.");
VisualBasicRuntimeTest (7)
Program.cs (7)
114throw new InvalidOperationException(); 119throw new InvalidOperationException(); 124throw new InvalidOperationException(); 137throw new InvalidOperationException(); 145throw new InvalidOperationException(); 161throw new InvalidOperationException(); 169throw new InvalidOperationException();
Wasm.Performance.ConsoleHost (1)
src\Shared\CommandLineUtils\CommandLine\CommandLineApplication.cs (1)
124throw new InvalidOperationException(message);
WebFrontEnd (1)
Program.cs (1)
18?? throw new InvalidOperationException("Missing URL for exteral service"));
WindowsFormsIntegration (3)
System\Windows\Integration\PropertyMap.cs (2)
128throw new InvalidOperationException(string.Format(CultureInfo.CurrentCulture, SR.WFI_PropertyMappingExists, propertyName)); 320throw new InvalidOperationException(SR.WFI_PropertyMapError, ex);
System\Windows\Integration\WindowsFormsHost.cs (1)
216InvalidOperationException exception = new InvalidOperationException(SR.Host_CannotRotateWindowsFormsHost);
WinFormsControlsTest (4)
Dialogs.cs (2)
88?? throw new InvalidOperationException("Unable to locate 'CustomColorDialog' type."); 123using ThreadExceptionDialog dialog = new(new InvalidOperationException("Really long exception description string, because we want to see if it properly wraps around or is truncated."));
FormShowInTaskbar.cs (2)
52throw new InvalidOperationException(); 55throw new InvalidOperationException();
XmlFormattersWebSite (1)
Controllers\SerializableErrorController.cs (1)
18throw new InvalidOperationException("Error in executing the action");
xunit.assert (7)
Assert.cs (2)
42 throw new InvalidOperationException("Assert.Equals should not be used"); 52 throw new InvalidOperationException("Assert.ReferenceEquals should not be used");
Record.cs (1)
86 throw new InvalidOperationException(string.Format(CultureInfo.CurrentCulture, "You must call Assert.{0} when testing async code", asyncMethodName));
Sdk\AssertHelper.cs (2)
537 throw new InvalidOperationException( 604 throw new InvalidOperationException("Could not find 'FullName' property on type 'System.IO.FileSystemInfo'");
Sdk\CollectionTracker.cs (2)
558 throw new InvalidOperationException("Called FormatIndexedMismatch with indices without calling GetMismatchExtents first"); 755 throw new InvalidOperationException("Multiple enumeration is not supported");
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}");
5688 references to InvalidOperationException
Analyzer.Utilities.UnitTests (4)
Lightup\LightupHelpersTests.cs (4)
78Assert.ThrowsAny<InvalidOperationException>(() => LightupHelpers.CreateSyntaxPropertyAccessor<MethodDeclarationSyntax, BlockSyntax?>(typeof(BaseMethodDeclarationSyntax), nameof(BaseMethodDeclarationSyntax.Body), fallbackResult: null)); 82Assert.ThrowsAny<InvalidOperationException>(() => LightupHelpers.CreateSyntaxPropertyAccessor<MethodDeclarationSyntax, BlockSyntax?>(typeof(MethodDeclarationSyntax), nameof(MethodDeclarationSyntax.ExpressionBody), fallbackResult: null)); 90Assert.ThrowsAny<InvalidOperationException>(() => LightupHelpers.CreateSyntaxWithPropertyAccessor<MethodDeclarationSyntax, BlockSyntax?>(typeof(BaseMethodDeclarationSyntax), nameof(BaseMethodDeclarationSyntax.Body), fallbackResult: null)); 94Assert.ThrowsAny<InvalidOperationException>(() => LightupHelpers.CreateSyntaxWithPropertyAccessor<MethodDeclarationSyntax, BlockSyntax?>(typeof(MethodDeclarationSyntax), nameof(MethodDeclarationSyntax.ExpressionBody), fallbackResult: null));
aspire (1)
DotNetCliRunner.cs (1)
195var ex = new InvalidOperationException(ErrorStrings.CantUseBothWatchAndNoBuild);
Aspire.Azure.AI.Inference (2)
AspireAzureAIInferenceExtensions.cs (2)
35/// <exception cref="InvalidOperationException">Thrown when endpoint is missing from settings.</exception> 72/// <exception cref="InvalidOperationException">Thrown when endpoint is missing from settings.</exception>
Aspire.Azure.AI.OpenAI.Tests (9)
AspireAzureOpenAIClientBuilderChatClientExtensionsTests.cs (4)
122var ex = Assert.Throws<InvalidOperationException>(() => 153var ex = Assert.Throws<InvalidOperationException>(() =>
AspireAzureOpenAIClientBuilderEmbeddingGeneratorExtensionsTests.cs (4)
122var ex = Assert.Throws<InvalidOperationException>(() => 153var ex = Assert.Throws<InvalidOperationException>(() =>
AspireConfigurableOpenAIExtensionsTests.cs (1)
26Assert.Throws<InvalidOperationException>(() =>
Aspire.Azure.Data.Tables (2)
AspireTablesExtensions.cs (2)
33/// <exception cref="InvalidOperationException">Thrown when neither <see cref="AzureDataTablesSettings.ConnectionString"/> nor <see cref="AzureDataTablesSettings.ServiceUri"/> is provided.</exception> 55/// <exception cref="InvalidOperationException">Thrown when neither <see cref="AzureDataTablesSettings.ConnectionString"/> nor <see cref="AzureDataTablesSettings.ServiceUri"/> is provided.</exception>
Aspire.Azure.Messaging.EventHubs (10)
AspireEventHubsExtensions.cs (10)
29/// <exception cref="InvalidOperationException">Thrown when neither <see cref="AzureMessagingEventHubsSettings.ConnectionString"/> nor <see cref="AzureMessagingEventHubsSettings.FullyQualifiedNamespace"/> is provided.</exception> 52/// <exception cref="InvalidOperationException">Thrown when neither <see cref="AzureMessagingEventHubsSettings.ConnectionString"/> nor <see cref="AzureMessagingEventHubsSettings.FullyQualifiedNamespace"/> is provided.</exception> 75/// <exception cref="InvalidOperationException">Thrown when neither <see cref="AzureMessagingEventHubsSettings.ConnectionString"/> nor <see cref="AzureMessagingEventHubsSettings.FullyQualifiedNamespace"/> is provided.</exception> 98/// <exception cref="InvalidOperationException">Thrown when neither <see cref="AzureMessagingEventHubsSettings.ConnectionString"/> nor <see cref="AzureMessagingEventHubsSettings.FullyQualifiedNamespace"/> is provided.</exception> 121/// <exception cref="InvalidOperationException">Thrown when neither <see cref="AzureMessagingEventHubsSettings.ConnectionString"/> nor <see cref="AzureMessagingEventHubsSettings.FullyQualifiedNamespace"/> is provided.</exception> 144/// <exception cref="InvalidOperationException">Thrown when neither <see cref="AzureMessagingEventHubsSettings.ConnectionString"/> nor <see cref="AzureMessagingEventHubsSettings.FullyQualifiedNamespace"/> is provided.</exception> 167/// <exception cref="InvalidOperationException">Thrown when neither <see cref="AzureMessagingEventHubsSettings.ConnectionString"/> nor <see cref="AzureMessagingEventHubsSettings.FullyQualifiedNamespace"/> is provided.</exception> 192/// <exception cref="InvalidOperationException">Thrown when neither <see cref="AzureMessagingEventHubsSettings.ConnectionString"/> nor <see cref="AzureMessagingEventHubsSettings.FullyQualifiedNamespace"/> is provided.</exception> 215/// <exception cref="InvalidOperationException">Thrown when neither <see cref="AzureMessagingEventHubsSettings.ConnectionString"/> nor <see cref="AzureMessagingEventHubsSettings.FullyQualifiedNamespace"/> is provided.</exception> 238/// <exception cref="InvalidOperationException">Thrown when neither <see cref="AzureMessagingEventHubsSettings.ConnectionString"/> nor <see cref="AzureMessagingEventHubsSettings.FullyQualifiedNamespace"/> is provided.</exception>
Aspire.Azure.Messaging.ServiceBus (2)
AspireServiceBusExtensions.cs (2)
33/// <exception cref="InvalidOperationException">Thrown when neither <see cref="AzureMessagingServiceBusSettings.ConnectionString"/> nor <see cref="AzureMessagingServiceBusSettings.FullyQualifiedNamespace"/> is provided.</exception> 54/// <exception cref="InvalidOperationException">Thrown when neither <see cref="AzureMessagingServiceBusSettings.ConnectionString"/> nor <see cref="AzureMessagingServiceBusSettings.FullyQualifiedNamespace"/> is provided.</exception>
Aspire.Azure.Messaging.WebPubSub (3)
AspireWebPubSubExtensions.cs (3)
32/// <exception cref="InvalidOperationException">Thrown when neither <see cref="AzureMessagingWebPubSubSettings.ConnectionString"/> nor <see cref="AzureMessagingWebPubSubSettings.Endpoint"/> is provided.</exception> 54/// <exception cref="InvalidOperationException">Thrown when neither <see cref="AzureMessagingWebPubSubSettings.ConnectionString"/> nor <see cref="AzureMessagingWebPubSubSettings.Endpoint"/> is provided.</exception> 87/// <exception cref="InvalidOperationException">Thrown when neither <see cref="AzureMessagingWebPubSubSettings.ConnectionString"/> nor <see cref="AzureMessagingWebPubSubSettings.Endpoint"/> is provided.</exception>
Aspire.Azure.Messaging.WebPubSub.Tests (2)
AspireWebPubSubExtensionsTests.cs (2)
151var ex = Assert.Throws<InvalidOperationException>(host.Services.GetRequiredService<WebPubSubServiceClient>);
Aspire.Azure.Npgsql (2)
AspireAzureNpgsqlExtensions.cs (2)
28/// <exception cref="InvalidOperationException">Thrown when mandatory <see cref="NpgsqlSettings.ConnectionString"/> is not provided or the <see cref="AzureNpgsqlSettings.Credential"/> is invalid.</exception> 57/// <exception cref="InvalidOperationException">Thrown when mandatory <see cref="NpgsqlSettings.ConnectionString"/> is not provided or the <see cref="AzureNpgsqlSettings.Credential"/> is invalid.</exception>
Aspire.Azure.Npgsql.EntityFrameworkCore.PostgreSQL (2)
AspireAzureEFPostgreSqlExtensions.cs (2)
45/// <exception cref="InvalidOperationException">Thrown when mandatory <see cref="NpgsqlEntityFrameworkCorePostgreSQLSettings.ConnectionString"/> is not provided.</exception> 71/// <exception cref="InvalidOperationException">Thrown when mandatory <see cref="DbContext"/> is not registered in DI.</exception>
Aspire.Azure.Npgsql.EntityFrameworkCore.PostgreSQL.Tests (8)
AspireAzureEFPostgreSqlExtensionsTests.cs (2)
282var exception = Assert.Throws<InvalidOperationException>(() => builder.AddAzureNpgsqlDbContext<TestDbContext>("npgsql"));
EnrichNpgsqlTests.cs (6)
37var exception = Assert.Throws<InvalidOperationException>(() => builder.EnrichAzureNpgsqlDbContext<TestDbContext>()); 112var exception = Assert.Throws<InvalidOperationException>(host.Services.GetRequiredService<TestDbContext>); 318var exception = Assert.Throws<InvalidOperationException>(host.Services.GetRequiredService<TestDbContext>);
Aspire.Azure.Security.KeyVault (6)
AspireKeyVaultExtensions.cs (6)
33/// <exception cref="InvalidOperationException">Thrown when mandatory <see cref="AzureSecurityKeyVaultSettings.VaultUri"/> is not provided.</exception> 56/// <exception cref="InvalidOperationException">Thrown when mandatory <see cref="AzureSecurityKeyVaultSettings.VaultUri"/> is not provided.</exception> 78/// <exception cref="InvalidOperationException">Thrown when mandatory <see cref="AzureSecurityKeyVaultSettings.VaultUri"/> is not provided.</exception> 100/// <exception cref="InvalidOperationException">Thrown when mandatory <see cref="AzureSecurityKeyVaultSettings.VaultUri"/> is not provided.</exception> 122/// <exception cref="InvalidOperationException">Thrown when mandatory <see cref="AzureSecurityKeyVaultSettings.VaultUri"/> is not provided.</exception> 144/// <exception cref="InvalidOperationException">Thrown when mandatory <see cref="AzureSecurityKeyVaultSettings.VaultUri"/> is not provided.</exception>
Aspire.Azure.Storage.Blobs (4)
AspireBlobStorageExtensions.cs (4)
33/// <exception cref="InvalidOperationException"> 65/// <exception cref="InvalidOperationException"> 94/// <exception cref="InvalidOperationException"> 128/// <exception cref="InvalidOperationException">
Aspire.Azure.Storage.Queues (2)
AspireQueueStorageExtensions.cs (2)
34/// <exception cref="InvalidOperationException">Thrown when neither <see cref="AzureStorageQueuesSettings.ConnectionString"/> nor <see cref="AzureStorageQueuesSettings.ServiceUri"/> is provided.</exception> 56/// <exception cref="InvalidOperationException">Thrown when neither <see cref="AzureStorageQueuesSettings.ConnectionString"/> nor <see cref="AzureStorageQueuesSettings.ServiceUri"/> is provided.</exception>
Aspire.Components.Common.TestUtilities (2)
ConformanceTests.cs (2)
260Assert.Throws<InvalidOperationException>(host.Services.GetRequiredService<TService>); 380Assert.Throws<InvalidOperationException>(() =>
Aspire.Confluent.Kafka (4)
AspireKafkaConsumerExtensions.cs (2)
216catch (InvalidOperationException) 240catch (InvalidOperationException)
AspireKafkaProducerExtensions.cs (2)
216catch (InvalidOperationException) 241catch (InvalidOperationException)
Aspire.Dashboard (5)
ServiceClient\DashboardClient.cs (1)
521catch (InvalidOperationException)
src\Shared\IConfigurationExtensions.cs (4)
102/// <exception cref="InvalidOperationException">The configuration value could not be accessed, or contained incorrectly formatted data.</exception> 132/// <exception cref="InvalidOperationException">The configuration value could not be accessed, or contained incorrectly formatted data.</exception> 171/// <exception cref="InvalidOperationException">The configuration value is not a valid member of the enum.</exception> 199/// <exception cref="InvalidOperationException">The configuration value is empty or not a valid member of the enum.</exception>
Aspire.Dashboard.Tests (2)
Model\ResourceViewModelTests.cs (2)
102var ex = Assert.Throws<InvalidOperationException>(() => resource.ToViewModel(new MockKnownPropertyLookup(), NullLogger.Instance));
Aspire.EndToEnd.Tests (1)
tests\Shared\TemplatesTesting\TestExtensions.cs (1)
26catch (InvalidOperationException ie) when (ie.Message.Contains("No process is associated with this object"))
Aspire.Hosting (17)
ApplicationModel\EndpointReference.cs (1)
172/// <exception cref="InvalidOperationException">Throws when the selected <see cref="EndpointProperty"/> enumeration is not known.</exception>
ApplicationModel\EnvironmentCallbackContext.cs (1)
53/// <exception cref="InvalidOperationException">Thrown when the EnvironmentCallbackContext was created without a specified resource.</exception>
ApplicationModel\ProjectResourceExtensions.cs (1)
28/// <exception cref="InvalidOperationException">Thrown when the project resource doesn't have project metadata.</exception>
ApplicationModel\ReferenceExpression.cs (5)
130/// <exception cref="InvalidOperationException"></exception> 144/// <exception cref="InvalidOperationException"></exception> 244/// <exception cref="InvalidOperationException"></exception> 294/// <exception cref="InvalidOperationException"></exception> 304/// <exception cref="InvalidOperationException"></exception>
ApplicationModel\ResourceExtensions.cs (1)
685/// Throws <see cref="InvalidOperationException"/> if the resource has no resolved names or multiple resolved names.
ContainerResourceBuilderExtensions.cs (3)
567/// <exception cref="InvalidOperationException"> 615/// <exception cref="InvalidOperationException"> 662/// <exception cref="InvalidOperationException">
DistributedApplicationExecutionContext.cs (1)
60/// <exception cref="InvalidOperationException" accessor="get">Thrown when the <see cref="IServiceProvider"/> is not available.</exception>
src\Shared\IConfigurationExtensions.cs (4)
102/// <exception cref="InvalidOperationException">The configuration value could not be accessed, or contained incorrectly formatted data.</exception> 132/// <exception cref="InvalidOperationException">The configuration value could not be accessed, or contained incorrectly formatted data.</exception> 171/// <exception cref="InvalidOperationException">The configuration value is not a valid member of the enum.</exception> 199/// <exception cref="InvalidOperationException">The configuration value is empty or not a valid member of the enum.</exception>
Aspire.Hosting.Azure (1)
AzureBicepResource.cs (1)
83/// <exception cref="InvalidOperationException"></exception>
Aspire.Hosting.Azure.Tests (12)
AzureAppServiceTests.cs (2)
308var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => ExecuteBeforeStartHooksAsync(app, default));
AzureBicepResourceTests.cs (2)
154Assert.Throws<InvalidOperationException>(() => bicepResource.GetOutput("resourceEndpoint").Value); 165Assert.Throws<InvalidOperationException>(() => bicepResource.GetSecretOutput("connectionString").Value);
AzureContainerAppsTests.cs (2)
1524var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => ExecuteBeforeStartHooksAsync(app, default));
AzureEventHubsExtensionsTests.cs (1)
534Assert.Throws<InvalidOperationException>(() => eventHubs.RunAsEmulator());
AzureResourcePreparerTests.cs (2)
31var ex = Assert.Throws<InvalidOperationException>(app.Start);
AzureServiceBusExtensionsTests.cs (1)
630Assert.Throws<InvalidOperationException>(() => serviceBus.RunAsEmulator());
AzureUserAssignedIdentityTests.cs (2)
256var exception = await Assert.ThrowsAsync<InvalidOperationException>(async () => await ExecuteBeforeStartHooksAsync(app, default));
Aspire.Hosting.Containers.Tests (9)
ContainerResourceBuilderTests.cs (7)
83var exception = Assert.Throws<InvalidOperationException>(() => container.WithImageTag("7.1")); 93var exception = Assert.Throws<InvalidOperationException>(() => container.WithImageRegistry("myregistry.azurecr.io")); 103var exception = Assert.Throws<InvalidOperationException>(() => container.WithImageSHA256("42b5c726e719639fcc1e9dbc13dd843f567dcd37911d0e1abb9f47f2cc1c95cd")); 132Assert.Throws<InvalidOperationException>(() => container.WithImage("image:tag", "anothertag"));
WithDockerfileTests.cs (2)
595var ex = Assert.Throws<InvalidOperationException>(() =>
Aspire.Hosting.Docker.Tests (4)
DockerComposeTests.cs (2)
101var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => ExecuteBeforeStartHooksAsync(app, default));
EnvVarEscaperTests.cs (2)
83var ex = Assert.Throws<InvalidOperationException>(() => EscapeUnescapedEnvVars(input));
Aspire.Hosting.Keycloak.Tests (1)
KeycloakPublicApiTests.cs (1)
147Assert.Throws<InvalidOperationException>(action);
Aspire.Hosting.Kubernetes (2)
Yaml\IntOrStringConverter.cs (2)
34/// <exception cref="InvalidOperationException">Thrown if the current YAML event is not a scalar.</exception> 55/// <exception cref="InvalidOperationException">Thrown when the provided value is not of type <see cref="Int32OrStringV1"/>.</exception>
Aspire.Hosting.Kubernetes.Tests (2)
KubernetesEnvironmentResourceTests.cs (2)
49var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => ExecuteBeforeStartHooksAsync(app, default));
Aspire.Hosting.Orleans (2)
OrleansServiceClientExtensions.cs (1)
20/// <exception cref="InvalidOperationException">Clustering has not been configured.</exception>
OrleansServiceExtensions.cs (1)
346/// <exception cref="InvalidOperationException">Clustering has not been configured.</exception>
Aspire.Hosting.Testing (2)
DistributedApplicationFactory.cs (1)
110/// <exception cref="InvalidOperationException">The resource has no endpoints.</exception>
DistributedApplicationHostingTestingExtensions.cs (1)
66/// <exception cref="InvalidOperationException">The resource has no endpoints.</exception>
Aspire.Hosting.Testing.Tests (9)
TestingBuilderTests.cs (7)
72var ioe = await Assert.ThrowsAsync<InvalidOperationException>(() => DistributedApplicationTestingBuilder.CreateAsync(typeof(Microsoft.Extensions.Logging.ConsoleLoggerExtensions))); 201Assert.Throws<InvalidOperationException>(() => app.CreateHttpClient("mywebapp1")); 450var exception = await Assert.ThrowsAsync<InvalidOperationException>(() => 470var exception = await Assert.ThrowsAsync<InvalidOperationException>(() => app.StartAsync().WaitAsync(cts.Token));
TestingFactoryCrashTests.cs (2)
27var exception = await Assert.ThrowsAsync<InvalidOperationException>(() => factory.StartAsync().WaitAsync(cts.Token));
Aspire.Hosting.Tests (51)
Dcp\DcpExecutorTests.cs (6)
372var exception = await Assert.ThrowsAsync<InvalidOperationException>(() => appExecutor.RunApplicationAsync()); 524var exception = await Assert.ThrowsAsync<InvalidOperationException>(() => appExecutor.RunApplicationAsync()); 963var exception = await Assert.ThrowsAsync<InvalidOperationException>(() => appExecutor.RunApplicationAsync());
DistributedApplicationBuilderExtensionsTests.cs (4)
14var missingException = Assert.Throws<InvalidOperationException>(() => appBuilder.CreateResourceBuilder<RedisResource>("non-existent-resource")); 23var incorrectTypeException = Assert.Throws<InvalidOperationException>(() => appBuilder.CreateResourceBuilder<PostgresServerResource>("redis"));
DistributedApplicationTests.cs (6)
1015var ex = await Assert.ThrowsAsync<InvalidOperationException>(async () => await app.StartAsync().DefaultTimeout(TestConstants.DefaultOrchestratorTestLongTimeout)); 1034var ex = await Assert.ThrowsAsync<InvalidOperationException>(async () => await app.StartAsync().DefaultTimeout(TestConstants.DefaultOrchestratorTestLongTimeout)); 1265var ex = await Assert.ThrowsAsync<InvalidOperationException>(async () => await app.StartAsync().DefaultTimeout(TestConstants.DefaultOrchestratorTestLongTimeout));
InteractionServiceTests.cs (3)
166await Assert.ThrowsAsync<InvalidOperationException>( 168await Assert.ThrowsAsync<InvalidOperationException>( 170await Assert.ThrowsAsync<InvalidOperationException>(
Orchestrator\ApplicationOrchestratorTests.cs (2)
341var e = Assert.Throws<InvalidOperationException>(() => app.Services.GetService<ApplicationOrchestrator>());
Orchestrator\ParameterProcessorTests.cs (1)
161Assert.IsType<InvalidOperationException>(parameterWithError.WaitForValueTcs.Task.Exception?.InnerException);
Publishing\PublishingActivityProgressReporterTests.cs (22)
98var exception = await Assert.ThrowsAsync<InvalidOperationException>( 115var exception = await Assert.ThrowsAsync<InvalidOperationException>( 202var exception = await Assert.ThrowsAsync<InvalidOperationException>( 219var exception = await Assert.ThrowsAsync<InvalidOperationException>( 273var exception = await Assert.ThrowsAsync<InvalidOperationException>( 391var exception = await Assert.ThrowsAsync<InvalidOperationException>( 410var exception = await Assert.ThrowsAsync<InvalidOperationException>( 434var updateException = await Assert.ThrowsAsync<InvalidOperationException>( 440var completeException = await Assert.ThrowsAsync<InvalidOperationException>( 445var createException = await Assert.ThrowsAsync<InvalidOperationException>( 463var exception = await Assert.ThrowsAsync<InvalidOperationException>(async () => await _interactionService.PromptInputAsync("Test Prompt", "test-description", "text-label", "test-placeholder"));
ResourceExtensionsTests.cs (2)
309var ex = Assert.Throws<InvalidOperationException>(() => resourceBuilder.Resource.GetDeploymentTargetAnnotation());
WithEndpointTests.cs (2)
236var ex = Assert.Throws<InvalidOperationException>(() =>
WithReferenceTests.cs (2)
370Assert.Throws<InvalidOperationException>(() => builder.AddProject<ProjectA>("projecta").WithReference("petstore", new Uri("petstore.swagger.io", UriKind.Relative))); 378Assert.Throws<InvalidOperationException>(() => builder.AddProject<ProjectA>("projecta").WithReference("petstore", new Uri("https://petstore.swagger.io/v2")));
WithUrlsTests.cs (1)
119catch (InvalidOperationException ex)
Aspire.Keycloak.Authentication.Tests (8)
AspireKeycloakExtensionTests.cs (8)
29var exception = Assert.Throws<InvalidOperationException>(() => 49var exception = Assert.Throws<InvalidOperationException>(() => 110var exception = Assert.Throws<InvalidOperationException>(() => 130var exception = Assert.Throws<InvalidOperationException>(() =>
Aspire.Microsoft.Azure.Cosmos (6)
AspireMicrosoftAzureCosmosExtensions.cs (6)
29/// <exception cref="InvalidOperationException">If required ConnectionString is not provided in configuration section</exception> 58/// <exception cref="InvalidOperationException">If required ConnectionString is not provided in configuration section</exception> 87/// <exception cref="InvalidOperationException">If required ConnectionString is not provided in configuration section</exception> 122/// <exception cref="InvalidOperationException">If required ConnectionString is not provided in configuration section</exception> 151/// <exception cref="InvalidOperationException">If required ConnectionString is not provided in configuration section</exception> 174/// <exception cref="InvalidOperationException">If required ConnectionString is not provided in configuration section</exception>
Aspire.Microsoft.Azure.Cosmos.Tests (10)
AspireMicrosoftAzureCosmosExtensionsTests.cs (10)
170var exception = Assert.Throws<InvalidOperationException>(host.Services.GetRequiredService<Container>); 187var exception = Assert.Throws<InvalidOperationException>(() => host.Services.GetKeyedService<Container>(serviceKey)); 203var exception = Assert.Throws<InvalidOperationException>(host.Services.GetRequiredService<Database>); 219var exception = Assert.Throws<InvalidOperationException>(() => host.Services.GetRequiredKeyedService<Database>(serviceKey)); 490var exception = Assert.Throws<InvalidOperationException>(
Aspire.Microsoft.Data.SqlClient (2)
AspireSqlServerSqlClientExtensions.cs (2)
30/// <exception cref="InvalidOperationException">If required <see cref="MicrosoftDataSqlClientSettings.ConnectionString"/> is not provided in configuration section.</exception> 42/// <exception cref="InvalidOperationException">If required <see cref="MicrosoftDataSqlClientSettings.ConnectionString"/> is not provided in configuration section.</exception>
Aspire.Microsoft.EntityFrameworkCore.Cosmos (3)
AspireAzureEFCoreCosmosExtensions.cs (3)
36/// <exception cref="InvalidOperationException">Thrown when mandatory <see cref="EntityFrameworkCoreCosmosSettings.ConnectionString"/> is not provided.</exception> 79/// <exception cref="InvalidOperationException">Thrown when mandatory <see cref="EntityFrameworkCoreCosmosSettings.ConnectionString"/> is not provided.</exception> 178/// <exception cref="InvalidOperationException">Thrown when mandatory <see cref="DbContext"/> is not registered in DI.</exception>
Aspire.Microsoft.EntityFrameworkCore.Cosmos.Tests (12)
AspireAzureEfCoreCosmosDBExtensionsTests.cs (8)
173var exception = Assert.Throws<InvalidOperationException>(() => builder.AddCosmosDbContext<TestDbContext>("cosmos", "databaseName")); 312var exception = Assert.Throws<InvalidOperationException>(() => builder.AddCosmosDbContext<TestDbContext>("cosmos")); 325var exception = Assert.Throws<InvalidOperationException>(host.Services.GetRequiredService<TestDbContext>); 338var exception = Assert.Throws<InvalidOperationException>(() => builder.AddCosmosDbContext<TestDbContext>("cosmos"));
EnrichCosmosDbTests.cs (4)
31var exception = Assert.Throws<InvalidOperationException>(() => builder.EnrichCosmosDbContext<TestDbContext>()); 134var exception = Assert.Throws<InvalidOperationException>(host.Services.GetRequiredService<TestDbContext>);
Aspire.Microsoft.EntityFrameworkCore.SqlServer (2)
AspireSqlServerEFCoreSqlClientExtensions.cs (2)
36/// <exception cref="InvalidOperationException">Thrown when mandatory <see cref="MicrosoftEntityFrameworkCoreSqlServerSettings.ConnectionString"/> is not provided.</exception> 95/// <exception cref="InvalidOperationException">Thrown when mandatory <see cref="DbContext"/> is not registered in DI.</exception>
Aspire.Microsoft.EntityFrameworkCore.SqlServer.Tests (8)
AspireSqlServerEFCoreSqlClientExtensionsTests.cs (2)
274var exception = Assert.Throws<InvalidOperationException>(() => builder.AddSqlServerDbContext<TestDbContext>("sqlconnection"));
EnrichSqlServerTests.cs (6)
35var exception = Assert.Throws<InvalidOperationException>(() => builder.EnrichSqlServerDbContext<TestDbContext>()); 108var exception = Assert.Throws<InvalidOperationException>(host.Services.GetRequiredService<TestDbContext>); 303var exception = Assert.Throws<InvalidOperationException>(host.Services.GetRequiredService<TestDbContext>);
Aspire.Milvus.Client (2)
AspireMilvusExtensions.cs (2)
29/// <exception cref="InvalidOperationException">If required ConnectionString is not provided in configuration section</exception> 46/// <exception cref="InvalidOperationException">If required ConnectionString is not provided in configuration section</exception>
Aspire.MongoDB.Driver (2)
AspireMongoDBDriverExtensions.cs (2)
31/// <exception cref="InvalidOperationException">Thrown when mandatory <see cref="MongoDBSettings.ConnectionString"/> is not provided.</exception> 50/// <exception cref="InvalidOperationException">Thrown when mandatory <see cref="MongoDBSettings.ConnectionString"/> is not provided.</exception>
Aspire.MySqlConnector (2)
AspireMySqlConnectorExtensions.cs (2)
31/// <exception cref="InvalidOperationException">Thrown when mandatory <see cref="MySqlConnectorSettings.ConnectionString"/> is not provided.</exception> 45/// <exception cref="InvalidOperationException">Thrown when mandatory <see cref="MySqlConnectorSettings.ConnectionString"/> is not provided.</exception>
Aspire.NATS.Net (2)
AspireNatsClientExtensions.cs (2)
53/// <exception cref="InvalidOperationException">Thrown when mandatory <see cref="NatsClientSettings.ConnectionString"/> is not provided.</exception> 109/// <exception cref="InvalidOperationException">Thrown when mandatory <see cref="NatsClientSettings.ConnectionString"/> is not provided.</exception>
Aspire.Npgsql (2)
AspirePostgreSqlNpgsqlExtensions.cs (2)
31/// <exception cref="InvalidOperationException">Thrown when mandatory <see cref="NpgsqlSettings.ConnectionString"/> is not provided.</exception> 46/// <exception cref="InvalidOperationException">Thrown when mandatory <see cref="NpgsqlSettings.ConnectionString"/> is not provided.</exception>
Aspire.Npgsql.EntityFrameworkCore.PostgreSQL (2)
AspireEFPostgreSqlExtensions.cs (2)
44/// <exception cref="InvalidOperationException">Thrown when mandatory <see cref="NpgsqlEntityFrameworkCorePostgreSQLSettings.ConnectionString"/> is not provided.</exception> 106/// <exception cref="InvalidOperationException">Thrown when mandatory <see cref="DbContext"/> is not registered in DI.</exception>
Aspire.Npgsql.EntityFrameworkCore.PostgreSQL.Tests (8)
AspireEFPostgreSqlExtensionsTests.cs (2)
282var exception = Assert.Throws<InvalidOperationException>(() => builder.AddNpgsqlDbContext<TestDbContext>("npgsql"));
EnrichNpgsqlTests.cs (6)
39var exception = Assert.Throws<InvalidOperationException>(() => builder.EnrichNpgsqlDbContext<TestDbContext>()); 114var exception = Assert.Throws<InvalidOperationException>(host.Services.GetRequiredService<TestDbContext>); 317var exception = Assert.Throws<InvalidOperationException>(host.Services.GetRequiredService<TestDbContext>);
Aspire.OpenAI.Tests (10)
AspireOpenAIClientBuilderChatClientExtensionsTests.cs (4)
125var ex = Assert.Throws<InvalidOperationException>(() => 156var ex = Assert.Throws<InvalidOperationException>(() =>
AspireOpenAIClientBuilderEmbeddingGeneratorExtensionsTests.cs (4)
125var ex = Assert.Throws<InvalidOperationException>(() => 156var ex = Assert.Throws<InvalidOperationException>(() =>
AspireOpenAIExtensionsTests.cs (2)
103var exception = Assert.Throws<InvalidOperationException>(host.Services.GetRequiredService<OpenAIClient>);
Aspire.Oracle.EntityFrameworkCore (2)
AspireOracleEFCoreExtensions.cs (2)
37/// <exception cref="InvalidOperationException">Thrown when mandatory <see cref="OracleEntityFrameworkCoreSettings.ConnectionString"/> is not provided.</exception> 94/// <exception cref="InvalidOperationException">Thrown when mandatory <see cref="DbContext"/> is not registered in DI.</exception>
Aspire.Oracle.EntityFrameworkCore.Tests (8)
AspireOracleEFCoreDatabaseExtensionsTests.cs (2)
275var exception = Assert.Throws<InvalidOperationException>(() => builder.AddOracleDatabaseDbContext<TestDbContext>("orclconnection"));
EnrichOracleDatabaseTests.cs (6)
35var exception = Assert.Throws<InvalidOperationException>(() => builder.EnrichOracleDatabaseDbContext<TestDbContext>()); 108var exception = Assert.Throws<InvalidOperationException>(host.Services.GetRequiredService<TestDbContext>); 303var exception = Assert.Throws<InvalidOperationException>(host.Services.GetRequiredService<TestDbContext>);
Aspire.Pomelo.EntityFrameworkCore.MySql (2)
AspireEFMySqlExtensions.cs (2)
48/// <exception cref="InvalidOperationException">Thrown when mandatory <see cref="PomeloEntityFrameworkCoreMySqlSettings.ConnectionString"/> is not provided.</exception> 143/// <exception cref="InvalidOperationException">Thrown when mandatory <see cref="DbContext"/> is not registered in DI.</exception>
Aspire.Pomelo.EntityFrameworkCore.MySql.Tests (8)
AspireEFMySqlExtensionsTests.cs (2)
269var exception = Assert.Throws<InvalidOperationException>(() => builder.AddMySqlDbContext<TestDbContext>("mysql"));
EnrichMySqlTests.cs (6)
49var exception = Assert.Throws<InvalidOperationException>(() => builder.EnrichMySqlDbContext<TestDbContext>()); 122var exception = Assert.Throws<InvalidOperationException>(host.Services.GetRequiredService<TestDbContext>); 317var exception = Assert.Throws<InvalidOperationException>(host.Services.GetRequiredService<TestDbContext>);
Aspire.Qdrant.Client (2)
AspireQdrantExtensions.cs (2)
29/// <exception cref="InvalidOperationException">If required ConnectionString is not provided in configuration section</exception> 44/// <exception cref="InvalidOperationException">If required ConnectionString is not provided in configuration section</exception>
Aspire.RabbitMQ.Client.Tests (1)
AspireRabbitMQLoggingTests.cs (1)
165InvalidOperationException innerException = new("Inner exception");
Aspire.RabbitMQ.Client.v7.Tests (1)
tests\Aspire.RabbitMQ.Client.Tests\AspireRabbitMQLoggingTests.cs (1)
165InvalidOperationException innerException = new("Inner exception");
Aspire.Templates.Tests (1)
tests\Shared\TemplatesTesting\TestExtensions.cs (1)
26catch (InvalidOperationException ie) when (ie.Message.Contains("No process is associated with this object"))
Binding.Http.IntegrationTests (1)
OperationContextTests.cs (1)
52Assert.Throws<InvalidOperationException>(() => scope.Dispose());
BuildActionTelemetryTable (2)
src\Dependencies\Contracts\ExceptionUtilities.cs (2)
17/// Creates an <see cref="InvalidOperationException"/> with information about an unexpected value. 20/// <returns>The <see cref="InvalidOperationException"/>, which should be thrown by the caller.</returns>
Client.ClientBase.IntegrationTests (5)
DuplexClientBaseTests.4.1.0.cs (2)
33var exception = Assert.Throws<InvalidOperationException>(() =>
SessionTests.cs (3)
107Assert.Throws<InvalidOperationException>(() => 131Assert.Throws<InvalidOperationException>(() => 155Assert.Throws<InvalidOperationException>(() =>
CodeStyleConfigFileGenerator (2)
src\Dependencies\Contracts\ExceptionUtilities.cs (2)
17/// Creates an <see cref="InvalidOperationException"/> with information about an unexpected value. 20/// <returns>The <see cref="InvalidOperationException"/>, which should be thrown by the caller.</returns>
Diagnostics.EFCore.FunctionalTests (4)
DatabaseErrorPageMiddlewareTest.cs (2)
80var ex = await Assert.ThrowsAsync<InvalidOperationException>(async () =>
MigrationsEndPointMiddlewareTest.cs (2)
261var ex = await Assert.ThrowsAsync<InvalidOperationException>(async () =>
dotnet-svcutil-lib (18)
CodeDomFixup\MethodCreationHelper.cs (2)
2214typeof(InvalidOperationException), 2224typeof(InvalidOperationException),
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\DataContractSet.cs (1)
405catch (InvalidOperationException)
FrameworkFork\System.ServiceModel\System\IdentityModel\Tokens\KeyInfoSerializer.cs (1)
333return ((e is ArgumentException) || (e is FormatException) || (e is InvalidOperationException));
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\MessageFault.cs (1)
89catch (InvalidOperationException e)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\ServiceChannel.cs (1)
864catch (InvalidOperationException)
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\MessageContractImporter.cs (1)
1720catch (InvalidOperationException ex)
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\ChannelDispatcher.cs (5)
466catch (InvalidOperationException e) 485private InvalidOperationException CreateOuterExceptionWithEndpointsInformation(InvalidOperationException e) 542catch (InvalidOperationException e) 561catch (InvalidOperationException e)
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\DataContractSerializerOperationFormatter.cs (1)
421catch (System.InvalidOperationException e)
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\XmlSerializerOperationFormatter.cs (4)
124catch (InvalidOperationException e) 235catch (InvalidOperationException e) 298catch (InvalidOperationException e) 380catch (InvalidOperationException e)
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\WSSecurityTokenSerializer.cs (1)
206return ((e is ArgumentException) || (e is FormatException) || (e is InvalidOperationException));
GenerateDocumentationAndConfigFiles (6)
src\Dependencies\Contracts\ExceptionUtilities.cs (2)
17/// Creates an <see cref="InvalidOperationException"/> with information about an unexpected value. 20/// <returns>The <see cref="InvalidOperationException"/>, which should be thrown by the caller.</returns>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\NonReentrantLock.cs (2)
147/// <exception cref="InvalidOperationException">The lock is not currently held by the calling thread.</exception> 171/// <exception cref="InvalidOperationException">The lock is not currently held by the calling thread.</exception>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Diagnostics\DiagnosticSeverityExtensions.cs (1)
18/// <exception cref="InvalidOperationException">
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Diagnostics\ReportDiagnosticExtensions.cs (1)
20/// <exception cref="InvalidOperationException">
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 (131)
ChunkedRequestTests.cs (7)
243Assert.Throws<InvalidOperationException>(() => request.GetTrailer("X-Trailer-Header")); // Not yet 250Assert.Throws<InvalidOperationException>(() => request.GetTrailer("X-Trailer-Header")); // Not yet 258Assert.Throws<InvalidOperationException>(() => request.GetTrailer("X-Trailer-Header")); 369Assert.Throws<InvalidOperationException>(() => request.GetTrailer("X-Trailer-Header")); // Not yet 376Assert.Throws<InvalidOperationException>(() => request.GetTrailer("X-Trailer-Header")); // Not yet 384Assert.Throws<InvalidOperationException>(() => request.GetTrailer("X-Trailer-Header")); 982await Assert.ThrowsAsync<InvalidOperationException>(async () => await request.BodyReader.ReadAsync());
ConnectionMiddlewareTests.cs (1)
175Assert.Equal(typeof(InvalidOperationException).FullName, m.Tags[KestrelMetrics.ErrorTypeAttributeName]);
Http2\Http2StreamTests.cs (28)
1508InvalidOperationException ex = null; 1519ex = Assert.Throws<InvalidOperationException>(() => context.Response.OnStarting(_ => Task.CompletedTask, null)); 2144Assert.Throws<InvalidOperationException>(() => context.Response.Headers.Append("Custom你好Name", "Custom Value")); 2145Assert.Throws<InvalidOperationException>(() => context.Response.ContentType = "Custom 你好 Type"); 2146Assert.Throws<InvalidOperationException>(() => context.Response.Headers.Append("CustomName", "Custom 你好 Value")); 2147Assert.Throws<InvalidOperationException>(() => context.Response.Headers.Append("CustomName", "Custom \r Value")); 2185Assert.Throws<InvalidOperationException>(() => context.Response.Headers.Append("Custom你好Name", "Custom Value")); 2186Assert.Throws<InvalidOperationException>(() => context.Response.Headers.Append("CustomName", "Custom \r Value")); 2469Assert.Throws<InvalidOperationException>(() => context.Response.AppendTrailer("Custom你好Name", "Custom Value")); 2470Assert.Throws<InvalidOperationException>(() => context.Response.AppendTrailer("CustomName", "Custom 你好 Value")); 2471Assert.Throws<InvalidOperationException>(() => context.Response.AppendTrailer("CustomName", "Custom \r Value")); 2473Assert.Throws<InvalidOperationException>(() => context.Features.Get<IHttpResponseTrailersFeature>().Trailers.ETag = "Custom 你好 Tag"); 2474Assert.Throws<InvalidOperationException>(() => context.Features.Get<IHttpResponseTrailersFeature>().Trailers.Accept = "Custom 你好 Tag"); 2512Assert.Throws<InvalidOperationException>(() => context.Response.AppendTrailer("Custom你好Name", "Custom Value")); 2513Assert.Throws<InvalidOperationException>(() => context.Response.AppendTrailer("CustomName", "Custom \r Value")); 4661InvalidOperationException writeEx = null; 4671writeEx = await Assert.ThrowsAsync<InvalidOperationException>(() => context.Response.WriteAsync("")); 4867var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => context.Response.CompleteAsync().DefaultTimeout()); 4990var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => context.Response.WriteAsync("2 Hello World").DefaultTimeout()); 5049var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => context.Response.WriteAsync("2 Hello World").DefaultTimeout()); 5109catch (InvalidOperationException) 5315var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => context.Response.CompleteAsync().DefaultTimeout()); 5386var 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)
864Assert.Throws<InvalidOperationException>(() => context.Response.Headers.Append("Custom你好Name", "Custom Value")); 865Assert.Throws<InvalidOperationException>(() => context.Response.ContentType = "Custom 你好 Type"); 866Assert.Throws<InvalidOperationException>(() => context.Response.Headers.Append("CustomName", "Custom 你好 Value")); 867Assert.Throws<InvalidOperationException>(() => context.Response.Headers.Append("CustomName", "Custom \r Value")); 898Assert.Throws<InvalidOperationException>(() => context.Response.Headers.Append("Custom你好Name", "Custom Value")); 899Assert.Throws<InvalidOperationException>(() => context.Response.Headers.Append("CustomName", "Custom \r Value")); 1015Assert.Throws<InvalidOperationException>(() => context.Response.AppendTrailer("Custom你好Name", "Custom Value")); 1016Assert.Throws<InvalidOperationException>(() => context.Response.AppendTrailer("CustomName", "Custom 你好 Value")); 1017Assert.Throws<InvalidOperationException>(() => context.Response.AppendTrailer("CustomName", "Custom \r Value")); 1019Assert.Throws<InvalidOperationException>(() => context.Features.Get<IHttpResponseTrailersFeature>().Trailers.ETag = "Custom 你好 Tag"); 1020Assert.Throws<InvalidOperationException>(() => context.Features.Get<IHttpResponseTrailersFeature>().Trailers.Accept = "Custom 你好 Tag"); 1046Assert.Throws<InvalidOperationException>(() => context.Response.AppendTrailer("Custom你好Name", "Custom Value")); 1047Assert.Throws<InvalidOperationException>(() => context.Response.AppendTrailer("CustomName", "Custom \r Value")); 1244var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => context.Response.CompleteAsync().DefaultTimeout()); 1347var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => context.Response.WriteAsync("2 Hello World").DefaultTimeout()); 1399var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => context.Response.WriteAsync("2 Hello World").DefaultTimeout()); 1445catch (InvalidOperationException) 1606var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => context.Response.CompleteAsync().DefaultTimeout()); 1664var ex = Assert.Throws<InvalidOperationException>(() => context.Response.BodyWriter.Complete()); 2080var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => readTrailersTcs.Task).DefaultTimeout();
HttpProtocolSelectionTests.cs (1)
22return TestError<InvalidOperationException>(HttpProtocols.None, CoreStrings.EndPointRequiresAtLeastOneProtocol);
HttpsConnectionMiddlewareTests.cs (6)
902var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => context.Connection.GetClientCertificateAsync()); 1086var ioe = await Assert.ThrowsAsync<InvalidOperationException>(() => context.Connection.GetClientCertificateAsync()); 1348var ex = Assert.Throws<InvalidOperationException>(() =>
MaxRequestBodySizeTests.cs (4)
286InvalidOperationException invalidOpEx = null; 297invalidOpEx = Assert.Throws<InvalidOperationException>(() => 326InvalidOperationException invalidOpEx = null; 337invalidOpEx = Assert.Throws<InvalidOperationException>(() =>
RequestTests.cs (9)
1698var ioEx = Assert.Throws<InvalidOperationException>(() => context.Request.Body.Read(new byte[1], 0, 1)); 1701var ioEx2 = Assert.Throws<InvalidOperationException>(() => context.Request.Body.CopyTo(Stream.Null)); 1791var ioEx = Assert.Throws<InvalidOperationException>(() => context.Request.Body.Read(new byte[1], 0, 1)); 1794var ioEx2 = Assert.Throws<InvalidOperationException>(() => context.Request.Body.CopyTo(Stream.Null)); 1965await 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)
77InvalidOperationException ex = null; 83ex = Assert.Throws<InvalidOperationException>(() => context.Response.OnStarting(_ => Task.CompletedTask, null)); 112InvalidOperationException ex = null; 117ex = Assert.Throws<InvalidOperationException>(() => context.Response.OnStarting(_ => Task.CompletedTask, null)); 703var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => responseWriteTcs.Task).DefaultTimeout(); 781var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => responseWriteTcs.Task).DefaultTimeout(); 819var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => responseWriteTcs.Task).DefaultTimeout(); 861var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => responseWriteTcs.Task).DefaultTimeout(); 1150m.Exception is InvalidOperationException ex && 1157InvalidOperationException completeEx = null; 1174completeEx = Assert.Throws<InvalidOperationException>(() => httpContext.Response.BodyWriter.Complete()); 1207m.Exception is InvalidOperationException ex && 3612var ioEx = Assert.Throws<InvalidOperationException>(() => context.Response.Body.Write(Encoding.ASCII.GetBytes("What!?"), 0, 6)); 3708var ioEx = Assert.Throws<InvalidOperationException>(() => context.Response.Body.Write(Encoding.ASCII.GetBytes("What!?"), 0, 6)); 3832Assert.Throws<InvalidOperationException>(() => response.BodyWriter.Advance(1)); 4029InvalidOperationException writeEx = null; 4034writeEx = await Assert.ThrowsAsync<InvalidOperationException>(() => httpContext.Response.WriteAsync("test")); 4261Assert.Throws<InvalidOperationException>(() => httpContext.Response.BodyWriter.Advance(1)); 4432Assert.Throws<InvalidOperationException>(() => httpContext.Response.BodyWriter.Advance(1)); 4458InvalidOperationException writeEx = null; 4464writeEx = 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)
527catch (InvalidOperationException) 541catch (InvalidOperationException)
src\Servers\IIS\IIS\test\testassets\InProcessWebSite\Startup.WebSockets.cs (2)
101var 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)
Metrics (6)
src\Dependencies\Contracts\ExceptionUtilities.cs (2)
17/// Creates an <see cref="InvalidOperationException"/> with information about an unexpected value. 20/// <returns>The <see cref="InvalidOperationException"/>, which should be thrown by the caller.</returns>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\NonReentrantLock.cs (2)
147/// <exception cref="InvalidOperationException">The lock is not currently held by the calling thread.</exception> 171/// <exception cref="InvalidOperationException">The lock is not currently held by the calling thread.</exception>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Diagnostics\DiagnosticSeverityExtensions.cs (1)
18/// <exception cref="InvalidOperationException">
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Diagnostics\ReportDiagnosticExtensions.cs (1)
20/// <exception cref="InvalidOperationException">
Metrics.Legacy (6)
src\Dependencies\Contracts\ExceptionUtilities.cs (2)
17/// Creates an <see cref="InvalidOperationException"/> with information about an unexpected value. 20/// <returns>The <see cref="InvalidOperationException"/>, which should be thrown by the caller.</returns>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\NonReentrantLock.cs (2)
147/// <exception cref="InvalidOperationException">The lock is not currently held by the calling thread.</exception> 171/// <exception cref="InvalidOperationException">The lock is not currently held by the calling thread.</exception>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Diagnostics\DiagnosticSeverityExtensions.cs (1)
18/// <exception cref="InvalidOperationException">
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Diagnostics\ReportDiagnosticExtensions.cs (1)
20/// <exception cref="InvalidOperationException">
Microsoft.Analyzers.Local (2)
ApiLifecycle\Json\JsonValue.cs (2)
292/// <exception cref="System.InvalidOperationException"> 326/// <exception cref="InvalidOperationException">
Microsoft.Analyzers.Local.Tests (8)
Json\JsonValueTest.cs (6)
179Assert.ThrowsAny<InvalidOperationException>(() => new JsonValue(false)["key"]); 180Assert.ThrowsAny<InvalidOperationException>(() => new JsonValue(false)[null!]); 181Assert.ThrowsAny<InvalidOperationException>(() => new JsonValue(false) { ["key"] = "value" }); 192Assert.ThrowsAny<InvalidOperationException>(() => new JsonValue(false)[0]); 193Assert.ThrowsAny<InvalidOperationException>(() => new JsonValue(false)[-1]); 194Assert.ThrowsAny<InvalidOperationException>(() => new JsonValue(false) { [0] = "value" });
src\Shared\Throw\Throw.cs (2)
390/// Throws an <see cref="System.InvalidOperationException"/>. 401/// Throws an <see cref="System.InvalidOperationException"/>.
Microsoft.AspNetCore.Antiforgery.Test (14)
AntiforgeryApplicationBuilderExtensionsTest.cs (2)
41var exception = Assert.Throws<InvalidOperationException>(() => builder.UseAntiforgery());
DefaultAntiforgeryTest.cs (10)
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.AsyncState (2)
src\Shared\Throw\Throw.cs (2)
390/// Throws an <see cref="System.InvalidOperationException"/>. 401/// Throws an <see cref="System.InvalidOperationException"/>.
Microsoft.AspNetCore.AsyncState.Tests (2)
AsyncContextHttpContextOfTTests.cs (2)
71Assert.Throws<InvalidOperationException>(() => _context.Set(value)); 78Assert.Throws<InvalidOperationException>(() => _context.Get());
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 (68)
AuthenticationMetricsTest.cs (10)
114var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => authenticationService.AuthenticateAsync(httpContext, scheme: "custom")); 166var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => authenticationService.ChallengeAsync(httpContext, scheme: "custom", properties: null)); 217var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => authenticationService.ForbidAsync(httpContext, scheme: "custom", properties: null)); 268var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => authenticationService.SignInAsync(httpContext, scheme: "custom", new ClaimsPrincipal(), properties: null)); 319var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => authenticationService.SignOutAsync(httpContext, scheme: "custom", properties: null));
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)
1289await Assert.ThrowsAsync<InvalidOperationException>(() => context.SignInAsync(JwtBearerDefaults.AuthenticationScheme, new ClaimsPrincipal())); 1293await 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 (7)
470var exception = await Assert.ThrowsAsync<InvalidOperationException>(() => server.SendAsync(ChallengeEndpoint)); 756var exception = await Assert.ThrowsAsync<InvalidOperationException>(() => server.SendAsync(ChallengeEndpoint)); 779var exception = await Assert.ThrowsAsync<InvalidOperationException>(() => server.SendAsync(ChallengeEndpoint)); 964await 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 (10)
AuthorizationAppBuilderExtensionsTests.cs (2)
52var ex = Assert.Throws<InvalidOperationException>(() =>
AuthorizationMetricsTest.cs (3)
75await Assert.ThrowsAsync<InvalidOperationException>(() => authorizationService.AuthorizeAsync(user, "UnknownPolicy")); 157var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => authorizationService.AuthorizeAsync(user, resource: null, new TestRequirement()));
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 (2)
PersistentState\ComponentStatePersistenceManager.cs (1)
131/// <exception cref="InvalidOperationException">when the render mode is already set.</exception>
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 (27)
Binding\FormDataMapperTests.cs (2)
545var result = Assert.Throws<InvalidOperationException>(() => FormDataMapper.Map<int[]>(reader, options));
EndpointHtmlRendererTest.cs (13)
793var exception = await Assert.ThrowsAsync<InvalidOperationException>(async () => await renderer.PrerenderComponentAsync( 813var exception = await Assert.ThrowsAsync<InvalidOperationException>(async () => await renderer.PrerenderComponentAsync( 833var exception = await Assert.ThrowsAsync<InvalidOperationException>(async () => await renderer.PrerenderComponentAsync( 872var exception = await Assert.ThrowsAsync<InvalidOperationException>(async () => await renderer.PrerenderComponentAsync( 946var exception = await Assert.ThrowsAsync<InvalidOperationException>(async () => 989var exception = await Assert.ThrowsAsync<InvalidOperationException>(() => renderer.DispatchSubmitEventAsync("default", out isBadRequest)); 1515await 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 (23)
Circuits\CircuitActivitySourceTest.cs (1)
76var exception = new InvalidOperationException("Test exception");
Circuits\CircuitHostTest.cs (5)
479var expectedException = new InvalidOperationException("Test exception"); 632var exception = Assert.IsType<InvalidOperationException>(evt.Arguments.ExceptionObject); 669var exception = Assert.IsType<InvalidOperationException>(evt.Arguments.ExceptionObject);
Circuits\RemoteJSDataStreamTest.cs (2)
114var ex = await Assert.ThrowsAsync<InvalidOperationException>(async () => await remoteJSDataStream.CopyToAsync(mem).DefaultTimeout());
Circuits\RemoteRendererTest.cs (14)
423var exception = await Assert.ThrowsAsync<InvalidOperationException>(() => renderer.OnRenderCompletedAsync(4, null)); 447var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => AddWebRootComponentAsync(renderer, MaxInteractiveServerRootComponentCount)); 463var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => AddWebRootComponentAsync(renderer, 0)); 476var ex = await Assert.ThrowsAsync<InvalidOperationException>(async () => 514var ex = await Assert.ThrowsAsync<InvalidOperationException>(async () => 534var ex = await Assert.ThrowsAsync<InvalidOperationException>(async () => 613var ex = Assert.Throws<InvalidOperationException>(() => renderer.GetOrCreateWebRootComponentManager().RemoveRootComponent(1));
Circuits\ServerAuthenticationStateProviderTest.cs (1)
14await Assert.ThrowsAsync<InvalidOperationException>(() =>
Microsoft.AspNetCore.Components.Tests (169)
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>(() =>
ComponentsActivitySourceTest.cs (2)
118var exception = new InvalidOperationException("Test exception"); 157var exception = new InvalidOperationException("Test exception");
ComponentsMetricsTest.cs (3)
127var exception = new InvalidOperationException(); 211var exception = new InvalidOperationException(); 292var exception = new 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));
NavigationManagerTest.cs (10)
143var exception = Assert.Throws<InvalidOperationException>(() => navigationManager.GetUriWithQueryParameter(name, "test")); 196var exception = Assert.Throws<InvalidOperationException>(() => navigationManager.GetUriWithQueryParameters(unsupportedParameterValues)); 212var exception = Assert.Throws<InvalidOperationException>(() => navigationManager.GetUriWithQueryParameters(values)); 787var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => navigationManager.RunNotifyLocationChangingAsync($"{baseUri}/subdir1", null, false)); 809var 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 _));
PersistentState\ComponentApplicationStateTest.cs (2)
41Assert.Throws<InvalidOperationException>(() => applicationState.InitializeExistingState(existingState)); 55Assert.Throws<InvalidOperationException>(() => applicationState.RegisterOnPersisting(() => Task.CompletedTask));
PersistentState\ComponentStatePersistenceManagerTest.cs (2)
78await Assert.ThrowsAsync<InvalidOperationException>(() => persistenceManager.RestoreStateAsync(store)); 105await Assert.ThrowsAsync<InvalidOperationException>(() => persistenceManager.PersistStateAsync(store, renderer));
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() 1044var exception = Assert.Throws<InvalidOperationException>(() => new TestRouteTableBuilder() 1146catch (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 (5)
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 (2)
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.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.Middleware.Tests (5)
Logging\AcceptanceTests.cs (3)
655var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => client.GetAsync(requestPath)); 990Assert.IsType<InvalidOperationException>(logCollector.GetSnapshot()[0].Exception);
Logging\LoggingOptionsValidationTests.cs (2)
28var ex = 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) 789catch (InvalidOperationException ex) 840catch (InvalidOperationException ex) 895catch (InvalidOperationException ex) 946catch (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.HeaderParsing (2)
src\Shared\Throw\Throw.cs (2)
390/// Throws an <see cref="System.InvalidOperationException"/>. 401/// Throws an <see cref="System.InvalidOperationException"/>.
Microsoft.AspNetCore.HeaderParsing.Tests (1)
HeaderRegistryTests.cs (1)
61Assert.Throws<InvalidOperationException>(() => registry.Register(CommonHeaders.Date));
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 (31)
EndpointMetadataCollectionTests.cs (1)
90Assert.Throws<InvalidOperationException>(() => metadata.GetRequiredMetadata<string>());
RouteValueDictionaryTests.cs (2)
352var exception = Assert.Throws<InvalidOperationException>(() =>
UseMiddlewareTest.cs (28)
16var exception = Assert.Throws<InvalidOperationException>(() => builder.UseMiddleware(typeof(MiddlewareNoParametersStub))); 30var exception = Assert.Throws<InvalidOperationException>(() => builder.UseMiddleware(typeof(MiddlewareAsyncNoParametersStub))); 44var exception = Assert.Throws<InvalidOperationException>(() => builder.UseMiddleware(typeof(MiddlewareNonTaskReturnStub))); 58var exception = Assert.Throws<InvalidOperationException>(() => builder.UseMiddleware(typeof(MiddlewareAsyncNonTaskReturnStub))); 72var exception = Assert.Throws<InvalidOperationException>(() => builder.UseMiddleware(typeof(MiddlewareNoInvokeStub))); 85var exception = Assert.Throws<InvalidOperationException>(() => builder.UseMiddleware(typeof(MiddlewareMultipleInvokesStub))); 98var exception = Assert.Throws<InvalidOperationException>(() => builder.UseMiddleware(typeof(MiddlewareMultipleInvokeAsyncStub))); 111var exception = Assert.Throws<InvalidOperationException>(() => builder.UseMiddleware(typeof(MiddlewareMultipleInvokeAndInvokeAsyncStub))); 126var exception = await Assert.ThrowsAsync<InvalidOperationException>(() => app(new DefaultHttpContext())); 140var exception = await Assert.ThrowsAsync<InvalidOperationException>(() => app(new DefaultHttpContext())); 153var exception = Assert.Throws<InvalidOperationException>(builder.Build); 165var exception = await Assert.ThrowsAsync<InvalidOperationException>(() => app(new DefaultHttpContext())); 227var exception = await Assert.ThrowsAsync<InvalidOperationException>(async () => 244var 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)
46var exception = await Assert.ThrowsAsync<InvalidOperationException>(() => endpoint.RequestDelegate(httpContext)); 428var exception = Assert.Throws<InvalidOperationException>(() => GetEndpointFromCompilation(compilation, serviceProvider: serviceProvider)); 458var 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)
127var exception = await Assert.ThrowsAsync<InvalidOperationException>( 218var runtimeException = Assert.Throws<InvalidOperationException>(() => GetEndpointFromCompilation(compilation, serviceProvider: serviceProvider)); 225var 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)
94await Assert.ThrowsAsync<InvalidOperationException>(async () => 309await Assert.ThrowsAsync<InvalidOperationException>(async () => 593await Assert.ThrowsAsync<InvalidOperationException>(async () => 954await Assert.ThrowsAsync<InvalidOperationException>(async () => 1400await Assert.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 (1)
Passkeys\AttestationObject.cs (1)
54catch (InvalidOperationException ex)
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)
197await Assert.ThrowsAsync<InvalidOperationException>(async () => await manager.FindByEmailAsync("dupe@dupe.com")); 207await 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)); 886var e = Assert.Throws<InvalidOperationException>(() => services.BuildServiceProvider().GetService<UserManager<PocoUser>>()); 897var e = Assert.Throws<InvalidOperationException>(() => services.BuildServiceProvider().GetService<UserManager<PocoUser>>());
Microsoft.AspNetCore.JsonPatch.SystemTextJson.Tests (2)
JsonPatchDocumentGetPathTest.cs (2)
97var exception = Assert.Throws<InvalidOperationException>(() =>
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 (147)
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 (2)
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 (4)
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)
163var ex = await Assert.ThrowsAsync<InvalidOperationException>(
SimpleWithWebApplicationBuilderExceptionTests.cs (2)
29var ex = Assert.Throws<InvalidOperationException>(() => Factory.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)
380var 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.Testing (3)
WebApplicationFactory.cs (3)
179/// <exception cref="InvalidOperationException">Thrown, if this method is called after the WebHostFactory has been initialized.</exception> 193/// <exception cref="InvalidOperationException">Thrown, if this method is called after the WebHostFactory has been initialized.</exception> 244/// <exception cref="InvalidOperationException">Thrown if the provided <typeparamref name="TEntryPoint"/> type has no factory method.</exception>
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.SourceGenerators (1)
XmlComments\XmlComment.InheritDoc.cs (1)
434catch (InvalidOperationException)
Microsoft.AspNetCore.OpenApi.Tests (6)
Extensions\ApiDescriptionExtensionsTests.cs (2)
79var exception = Assert.Throws<InvalidOperationException>(() => apiDescription.GetHttpMethod());
Services\OpenApiGeneratorTests.cs (2)
76var ex = Assert.Throws<InvalidOperationException>(() => GetOpenApiOperation(lambda.Compile()));
Transformers\Implementations\OpenApiSchemaReferenceTransformerTests.cs (2)
423var exception = await Assert.ThrowsAsync<InvalidOperationException>(() => VerifyOpenApiDocument(builder, _ => { }));
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 (2)
RequestDecompressionMiddlewareTests.cs (1)
399Assert.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)
208var exception = await Assert.ThrowsAsync<InvalidOperationException>(async () => await client.SendAsync(request)); 228exception = Assert.Throws<InvalidOperationException>(() => app.UseAntiforgery()); 428var exception = await Assert.ThrowsAsync<InvalidOperationException>(async () => await client.SendAsync(request)); 487var exception = await Assert.ThrowsAsync<InvalidOperationException>(async () => await client.SendAsync(request));
Microsoft.AspNetCore.Routing.Tests (81)
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 (8)
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 (1)
IHttpSysRequestPropertyFeature.cs (1)
34/// <exception cref="InvalidOperationException">If HttpSys does not support querying the TLS Client Hello.</exception>
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (25)
DelegateTests.cs (2)
92Assert.Throws<InvalidOperationException>(() => delegateFeature.DelegateRequest(destination)); 158Assert.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)
305Assert.Throws<InvalidOperationException>(() => 310Assert.Throws<InvalidOperationException>(() => 315Assert.Throws<InvalidOperationException>(() => 320Assert.Throws<InvalidOperationException>(() => 326Assert.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)
424catch (InvalidOperationException) 549catch (InvalidOperationException) 729catch (InvalidOperationException) when (_requestProcessingStatus == RequestProcessingStatus.ParsingHeaders)
Internal\Http\Http1MessageBody.cs (2)
70catch (InvalidOperationException ex) 105catch (InvalidOperationException ex)
Internal\Http\HttpProtocol.cs (2)
890private InvalidOperationException GetTooManyBytesWrittenException(int count) 1326var ex = new InvalidOperationException(message);
Internal\Http2\Http2Connection.cs (1)
1652catch (InvalidOperationException)
Internal\Http2\Http2Stream.cs (1)
454catch (InvalidOperationException)
Internal\Http3\Http3Stream.cs (2)
365catch (InvalidOperationException) 1216catch (InvalidOperationException)
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (104)
AsciiDecoding.cs (1)
64Assert.Throws<InvalidOperationException>(() => new Span<byte>(byteRange).GetAsciiString());
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)
22var exception = Assert.Throws<InvalidOperationException>(() => memoryPool.Dispose()); 33var exception = Assert.Throws<InvalidOperationException>(() => block.Dispose()); 43var exception = Assert.Throws<InvalidOperationException>(() => block.Dispose()); 57var exception = Assert.Throws<InvalidOperationException>(() => block.Memory); 70var exception = Assert.Throws<InvalidOperationException>(() => memory.Pin()); 88catch (InvalidOperationException ode) 105var exception = Assert.Throws<InvalidOperationException>(() => MemoryMarshal.TryGetArray<byte>(memory, out _)); 194var exception = Assert.Throws<InvalidOperationException>(() => block.Memory); 211var exception = Assert.Throws<InvalidOperationException>(() => block.Memory); 218var 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)); 591await Assert.ThrowsAsync<InvalidOperationException>(() => _http1Connection.WriteAsync(new ArraySegment<byte>(new byte[1]))); 602await Assert.ThrowsAsync<InvalidOperationException>(() => _http1Connection.WriteAsync(new ArraySegment<byte>(new byte[1]), default(CancellationToken))); 638await Assert.ThrowsAsync<InvalidOperationException>(() => _http1Connection.FlushAsync()); 652await Assert.ThrowsAsync<InvalidOperationException>(() => _http1Connection.FlushAsync()); 940var 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)
110Assert.Throws<InvalidOperationException>(() => 115Assert.Throws<InvalidOperationException>(() => 120Assert.Throws<InvalidOperationException>(() => 125Assert.Throws<InvalidOperationException>(() => 131Assert.Throws<InvalidOperationException>(() => 155Assert.Throws<InvalidOperationException>(() => 161Assert.Throws<InvalidOperationException>(() => 193Assert.Throws<InvalidOperationException>(() => 199Assert.Throws<InvalidOperationException>(() => 204Assert.Throws<InvalidOperationException>(() => 209Assert.Throws<InvalidOperationException>(() => 214Assert.Throws<InvalidOperationException>(() => 219Assert.Throws<InvalidOperationException>(() => 225Assert.Throws<InvalidOperationException>(() => 267Assert.Throws<InvalidOperationException>(() => ((IDictionary<string, StringValues>)headers).Add("my-header", new[] { "value" })); 276Assert.Throws<InvalidOperationException>(() => headers.ContentLength = null); 287Assert.Throws<InvalidOperationException>(() => dictionary["my-header"] = "other-value"); 298Assert.Throws<InvalidOperationException>(() => dictionary.Remove("my-header")); 309Assert.Throws<InvalidOperationException>(() => dictionary.Clear()); 319var exception = Assert.Throws<InvalidOperationException>(() => dictionary.Add("Content-Length", new[] { contentLength })); 330var exception = Assert.Throws<InvalidOperationException>(() => ((IHeaderDictionary)headers)["Content-Length"] = contentLength); 340var 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 (18)
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)); 320var exception = Assert.Throws<InvalidOperationException>(() => 351var exception = await Assert.ThrowsAsync<InvalidOperationException>( 392var exception = await Assert.ThrowsAsync<InvalidOperationException>( 607var unbindException = new InvalidOperationException(); 648Assert.Same(unbindException, await Assert.ThrowsAsync<InvalidOperationException>(() => stopTask1.TimeoutAfter(timeout))); 649Assert.Same(unbindException, await Assert.ThrowsAsync<InvalidOperationException>(() => stopTask2.TimeoutAfter(timeout))); 650Assert.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)
371Assert.Throws<InvalidOperationException>(() => serverOptions.ConfigurationLoader.Reload()); 673var ex = Assert.Throws<InvalidOperationException>(() => 802var ex = Assert.Throws<InvalidOperationException>(() => serverOptions.Configure(config).Load()); 811ex = Assert.Throws<InvalidOperationException>(() => serverOptions.Configure(config).Load()); 820ex = Assert.Throws<InvalidOperationException>(() => serverOptions.Configure(config).Load()); 829ex = Assert.Throws<InvalidOperationException>(() => serverOptions.Configure(config).Load()); 838ex = Assert.Throws<InvalidOperationException>(() => serverOptions.Configure(config).Load()); 1792Assert.Throws<InvalidOperationException>(serverOptions.ConfigurationLoader.ProcessEndpointsToAdd);
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic.Tests (6)
QuicTransportFactoryTests.cs (4)
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()); 599var 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)
329var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => channel.ReadAndCollectAllAsync()).DefaultTimeout(); 375var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => invokeTask).DefaultTimeout(); 744var ex = Assert.Throws<InvalidOperationException>(
Microsoft.AspNetCore.SignalR.Core (1)
Internal\TypedClientBuilder.cs (1)
192generator.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 (49)
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.Activity.cs (3)
332linkedActivity: null, exceptionType: typeof(InvalidOperationException), activityName: SignalRServerActivitySource.OnConnected); 385linkedActivity: null, exceptionType: typeof(InvalidOperationException), activityName: SignalRServerActivitySource.OnDisconnected); 486mockHttpRequestActivity, exceptionType: typeof(InvalidOperationException));
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(); 5064var ex = Assert.Throws<InvalidOperationException>(() => serviceProvider.GetService<HubConnectionHandler<KeyedServicesHub>>()); 5080var ex = Assert.Throws<InvalidOperationException>(() => serviceProvider.GetService<HubConnectionHandler<BadServicesHub>>()); 5091Assert.Throws<InvalidOperationException>(
Internal\MessageBufferTests.cs (1)
294Assert.Throws<InvalidOperationException>(() => messageBuffer.ShouldProcessMessage(new SequenceMessage(2)));
Internal\TypedClientBuilderTests.cs (20)
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>(() =>
NativeAotTests.cs (4)
148var e = await Assert.ThrowsAsync<InvalidOperationException>(() => InProcessTestServer<Startup<ChannelValueTypeMethodHub>>.StartServer(NullLoggerFactory.Instance)); 154var e = await Assert.ThrowsAsync<InvalidOperationException>(() => InProcessTestServer<Startup<EnumerableValueTypeMethodHub>>.StartServer(NullLoggerFactory.Instance));
Microsoft.AspNetCore.SpaServices.Extensions.Tests (2)
SpaServicesExtensionsTests.cs (2)
35var exception = Assert.Throws<InvalidOperationException>(
Microsoft.AspNetCore.TestHost.Tests (17)
ClientHandlerTests.cs (5)
516return Assert.ThrowsAsync<InvalidOperationException>(() => httpClient.GetAsync("https://example.com/", 537Assert.IsType<InvalidOperationException>(ex.GetBaseException()); 552return Assert.ThrowsAsync<InvalidOperationException>(() => httpClient.GetAsync("https://example.com/", 568return Assert.ThrowsAsync<InvalidOperationException>(() => httpClient.GetAsync("https://example.com/", 593return Assert.ThrowsAsync<InvalidOperationException>(() => httpClient.GetAsync("https://example.com/",
HttpContextBuilderTests.cs (2)
277return Assert.ThrowsAsync<InvalidOperationException>(() => server.SendAsync(c => { })); 301Assert.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.Testing (2)
src\Shared\Throw\Throw.cs (2)
390/// Throws an <see cref="System.InvalidOperationException"/>. 401/// Throws an <see cref="System.InvalidOperationException"/>.
Microsoft.AspNetCore.Testing.Tests (5)
FakesExtensionsTests.cs (5)
111Assert.IsType<InvalidOperationException>(exception); 122Assert.IsType<InvalidOperationException>(exception); 142Assert.IsType<InvalidOperationException>(exception); 189Assert.IsType<InvalidOperationException>(exception); 204Assert.IsType<InvalidOperationException>(exception);
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.Bcl.Cryptography (2)
System\Security\Cryptography\X509Certificates\X509CertificateKeyAccessors.cs (2)
103/// <exception cref="InvalidOperationException"> 183/// <exception cref="InvalidOperationException">
Microsoft.Build (53)
BackEnd\BuildManager\BuildManager.cs (13)
428/// <exception cref="InvalidOperationException">Thrown if a build is already in progress.</exception> 458/// <exception cref="InvalidOperationException">Thrown if a build is already in progress.</exception> 921/// <exception cref="InvalidOperationException">Thrown if StartBuild has not been called or if EndBuild has been called.</exception> 929/// <exception cref="InvalidOperationException">Thrown if StartBuild has not been called or if EndBuild has been called.</exception> 937/// <exception cref="InvalidOperationException">Thrown if StartBuild has not been called or if EndBuild has been called.</exception> 975/// <exception cref="InvalidOperationException">Thrown if StartBuild has not been called or if EndBuild has been called.</exception> 982/// <exception cref="InvalidOperationException">Thrown if StartBuild has not been called or if EndBuild has been called.</exception> 992/// <exception cref="InvalidOperationException">Thrown if there is no build in progress.</exception> 1192/// <exception cref="InvalidOperationException">Thrown if a build is already in progress.</exception> 1219/// <exception cref="InvalidOperationException">Thrown if a build is already in progress.</exception> 1226/// <exception cref="InvalidOperationException">Thrown if a build is already in progress.</exception> 2193/// Verifies the BuildManager is in the required state, and throws a <see cref="System.InvalidOperationException"/> if it is not. 2201/// Verifies the BuildManager is in the required state, and throws a <see cref="System.InvalidOperationException"/> if it is not.
BackEnd\BuildManager\BuildSubmission.cs (3)
61/// <exception cref="InvalidOperationException">The request has already been started or is already complete.</exception> 167/// <exception cref="InvalidOperationException">The request has already been started or is already complete.</exception> 181/// <exception cref="System.InvalidOperationException">The request has already been started or is already complete.</exception>
BackEnd\Components\Communications\NodeProviderOutOfProcBase.cs (1)
365catch (InvalidOperationException)
BackEnd\Components\RequestBuilder\BatchingEngine.cs (1)
414catch (InvalidOperationException e)
BackEnd\TaskExecutionHost\TaskExecutionHost.cs (1)
485catch (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)
1648/// An <see cref="InvalidOperationException"/> is thrown if the project root element is not associated with any file on disk. 1661/// An <see cref="InvalidOperationException"/> is thrown if the path does not exist. 1693/// Otherwise, an <see cref="InvalidOperationException"/> is thrown when unsaved changes are present.
Construction\Solution\SolutionFile.cs (2)
654catch (Exception e) when (e is JsonException || e is KeyNotFoundException || e is InvalidOperationException) 677catch (Exception e) when (e is JsonException || e is KeyNotFoundException || e is InvalidOperationException)
Definition\Project.cs (2)
104/// When this property is set to true, the previous item operations throw an <see cref="InvalidOperationException" /> 1995/// When this property is set to true, the previous item operations throw an <exception cref="InvalidOperationException"></exception>
Definition\ProjectCollection.cs (1)
1378/// <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)
1043catch (InvalidOperationException ex) 2504catch (Exception e) when (!ExceptionHandling.NotExpectedException(e) || e is InvalidOperationException) 2755catch (Exception ex) when (ex is ArgumentException || ex is InvalidOperationException) 3107catch (Exception ex) when (ex is ArgumentException || ex is InvalidOperationException) 3142catch (Exception ex) when (ex is ArgumentException || ex is InvalidOperationException) 3175catch (Exception ex) when (ex is ArgumentException || ex is InvalidOperationException) 3211catch (Exception ex) when (ex is ArgumentException || ex is InvalidOperationException) 3267catch (InvalidOperationException ex)
ExceptionHandling.cs (1)
313|| e is InvalidOperationException
Graph\GraphBuildSubmission.cs (2)
37/// <exception cref="InvalidOperationException">The request has already been started or is already complete.</exception> 51/// <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)
926/// <exception cref="InvalidOperationException">Thrown when stack is empty.</exception>
Modifiers.cs (1)
182/// <exception cref="InvalidOperationException">Thrown when the item-spec is not a path.</exception>
NodeEndpointOutOfProcBase.cs (1)
481catch (InvalidOperationException)
ProcessExtensions.cs (1)
24catch (System.InvalidOperationException)
ResourceUtilities.cs (1)
464catch (InvalidOperationException e)
TaskLoggingHelper.cs (1)
204/// <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.OM.UnitTests (104)
Construction\ConstructionEditing_Tests.cs (27)
104Assert.Throws<InvalidOperationException>(() => 118Assert.Throws<InvalidOperationException>(() => 132Assert.Throws<InvalidOperationException>(() => 147Assert.Throws<InvalidOperationException>(() => 163Assert.Throws<InvalidOperationException>(() => 177Assert.Throws<InvalidOperationException>(() => 193Assert.Throws<InvalidOperationException>(() => 209Assert.Throws<InvalidOperationException>(() => 227Assert.Throws<InvalidOperationException>(() => 245Assert.Throws<InvalidOperationException>(() => 259Assert.Throws<InvalidOperationException>(() => 273Assert.Throws<InvalidOperationException>(() => 288Assert.Throws<InvalidOperationException>(() => 303Assert.Throws<InvalidOperationException>(() => 318Assert.Throws<InvalidOperationException>(() => 333Assert.Throws<InvalidOperationException>(() => 349Assert.Throws<InvalidOperationException>(() => 629Assert.Throws<InvalidOperationException>(() => 643Assert.Throws<InvalidOperationException>(() => 659Assert.Throws<InvalidOperationException>(() => 1219Assert.Throws<InvalidOperationException>(() => 1236Assert.Throws<InvalidOperationException>(() => 1254Assert.Throws<InvalidOperationException>(() => 1270Assert.Throws<InvalidOperationException>(() => 1286Assert.Throws<InvalidOperationException>(() => 2256Assert.Throws<InvalidOperationException>(() => 2268Assert.Throws<InvalidOperationException>(() =>
Construction\ProjectItemElement_Tests.cs (7)
741Assert.Throws<InvalidOperationException>(() => 757Assert.Throws<InvalidOperationException>(() => 818Assert.Throws<InvalidOperationException>(() => 834Assert.Throws<InvalidOperationException>(() => 850Assert.Throws<InvalidOperationException>(() => 912Assert.Throws<InvalidOperationException>(() => 928Assert.Throws<InvalidOperationException>(() =>
Construction\ProjectOutputElement_Tests.cs (2)
240Assert.Throws<InvalidOperationException>(() => 267Assert.Throws<InvalidOperationException>(() =>
Construction\ProjectRootElement_Tests.cs (8)
553Assert.Throws<InvalidOperationException>(() => 690Assert.Throws<InvalidOperationException>(() => 1655var exception = 1656Assert.Throws<InvalidOperationException>( 1674var exception = 1675Assert.Throws<InvalidOperationException>( 1822var exception = 1823Assert.Throws<InvalidOperationException>(
Construction\ProjectUsingTaskElement_Tests.cs (2)
277Assert.Throws<InvalidOperationException>(() => 290Assert.Throws<InvalidOperationException>(() =>
Definition\DefinitionEditing_Tests.cs (9)
1587Assert.Throws<InvalidOperationException>(() => 1602Assert.Throws<InvalidOperationException>(() => 1617Assert.Throws<InvalidOperationException>(() => 1632Assert.Throws<InvalidOperationException>(() => 1647Assert.Throws<InvalidOperationException>(() => 1721Assert.Throws<InvalidOperationException>(() => 1736Assert.Throws<InvalidOperationException>(() => 2601var ex = Assert.Throws<InvalidOperationException>(() => itemOperation(project, item));
Definition\Project_Tests.cs (3)
386Should.Throw<InvalidOperationException>(() => 917Should.Throw<InvalidOperationException>(() => 948Should.Throw<InvalidOperationException>(() =>
Definition\ProjectCollection_Tests.cs (6)
373Assert.Throws<InvalidOperationException>(() => 482catch (InvalidOperationException) 740Assert.Throws<InvalidOperationException>(() => 755Assert.Throws<InvalidOperationException>(() => 774catch (InvalidOperationException ex) 1133Assert.Throws<InvalidOperationException>(() =>
Definition\ProjectItem_Tests.cs (5)
258Assert.Throws<InvalidOperationException>(() => 1911Assert.Throws<InvalidOperationException>(() => 2050Assert.Throws<InvalidOperationException>(() => 2081Assert.Throws<InvalidOperationException>(() => 2112Assert.Throws<InvalidOperationException>(() =>
Definition\ProjectItemDefinition_Tests.cs (1)
118Assert.Throws<InvalidOperationException>(() =>
Definition\ProjectMetadata_Tests.cs (1)
458Assert.Throws<InvalidOperationException>(() =>
Definition\ProjectProperty_Tests.cs (2)
134Assert.Throws<InvalidOperationException>(() => 257Assert.Throws<InvalidOperationException>(() =>
Definition\ProtectImports_Tests.cs (12)
131Assert.Throws<InvalidOperationException>(() => 162Assert.Throws<InvalidOperationException>(() => 181Assert.Throws<InvalidOperationException>(() => 196Assert.Throws<InvalidOperationException>(() => 211Assert.Throws<InvalidOperationException>(() => 226Assert.Throws<InvalidOperationException>(() => 301Assert.Throws<InvalidOperationException>(() => 316Assert.Throws<InvalidOperationException>(() => 331Assert.Throws<InvalidOperationException>(() => 346Assert.Throws<InvalidOperationException>(() => 424Assert.Throws<InvalidOperationException>(() => 439Assert.Throws<InvalidOperationException>(() =>
ExceptionHandling.cs (1)
313|| 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)
464catch (InvalidOperationException e)
Microsoft.Build.Engine.UnitTests (27)
BackEnd\BinaryTranslator_Tests.cs (2)
810_ = Assert.Throws<InvalidOperationException>(() => 826_ = Assert.Throws<InvalidOperationException>(() =>
BackEnd\BuildManager_Tests.cs (11)
1099Should.Throw<InvalidOperationException>(() => _buildManager.BuildRequest(data)); 1109Should.Throw<InvalidOperationException>(() => _buildManager.BuildRequest(data)); 1119Should.Throw<InvalidOperationException>(() => _buildManager.PendBuildRequest(data)); 1129Should.Throw<InvalidOperationException>(() => _buildManager.PendBuildRequest(data)); 1138Assert.Throws<InvalidOperationException>(() => 1177Assert.Throws<InvalidOperationException>(() => _buildManager.BeginBuild(new BuildParameters())); 1208Assert.Throws<InvalidOperationException>(() => _buildManager.EndBuild()); 1221Should.Throw<InvalidOperationException>(() => _buildManager.PendBuildRequest(data)); 1234Should.Throw<InvalidOperationException>(() => _buildManager.PendBuildRequest(data)); 1249Assert.Throws<InvalidOperationException>(() => { _buildManager.Build(new BuildParameters(), data); }); 1311Assert.Throws<InvalidOperationException>(() => _buildManager.EndBuild());
Collections\OMcollections_tests.cs (1)
116Should.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)
255Should.Throw<InvalidOperationException>(() =>
FileUtilities_Tests.cs (2)
155Assert.Throws<InvalidOperationException>(() => 166Assert.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)
216Assert.Throws<InvalidOperationException>(() => 231Assert.Throws<InvalidOperationException>(() => 273Assert.Throws<InvalidOperationException>(() =>
Microsoft.Build.Framework.UnitTests (1)
ResourceUtilities.cs (1)
464catch (InvalidOperationException e)
Microsoft.Build.Tasks.CodeAnalysis (2)
src\Dependencies\Contracts\ExceptionUtilities.cs (2)
17/// Creates an <see cref="InvalidOperationException"/> with information about an unexpected value. 20/// <returns>The <see cref="InvalidOperationException"/>, which should be thrown by the caller.</returns>
Microsoft.Build.Tasks.CodeAnalysis.Sdk (2)
src\Dependencies\Contracts\ExceptionUtilities.cs (2)
17/// Creates an <see cref="InvalidOperationException"/> with information about an unexpected value. 20/// <returns>The <see cref="InvalidOperationException"/>, which should be thrown by the caller.</returns>
Microsoft.Build.Tasks.Core (10)
AssemblyDependency\ResolveAssemblyReference.cs (2)
2490catch (InvalidOperationException e) 2526catch (InvalidOperationException e)
AssignLinkMetadata.cs (1)
63catch (InvalidOperationException e)
ExceptionHandling.cs (1)
313|| e is InvalidOperationException
GenerateResource.cs (1)
1479catch (InvalidOperationException e)
ManifestUtil\DeployManifest.cs (1)
195catch (InvalidOperationException)
Modifiers.cs (1)
182/// <exception cref="InvalidOperationException">Thrown when the item-spec is not a path.</exception>
NodePipeServer.cs (1)
138catch (InvalidOperationException)
ResourceUtilities.cs (1)
464catch (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)
1917Assert.Throws<InvalidOperationException>(method);
Microsoft.Build.Utilities.Core (8)
ExceptionHandling.cs (1)
313|| e is InvalidOperationException
Modifiers.cs (1)
182/// <exception cref="InvalidOperationException">Thrown when the item-spec is not a path.</exception>
ProcessExtensions.cs (1)
24catch (System.InvalidOperationException)
ResourceUtilities.cs (1)
464catch (InvalidOperationException e)
TaskLoggingHelper.cs (1)
204/// <exception cref="InvalidOperationException">Thrown when the <c>TaskResources</c> property of the owner task is not set.</exception>
ToolTask.cs (3)
801catch (InvalidOperationException) 987catch (InvalidOperationException) 1037catch (InvalidOperationException)
Microsoft.Build.Utilities.UnitTests (9)
MuxLogger_Tests.cs (2)
67Assert.Throws<InvalidOperationException>(() => 315Should.Throw<InvalidOperationException>(() =>
TaskLoggingHelper_Tests.cs (1)
217Should.Throw<InvalidOperationException>(() =>
ToolLocationHelper_Tests.cs (6)
1308Should.Throw<InvalidOperationException>(() => 1329Should.Throw<InvalidOperationException>(() => 1350Should.Throw<InvalidOperationException>(() => 1524Should.Throw<InvalidOperationException>(() => 1586Should.Throw<InvalidOperationException>(() => 1621Should.Throw<InvalidOperationException>(() =>
Microsoft.CodeAnalysis (44)
DiagnosticAnalyzer\AsyncQueue.cs (2)
56/// <exception cref="InvalidOperationException">The queue is already completed.</exception> 148/// <exception cref="InvalidOperationException">The queue is already completed.</exception>
DiaSymReader\Writer\SymUnmanagedWriter.cs (18)
50/// <exception cref="InvalidOperationException">Writes are not allowed to the underlying stream.</exception> 58/// <exception cref="InvalidOperationException">Writes are not allowed to the underlying stream.</exception> 66/// <exception cref="InvalidOperationException">Writes are not allowed to the underlying stream.</exception> 74/// <exception cref="InvalidOperationException">Writes are not allowed to the underlying stream.</exception> 82/// <exception cref="InvalidOperationException">Writes are not allowed to the underlying stream.</exception> 89/// <exception cref="InvalidOperationException">Writes are not allowed to the underlying stream.</exception> 97/// <exception cref="InvalidOperationException">Writes are not allowed to the underlying stream.</exception> 109/// <exception cref="InvalidOperationException">Writes are not allowed to the underlying stream.</exception> 118/// <exception cref="InvalidOperationException">Writes are not allowed to the underlying stream.</exception> 127/// <exception cref="InvalidOperationException">Writes are not allowed to the underlying stream.</exception> 142/// <exception cref="InvalidOperationException">Writes are not allowed to the underlying stream.</exception> 151/// <exception cref="InvalidOperationException">Writes are not allowed to the underlying stream.</exception> 159/// <exception cref="InvalidOperationException">Writes are not allowed to the underlying stream.</exception> 174/// <exception cref="InvalidOperationException">Writes are not allowed to the underlying stream.</exception> 183/// <exception cref="InvalidOperationException">Writes are not allowed to the underlying stream.</exception> 192/// <exception cref="InvalidOperationException">Writes are not allowed to the underlying stream.</exception> 200/// <exception cref="InvalidOperationException">Writes are not allowed to the underlying stream.</exception> 209/// <exception cref="InvalidOperationException">Writes are not allowed to the underlying stream.</exception>
DocumentationComments\DocumentationCommentIncludeCache.cs (1)
48/// <exception cref="InvalidOperationException"></exception>
InternalUtilities\XmlUtilities.cs (1)
80catch (InvalidOperationException e)
Operations\IOperation.OperationList.cs (1)
98/// <see cref="Enumerator.MoveNext"/> has returned false will throw an <see cref="InvalidOperationException"/>.
Operations\IOperation.OperationList.Reversed.cs (1)
86/// <see cref="Enumerator.MoveNext"/> has returned false will throw an <see cref="InvalidOperationException"/>.
Operations\OperationExtensions.cs (1)
350/// <exception cref="InvalidOperationException">The operation is a part of Control Flow Graph</exception>
src\Dependencies\CodeAnalysis.Debugging\CustomDebugInfoEncoder.cs (1)
42/// <exception cref="InvalidOperationException">More than <see cref="byte.MaxValue"/> records added.</exception>
src\Dependencies\CodeAnalysis.Debugging\CustomDebugInfoReader.cs (4)
54/// <exception cref="InvalidOperationException"></exception> 71/// <exception cref="InvalidOperationException"></exception> 212/// <exception cref="InvalidOperationException">Bad data.</exception> 241/// <exception cref="InvalidOperationException">Bad data.</exception>
src\Dependencies\Contracts\ExceptionUtilities.cs (2)
17/// Creates an <see cref="InvalidOperationException"/> with information about an unexpected value. 20/// <returns>The <see cref="InvalidOperationException"/>, which should be thrown by the caller.</returns>
Symbols\IMethodSymbol.cs (1)
182/// <exception cref="System.InvalidOperationException">If this is not a reduced extension method.</exception>
Symbols\IParameterSymbol.cs (1)
100/// <exception cref="System.InvalidOperationException">The parameter has no default value.</exception>
Syntax\ChildSyntaxList.cs (2)
377/// <exception cref="System.InvalidOperationException">The list is empty.</exception> 392/// <exception cref="System.InvalidOperationException">The list is empty.</exception>
Syntax\ChildSyntaxList.Reversed.cs (2)
141/// <exception cref="InvalidOperationException">The collection was modified after the enumerator was created. </exception> 150/// <exception cref="InvalidOperationException">The collection was modified after the enumerator was created. </exception>
Syntax\SyntaxNodeOrTokenList.cs (2)
556/// <exception cref="InvalidOperationException">The collection was modified after the enumerator was created. </exception> 580/// <exception cref="InvalidOperationException">The collection was modified after the enumerator was created. </exception>
Syntax\SyntaxTokenList.cs (2)
212/// <exception cref="InvalidOperationException">The list is empty.</exception> 227/// <exception cref="InvalidOperationException">The list is empty.</exception>
Syntax\SyntaxTriviaList.cs (2)
184/// <exception cref="InvalidOperationException">The list is empty.</exception> 199/// <exception cref="InvalidOperationException">The list is empty.</exception>
Microsoft.CodeAnalysis.Analyzers (6)
src\Dependencies\Contracts\ExceptionUtilities.cs (2)
17/// Creates an <see cref="InvalidOperationException"/> with information about an unexpected value. 20/// <returns>The <see cref="InvalidOperationException"/>, which should be thrown by the caller.</returns>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\NonReentrantLock.cs (2)
147/// <exception cref="InvalidOperationException">The lock is not currently held by the calling thread.</exception> 171/// <exception cref="InvalidOperationException">The lock is not currently held by the calling thread.</exception>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Diagnostics\DiagnosticSeverityExtensions.cs (1)
18/// <exception cref="InvalidOperationException">
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Diagnostics\ReportDiagnosticExtensions.cs (1)
20/// <exception cref="InvalidOperationException">
Microsoft.CodeAnalysis.AnalyzerUtilities (6)
src\Dependencies\Contracts\ExceptionUtilities.cs (2)
17/// Creates an <see cref="InvalidOperationException"/> with information about an unexpected value. 20/// <returns>The <see cref="InvalidOperationException"/>, which should be thrown by the caller.</returns>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\NonReentrantLock.cs (2)
147/// <exception cref="InvalidOperationException">The lock is not currently held by the calling thread.</exception> 171/// <exception cref="InvalidOperationException">The lock is not currently held by the calling thread.</exception>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Diagnostics\DiagnosticSeverityExtensions.cs (1)
18/// <exception cref="InvalidOperationException">
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Diagnostics\ReportDiagnosticExtensions.cs (1)
20/// <exception cref="InvalidOperationException">
Microsoft.CodeAnalysis.BannedApiAnalyzers (6)
src\Dependencies\Contracts\ExceptionUtilities.cs (2)
17/// Creates an <see cref="InvalidOperationException"/> with information about an unexpected value. 20/// <returns>The <see cref="InvalidOperationException"/>, which should be thrown by the caller.</returns>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\NonReentrantLock.cs (2)
147/// <exception cref="InvalidOperationException">The lock is not currently held by the calling thread.</exception> 171/// <exception cref="InvalidOperationException">The lock is not currently held by the calling thread.</exception>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Diagnostics\DiagnosticSeverityExtensions.cs (1)
18/// <exception cref="InvalidOperationException">
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Diagnostics\ReportDiagnosticExtensions.cs (1)
20/// <exception cref="InvalidOperationException">
Microsoft.CodeAnalysis.CodeStyle (6)
src\Dependencies\Contracts\ExceptionUtilities.cs (2)
17/// Creates an <see cref="InvalidOperationException"/> with information about an unexpected value. 20/// <returns>The <see cref="InvalidOperationException"/>, which should be thrown by the caller.</returns>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\NonReentrantLock.cs (2)
147/// <exception cref="InvalidOperationException">The lock is not currently held by the calling thread.</exception> 171/// <exception cref="InvalidOperationException">The lock is not currently held by the calling thread.</exception>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Diagnostics\DiagnosticSeverityExtensions.cs (1)
18/// <exception cref="InvalidOperationException">
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Diagnostics\ReportDiagnosticExtensions.cs (1)
20/// <exception cref="InvalidOperationException">
Microsoft.CodeAnalysis.Collections.Package (2)
src\Dependencies\Contracts\ExceptionUtilities.cs (2)
17/// Creates an <see cref="InvalidOperationException"/> with information about an unexpected value. 20/// <returns>The <see cref="InvalidOperationException"/>, which should be thrown by the caller.</returns>
Microsoft.CodeAnalysis.Contracts.Package (2)
ExceptionUtilities.cs (2)
17/// Creates an <see cref="InvalidOperationException"/> with information about an unexpected value. 20/// <returns>The <see cref="InvalidOperationException"/>, which should be thrown by the caller.</returns>
Microsoft.CodeAnalysis.CSharp (14)
Compilation\CSharpSemanticModel.cs (10)
2518/// <exception cref="InvalidOperationException">Throws this exception if this model is a speculative semantic model, i.e. <see cref="SemanticModel.IsSpeculativeSemanticModel"/> is true. 2545/// <exception cref="InvalidOperationException">Throws this exception if this model is a speculative semantic model, i.e. <see cref="SemanticModel.IsSpeculativeSemanticModel"/> is true. 2574/// <exception cref="InvalidOperationException">Throws this exception if this model is a speculative semantic model, i.e. <see cref="SemanticModel.IsSpeculativeSemanticModel"/> is true. 2600/// <exception cref="InvalidOperationException">Throws this exception if this model is a speculative semantic model, i.e. <see cref="SemanticModel.IsSpeculativeSemanticModel"/> is true. 2627/// <exception cref="InvalidOperationException">Throws this exception if this model is a speculative semantic model, i.e. <see cref="SemanticModel.IsSpeculativeSemanticModel"/> is true. 2654/// <exception cref="InvalidOperationException">Throws this exception if this model is a speculative semantic model, i.e. <see cref="SemanticModel.IsSpeculativeSemanticModel"/> is true. 2684/// <exception cref="InvalidOperationException">Throws this exception if this model is a speculative semantic model, i.e. <see cref="SemanticModel.IsSpeculativeSemanticModel"/> is true. 2713/// <exception cref="InvalidOperationException">Throws this exception if this model is a speculative semantic model, i.e. <see cref="SemanticModel.IsSpeculativeSemanticModel"/> is true. 2743/// <exception cref="InvalidOperationException">Throws this exception if this model is a speculative semantic model, i.e. <see cref="SemanticModel.IsSpeculativeSemanticModel"/> is true. 2769/// <exception cref="InvalidOperationException">Throws this exception if this model is a speculative semantic model, i.e. <see cref="SemanticModel.IsSpeculativeSemanticModel"/> is true.
Symbols\MethodSymbol.cs (1)
832/// <exception cref="System.InvalidOperationException">If this is not a reduced extension method.</exception>
Symbols\NamedTypeSymbol.cs (1)
1698/// For other symbols, throws <see cref="System.InvalidOperationException"/>.
Symbols\ParameterSymbol.cs (1)
229/// <exception cref="InvalidOperationException">The parameter has no default value.</exception>
Syntax\SyntaxReplacer.cs (1)
327private static InvalidOperationException GetItemNotListElementException()
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (1)
PdbSourceDocument\PdbSourceDocumentTests.cs (1)
1059Assert.Throws<System.InvalidOperationException>(() => service.TryAddDocumentToWorkspace(fileTwo.FilePath, new StaticSourceTextContainer(SourceText.From(string.Empty)), out var documentIdTwo));
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (3)
CodeGen\CodeGenIterators.cs (1)
1081CompileAndVerifyException<InvalidOperationException>(source, expectedMessage: "Nullable object must have a value.").
Emit\NoPiaEmbedTypes.cs (2)
5893Assert.Throws<InvalidOperationException>(delegate 5962Assert.Throws<InvalidOperationException>(delegate
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (14)
Attributes\AttributeTests.cs (6)
5759Assert.Throws<InvalidOperationException>(() => args[0].Value); 5763Assert.Throws<InvalidOperationException>(() => args[1].Value); 5769Assert.Throws<InvalidOperationException>(() => named["P"].Value); 5773Assert.Throws<InvalidOperationException>(() => named["F"].Value); 5803Assert.Throws<InvalidOperationException>(() => args[0].Values); 5807Assert.Throws<InvalidOperationException>(() => args[1].Values);
Attributes\AttributeTests_WellKnownAttributes.cs (4)
865Assert.Throws<InvalidOperationException>(() => ps[0].ExplicitDefaultValue); 931Assert.Throws<InvalidOperationException>(() => ps[0].ExplicitDefaultValue); 1020Assert.Throws<InvalidOperationException>(() => ps[0].ExplicitDefaultValue); 1064Assert.Throws<InvalidOperationException>(() => ps[0].ExplicitDefaultValue);
Semantics\ExtensionTests.cs (3)
13107catch (InvalidOperationException) 21507catch (InvalidOperationException) 21558catch (InvalidOperationException)
Semantics\ExtensionTests2.cs (1)
395catch (InvalidOperationException)
Microsoft.CodeAnalysis.CSharp.Scripting.UnitTests (5)
ScriptOptionsTests.cs (1)
35Assert.Throws<InvalidOperationException>(() => options.WithLanguageVersion(LanguageVersion.CSharp8));
ScriptTests.cs (4)
445Assert.Throws<InvalidOperationException>(() => state.GetVariable("y").Value = "str"); 446Assert.Throws<InvalidOperationException>(() => state.GetVariable("z").Value = "str"); 447Assert.Throws<InvalidOperationException>(() => state.GetVariable("y").Value = 0); 448Assert.Throws<InvalidOperationException>(() => state.GetVariable("z").Value = 0);
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (53)
Semantics\LambdaTests.cs (3)
8013Assert.Throws<InvalidOperationException>(() => lambdas[0].Symbol.Parameters[0].ExplicitDefaultValue); 8023Assert.Throws<InvalidOperationException>(() => lambdas[1].Symbol.Parameters[0].ExplicitDefaultValue); 8030Assert.Throws<InvalidOperationException>(() => lambdas[2].Symbol.Parameters[0].ExplicitDefaultValue);
Semantics\NamedAndOptionalTests.cs (18)
2054Assert.Throws<InvalidOperationException>(() => parameters[0].ExplicitDefaultValue); 2072Assert.Throws<InvalidOperationException>(() => parameters[3].ExplicitDefaultValue); 2078Assert.Throws<InvalidOperationException>(() => parameters[4].ExplicitDefaultValue); 2085Assert.Throws<InvalidOperationException>(() => parameters[5].ExplicitDefaultValue); 2137Assert.Throws<InvalidOperationException>(() => parameters[0].ExplicitDefaultValue); 2148Assert.Throws<InvalidOperationException>(() => parameters[2].ExplicitDefaultValue); 2187Assert.Throws<InvalidOperationException>(() => parameters[0].ExplicitDefaultValue); 2205Assert.Throws<InvalidOperationException>(() => parameters[3].ExplicitDefaultValue); 2211Assert.Throws<InvalidOperationException>(() => parameters[4].ExplicitDefaultValue); 2224Assert.Throws<InvalidOperationException>(() => parameters[6].ExplicitDefaultValue); 2270Assert.Throws<InvalidOperationException>(() => parameters[0].ExplicitDefaultValue); 2288Assert.Throws<InvalidOperationException>(() => parameters[3].ExplicitDefaultValue); 2294Assert.Throws<InvalidOperationException>(() => parameters[4].ExplicitDefaultValue); 2301Assert.Throws<InvalidOperationException>(() => parameters[5].ExplicitDefaultValue); 2352Assert.Throws<InvalidOperationException>(() => parameters[0].ExplicitDefaultValue); 2364Assert.Throws<InvalidOperationException>(() => parameters[2].ExplicitDefaultValue); 2370Assert.Throws<InvalidOperationException>(() => parameters[3].ExplicitDefaultValue); 2377Assert.Throws<InvalidOperationException>(() => parameters[4].ExplicitDefaultValue);
Semantics\ScriptSemanticsTests.cs (1)
874Assert.Throws<InvalidOperationException>(() => CreateSubmission("a + 1", previous: s0));
Semantics\SyntaxTreeRootTests.cs (3)
29var node = SyntaxFactory.CatchClause(SyntaxFactory.CatchDeclaration(SyntaxFactory.ParseTypeName(typeof(InvalidOperationException).Name)), null, SyntaxFactory.Block()); 110Assert.Throws<InvalidOperationException>(() => { tree.GetDiagnostics(default(SyntaxToken)); }); 112Assert.Throws<InvalidOperationException>(() => { tree.GetDiagnostics(default(SyntaxTrivia)); });
SourceGeneration\GeneratorDriverTests.cs (24)
279var exception = new InvalidOperationException("init error"); 287VerifyGeneratorExceptionDiagnostic<InvalidOperationException>(generatorDiagnostics.Single(), nameof(CallbackGenerator), "init error", initialization: true); 302var exception = new InvalidOperationException("init error"); 323var exception = new InvalidOperationException("generate error"); 331VerifyGeneratorExceptionDiagnostic<InvalidOperationException>(generatorDiagnostics.Single(), nameof(CallbackGenerator), "generate error"); 346var exception = new InvalidOperationException("generate error"); 357VerifyGeneratorExceptionDiagnostic<InvalidOperationException>(generatorDiagnostics.Single(), nameof(CallbackGenerator), "generate error"); 380var exception = new InvalidOperationException("generate error"); 392VerifyGeneratorExceptionDiagnostic<InvalidOperationException>(generatorDiagnostics.Single(), nameof(CallbackGenerator), "generate error"); 407var exception = new InvalidOperationException("generate error"); 1014VerifyGeneratorExceptionDiagnostic<InvalidOperationException>(generatorDiagnostics.Single(), nameof(CallbackGenerator), "post init error", initialization: true); 1049VerifyGeneratorExceptionDiagnostic<InvalidOperationException>(generatorDiagnostics.Single(), nameof(CallbackGenerator), "init error", initialization: true); 1447var e = new InvalidOperationException("abc"); 1472var e = new InvalidOperationException("abc"); 1498var e = new InvalidOperationException("abc"); 1523VerifyGeneratorExceptionDiagnostic<InvalidOperationException>(runResults.Diagnostics.Single(), nameof(PipelineCallbackGenerator), "abc"); 1540var e = new InvalidOperationException("abc"); 1562VerifyGeneratorExceptionDiagnostic<InvalidOperationException>(runResults.Diagnostics.Single(), nameof(PipelineCallbackGenerator), "abc"); 1588var e = new InvalidOperationException("abc"); 1617var e = new InvalidOperationException("abc"); 1700Assert.Throws<InvalidOperationException>(() => throwsFunc(20, CancellationToken.None)); 1709Assert.IsType<InvalidOperationException>(e.InnerException); 4766var exception = Assert.IsType<InvalidOperationException>(result.Exception);
SourceGeneration\SyntaxAwareGeneratorTests.cs (4)
188Assert.Throws<InvalidOperationException>(() => 196Assert.Throws<InvalidOperationException>(() => 204Assert.Throws<InvalidOperationException>(() => 212Assert.Throws<InvalidOperationException>(() =>
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (16)
Compilation\CompilationAPITests.cs (1)
2452Assert.Throws<InvalidOperationException>(() => CreateSubmission("a + 1", previous: s0));
Compilation\GetSemanticInfoTests.cs (5)
4053Assert.Throws<InvalidOperationException>(() => method1.ReducedFrom.GetTypeInferredDuringReduction(null)); 5408Assert.Throws<InvalidOperationException>(() => type.Construct(objectType)); // non-generic type 5414Assert.Throws<InvalidOperationException>(() => type.Construct(objectType)); // non-generic type 5422Assert.Throws<InvalidOperationException>(() => type.Construct(objectType).Construct(objectType)); // constructed type 5430Assert.Throws<InvalidOperationException>(() => type.Construct(objectType).Construct(objectType)); // constructed type
Compilation\SemanticModelAPITests.cs (3)
2193Assert.Throws<InvalidOperationException>(() => speculativeModel.TryGetSpeculativeSemanticModel(speculatedStatement.SpanStart, speculatedStatement, speculativeModel: out speculativeModel)); 2235Assert.Throws<InvalidOperationException>(() => speculativeModel.TryGetSpeculativeSemanticModel(speculatedStatement.SpanStart, newSpeculatedStatement, out newModel)); 2239Assert.Throws<InvalidOperationException>(() => speculativeModel.TryGetSpeculativeSemanticModel(speculatedStatement.SpanStart, newSpeculatedStatement, out newModel));
Symbols\AnonymousTypesSemanticsTests.cs (1)
1980Assert.Throws<InvalidOperationException>(() => namedType.Construct(args));
Symbols\ExtensionMethodTests.cs (1)
2743Assert.Throws<InvalidOperationException>(() => methodSymbol.ThisParameter);
Symbols\MockSymbolTests.cs (1)
100Assert.Throws<InvalidOperationException>(() => ne1.Compilation);
Symbols\Retargeting\RetargetCustomAttributes.cs (4)
309Assert.Throws<InvalidOperationException>(() => args[0].Value); 313Assert.Throws<InvalidOperationException>(() => args[1].Value); 319Assert.Throws<InvalidOperationException>(() => named["P"].Value); 323Assert.Throws<InvalidOperationException>(() => named["F"].Value);
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (12)
Syntax\SyntaxNodeTests.cs (8)
2156Assert.Throws<InvalidOperationException>(() => ifstatement.ReplaceNode(then, new[] { stat1, stat2 })); 2159Assert.Throws<InvalidOperationException>(() => ifstatement.ReplaceNode(then, new StatementSyntax[] { })); 2196Assert.Throws<InvalidOperationException>(() => ifstatement.InsertNodesBefore(then, new[] { stat1, stat2 })); 2199Assert.Throws<InvalidOperationException>(() => ifstatement.InsertNodesAfter(then, new StatementSyntax[] { })); 2297Assert.Throws<InvalidOperationException>(() => cu.ReplaceToken(identifierC, new[] { identifierA, identifierB })); 2300Assert.Throws<InvalidOperationException>(() => cu.ReplaceToken(identifierC, new SyntaxToken[] { })); 2328Assert.Throws<InvalidOperationException>(() => cu.InsertTokensBefore(identifierC, new[] { identifierA, identifierB })); 2331Assert.Throws<InvalidOperationException>(() => cu.InsertTokensAfter(identifierC, new[] { identifierA, identifierB }));
Syntax\SyntaxRewriterTests.cs (3)
89Assert.True(caught is InvalidOperationException); 113Assert.True(caught is InvalidOperationException); 294Assert.True(caught is InvalidOperationException);
Syntax\TrackNodeTests.cs (1)
127Assert.Throws<InvalidOperationException>(() => replacedExpr.GetCurrentNode(originalA));
Microsoft.CodeAnalysis.Debugging.Package (7)
CustomDebugInfoEncoder.cs (1)
42/// <exception cref="InvalidOperationException">More than <see cref="byte.MaxValue"/> records added.</exception>
CustomDebugInfoReader.cs (4)
54/// <exception cref="InvalidOperationException"></exception> 71/// <exception cref="InvalidOperationException"></exception> 212/// <exception cref="InvalidOperationException">Bad data.</exception> 241/// <exception cref="InvalidOperationException">Bad data.</exception>
src\Dependencies\Contracts\ExceptionUtilities.cs (2)
17/// Creates an <see cref="InvalidOperationException"/> with information about an unexpected value. 20/// <returns>The <see cref="InvalidOperationException"/>, which should be thrown by the caller.</returns>
Microsoft.CodeAnalysis.EditorFeatures (2)
NavigateTo\NavigateToItemProvider.Callback.cs (1)
71catch (InvalidOperationException ex) when (FatalError.ReportAndCatch(ex, ErrorSeverity.Critical))
RenameTracking\RenameTrackingTaggerProvider.cs (1)
74var ex = new InvalidOperationException(string.Format(
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (2)
Emit\CompilationOutputsTests.cs (2)
43Assert.Throws<InvalidOperationException>(() => outputs.OpenAssemblyMetadata(prefetch: false)); 44Assert.Throws<InvalidOperationException>(() => outputs.OpenPdb());
Microsoft.CodeAnalysis.ExpressionEvaluator.ExpressionCompiler (3)
ExpressionCompiler.cs (1)
368catch (InvalidOperationException)
PDB\MethodDebugInfo.Native.cs (2)
189catch (InvalidOperationException) 381/// <exception cref="InvalidOperationException">Bad data.</exception>
Microsoft.CodeAnalysis.ExpressionEvaluator.FunctionResolver (2)
src\Dependencies\Contracts\ExceptionUtilities.cs (2)
17/// Creates an <see cref="InvalidOperationException"/> with information about an unexpected value. 20/// <returns>The <see cref="InvalidOperationException"/>, which should be thrown by the caller.</returns>
Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider (2)
src\Dependencies\Contracts\ExceptionUtilities.cs (2)
17/// Creates an <see cref="InvalidOperationException"/> with information about an unexpected value. 20/// <returns>The <see cref="InvalidOperationException"/>, which should be thrown by the caller.</returns>
Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider.Utilities (2)
src\Dependencies\Contracts\ExceptionUtilities.cs (2)
17/// Creates an <see cref="InvalidOperationException"/> with information about an unexpected value. 20/// <returns>The <see cref="InvalidOperationException"/>, which should be thrown by the caller.</returns>
Microsoft.CodeAnalysis.Extensions.Package (4)
Diagnostics\DiagnosticSeverityExtensions.cs (1)
18/// <exception cref="InvalidOperationException">
Diagnostics\ReportDiagnosticExtensions.cs (1)
20/// <exception cref="InvalidOperationException">
src\Dependencies\Contracts\ExceptionUtilities.cs (2)
17/// Creates an <see cref="InvalidOperationException"/> with information about an unexpected value. 20/// <returns>The <see cref="InvalidOperationException"/>, which should be thrown by the caller.</returns>
Microsoft.CodeAnalysis.Features (8)
EditAndContinue\EditAndContinueMethodDebugInfoReader.cs (1)
101catch (InvalidOperationException e) when (FatalError.ReportAndCatch(e)) // likely a bug in the compiler/debugger
Emit\CompilationOutputs.cs (2)
43/// <exception cref="InvalidOperationException">The stream returned by <see cref="OpenAssemblyStreamChecked"/> does not support read and seek operations.</exception> 92/// <exception cref="InvalidOperationException">The stream returned by <see cref="OpenPdbStreamChecked"/> or <see cref="OpenAssemblyStreamChecked"/> does not support read and seek operations.</exception>
src\Dependencies\CodeAnalysis.Debugging\CustomDebugInfoEncoder.cs (1)
42/// <exception cref="InvalidOperationException">More than <see cref="byte.MaxValue"/> records added.</exception>
src\Dependencies\CodeAnalysis.Debugging\CustomDebugInfoReader.cs (4)
54/// <exception cref="InvalidOperationException"></exception> 71/// <exception cref="InvalidOperationException"></exception> 212/// <exception cref="InvalidOperationException">Bad data.</exception> 241/// <exception cref="InvalidOperationException">Bad data.</exception>
Microsoft.CodeAnalysis.Features.UnitTests (2)
EditAndContinue\EditAndContinueWorkspaceServiceTests.cs (2)
2280Assert.Throws<InvalidOperationException>(() => debuggingSession.CommitSolutionUpdate()); 2281Assert.Throws<InvalidOperationException>(() => debuggingSession.DiscardSolutionUpdate());
Microsoft.CodeAnalysis.InteractiveHost (4)
src\Dependencies\Contracts\ExceptionUtilities.cs (2)
17/// Creates an <see cref="InvalidOperationException"/> with information about an unexpected value. 20/// <returns>The <see cref="InvalidOperationException"/>, which should be thrown by the caller.</returns>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\NonReentrantLock.cs (2)
147/// <exception cref="InvalidOperationException">The lock is not currently held by the calling thread.</exception> 171/// <exception cref="InvalidOperationException">The lock is not currently held by the calling thread.</exception>
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (1)
HandlerTests.cs (1)
116await Assert.ThrowsAsync<InvalidOperationException>(async () => await CreateTestLspServerAsync("", mutatingLspWorkspace,
Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers (6)
src\Dependencies\Contracts\ExceptionUtilities.cs (2)
17/// Creates an <see cref="InvalidOperationException"/> with information about an unexpected value. 20/// <returns>The <see cref="InvalidOperationException"/>, which should be thrown by the caller.</returns>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\NonReentrantLock.cs (2)
147/// <exception cref="InvalidOperationException">The lock is not currently held by the calling thread.</exception> 171/// <exception cref="InvalidOperationException">The lock is not currently held by the calling thread.</exception>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Diagnostics\DiagnosticSeverityExtensions.cs (1)
18/// <exception cref="InvalidOperationException">
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Diagnostics\ReportDiagnosticExtensions.cs (1)
20/// <exception cref="InvalidOperationException">
Microsoft.CodeAnalysis.PooledObjects.Package (2)
src\Dependencies\Contracts\ExceptionUtilities.cs (2)
17/// Creates an <see cref="InvalidOperationException"/> with information about an unexpected value. 20/// <returns>The <see cref="InvalidOperationException"/>, which should be thrown by the caller.</returns>
Microsoft.CodeAnalysis.PublicApiAnalyzers (6)
src\Dependencies\Contracts\ExceptionUtilities.cs (2)
17/// Creates an <see cref="InvalidOperationException"/> with information about an unexpected value. 20/// <returns>The <see cref="InvalidOperationException"/>, which should be thrown by the caller.</returns>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\NonReentrantLock.cs (2)
147/// <exception cref="InvalidOperationException">The lock is not currently held by the calling thread.</exception> 171/// <exception cref="InvalidOperationException">The lock is not currently held by the calling thread.</exception>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Diagnostics\DiagnosticSeverityExtensions.cs (1)
18/// <exception cref="InvalidOperationException">
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Diagnostics\ReportDiagnosticExtensions.cs (1)
20/// <exception cref="InvalidOperationException">
Microsoft.CodeAnalysis.ResxSourceGenerator (6)
src\Dependencies\Contracts\ExceptionUtilities.cs (2)
17/// Creates an <see cref="InvalidOperationException"/> with information about an unexpected value. 20/// <returns>The <see cref="InvalidOperationException"/>, which should be thrown by the caller.</returns>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\NonReentrantLock.cs (2)
147/// <exception cref="InvalidOperationException">The lock is not currently held by the calling thread.</exception> 171/// <exception cref="InvalidOperationException">The lock is not currently held by the calling thread.</exception>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Diagnostics\DiagnosticSeverityExtensions.cs (1)
18/// <exception cref="InvalidOperationException">
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Diagnostics\ReportDiagnosticExtensions.cs (1)
20/// <exception cref="InvalidOperationException">
Microsoft.CodeAnalysis.Scripting (1)
ScriptVariable.cs (1)
49/// <exception cref="InvalidOperationException">Variable is read-only or a constant.</exception>
Microsoft.CodeAnalysis.Test.Utilities (3)
Assert\TestExceptionUtilities.cs (1)
13public static InvalidOperationException UnexpectedValue(object o)
Compilation\TestOperationVisitor.cs (2)
97Assert.Throws<InvalidOperationException>(() => operation.ChildOperations.First()); 98Assert.Throws<InvalidOperationException>(() => operation.ChildOperations.Last());
Microsoft.CodeAnalysis.Threading.Package (2)
src\Dependencies\Contracts\ExceptionUtilities.cs (2)
17/// Creates an <see cref="InvalidOperationException"/> with information about an unexpected value. 20/// <returns>The <see cref="InvalidOperationException"/>, which should be thrown by the caller.</returns>
Microsoft.CodeAnalysis.UnitTests (68)
AsyncQueueTests.cs (2)
38Assert.Throws<InvalidOperationException>(() => queue.Enqueue(42)); 56Assert.Throws<InvalidOperationException>(() =>
Collections\Extensions\ImmutableArrayExtensionsTests.cs (11)
143Assert.Throws<InvalidOperationException>(() => ImmutableArray.Create<int>().Single()); 145Assert.Throws<InvalidOperationException>(() => ImmutableArray.Create<int>(1, 2).Single()); 150Assert.Throws<InvalidOperationException>(() => ImmutableArray.Create<int>().Single(isOdd)); 152Assert.Throws<InvalidOperationException>(() => ImmutableArray.Create<int>(1, 2, 3).Single(isOdd)); 159Assert.Throws<InvalidOperationException>(() => ImmutableArray.Create<int>().Single((x, a) => x == a, 1)); 161Assert.Throws<InvalidOperationException>(() => ImmutableArray.Create<int>(1, 1).Single((x, a) => x == a, 1)); 164Assert.Throws<InvalidOperationException>(() => ImmutableArray.Create<int>().Single((x, a) => x % a == 1, 2)); 166Assert.Throws<InvalidOperationException>(() => ImmutableArray.Create<int>(1, 2, 3).Single((x, a) => x % a == 1, 2)); 232Assert.Throws<InvalidOperationException>(() => roa.Last()); 234Assert.Throws<InvalidOperationException>(() => roa.Last(i => i < 1)); 256Assert.Throws<InvalidOperationException>(() => roa.SingleOrDefault());
Collections\ImmutableSegmentedDictionaryBuilderTest.cs (1)
113Assert.Throws<InvalidOperationException>(() => enumerator.MoveNext());
Collections\ImmutableSegmentedHashSetBuilderTest.cs (1)
92Assert.Throws<InvalidOperationException>(() => enumerator.MoveNext());
Collections\ImmutableSegmentedListBuilderTest.cs (1)
107Assert.Throws<InvalidOperationException>(() => enumerator.MoveNext());
Collections\List\IEnumerable.Generic.Tests.cs (11)
186Assert.Throws<InvalidOperationException>(() => enumerator.Current); 284Assert.Throws<InvalidOperationException>(() => enumerator.Current); 403Assert.Throws<InvalidOperationException>(() => enumerator.MoveNext()); 449Assert.Throws<InvalidOperationException>(() => enumerator.MoveNext()); 493Assert.Throws<InvalidOperationException>(() => enumerator.MoveNext()); 623Assert.Throws<InvalidOperationException>(() => enumerator.Current); 639Assert.Throws<InvalidOperationException>(() => enumerator.Current); 658Assert.Throws<InvalidOperationException>(() => enumerator.Current); 714Assert.Throws<InvalidOperationException>(() => enumerator.Reset()); 757Assert.Throws<InvalidOperationException>(() => enumerator.Reset()); 801Assert.Throws<InvalidOperationException>(() => enumerator.Reset());
Collections\List\IEnumerable.NonGeneric.Tests.cs (9)
203Assert.Throws<InvalidOperationException>(() => enumerator.MoveNext()); 229Assert.Throws<InvalidOperationException>(() => enumerator.MoveNext()); 252Assert.Throws<InvalidOperationException>(() => enumerator.MoveNext()); 316Assert.Throws<InvalidOperationException>(() => enumerator.Current); 330Assert.Throws<InvalidOperationException>(() => enumerator.Current); 347Assert.Throws<InvalidOperationException>(() => enumerator.Current); 381Assert.Throws<InvalidOperationException>(() => enumerator.Reset()); 407Assert.Throws<InvalidOperationException>(() => enumerator.Reset()); 430Assert.Throws<InvalidOperationException>(() => enumerator.Reset());
Collections\List\IList.Generic.Tests.cs (2)
628Assert.Throws<InvalidOperationException>(() => enumerator.Current); // enumerator.Current should fail 644Assert.Throws<InvalidOperationException>(() => enumerator.Current); // enumerator.Current should fail
Collections\List\IList.NonGeneric.Tests.cs (2)
1097Assert.Throws<InvalidOperationException>(() => enumerator.Current); // Enumerator.Current should fail 1112Assert.Throws<InvalidOperationException>(() => enumerator.Current); // Enumerator.Current should fail
Collections\List\SegmentedList.Generic.Tests.AddRange.cs (2)
139Assert.Throws<InvalidOperationException>(() => list.AddRange(list.Where(_ => true))); 141Assert.Throws<InvalidOperationException>(() => list.AddRange(list.Where(_ => true)));
Collections\RopeTests.cs (1)
122Assert.Throws<InvalidOperationException>(() => r.ToString(-1));
Collections\TemporaryArrayTests.cs (2)
320Assert.Throws<InvalidOperationException>(() => array.SingleOrDefault(p => p > 1)); 321Assert.Throws<InvalidOperationException>(() => array.SingleOrDefault((p, arg) => p > arg, arg: 1));
CorLibTypesTests.cs (12)
95Assert.Throws<InvalidOperationException>(() => { ConstantValue.Create(null, ConstantValueTypeDiscriminator.Bad); }); 98Assert.Throws<InvalidOperationException>(() => { var c = cv1.StringValue; }); 99Assert.Throws<InvalidOperationException>(() => { var c = cv1.DateTimeValue; }); 102Assert.Throws<InvalidOperationException>(() => { var c = cv2.StringValue; }); 103Assert.Throws<InvalidOperationException>(() => { var c = cv2.CharValue; }); 104Assert.Throws<InvalidOperationException>(() => { var c = cv2.DateTimeValue; }); 107Assert.Throws<InvalidOperationException>(() => { var c = cvNull.BooleanValue; }); 108Assert.Throws<InvalidOperationException>(() => { var c = cvNull.DecimalValue; }); 109Assert.Throws<InvalidOperationException>(() => { var c = cvNull.DoubleValue; }); 110Assert.Throws<InvalidOperationException>(() => { var c = cvNull.SingleValue; }); 111Assert.Throws<InvalidOperationException>(() => { var c = cvNull.SByteValue; }); 112Assert.Throws<InvalidOperationException>(() => { var c = cvNull.ByteValue; });
Diagnostics\OperationTests.cs (2)
33Assert.Throws<InvalidOperationException>(() => dynamicExpression.GetArgumentName(0)); 34Assert.Throws<InvalidOperationException>(() => dynamicExpression.GetArgumentRefKind(0));
Emit\CustomDebugInfoTests.cs (8)
28Assert.Throws<InvalidOperationException>(() => CustomDebugInfoReader.TryGetCustomDebugInfoRecord(new byte[0], CustomDebugInfoKind.EditAndContinueLocalSlotMap)); 29Assert.Throws<InvalidOperationException>(() => CustomDebugInfoReader.TryGetCustomDebugInfoRecord(new byte[] { 1 }, CustomDebugInfoKind.EditAndContinueLocalSlotMap)); 30Assert.Throws<InvalidOperationException>(() => CustomDebugInfoReader.TryGetCustomDebugInfoRecord(new byte[] { 1, 2 }, CustomDebugInfoKind.EditAndContinueLocalSlotMap)); 51Assert.Throws<InvalidOperationException>(() => CustomDebugInfoReader.TryGetCustomDebugInfoRecord(cdi, CustomDebugInfoKind.EditAndContinueLocalSlotMap)); 61Assert.Throws<InvalidOperationException>(() => CustomDebugInfoReader.TryGetCustomDebugInfoRecord(cdi, CustomDebugInfoKind.EditAndContinueLocalSlotMap)); 80Assert.Throws<InvalidOperationException>(() => CustomDebugInfoReader.TryGetCustomDebugInfoRecord(cdi, CustomDebugInfoKind.EditAndContinueLocalSlotMap)); 725Assert.Throws<InvalidOperationException>(() => CustomDebugInfoReader.GetCustomDebugInfoRecords(bytes).ToArray()); 751Assert.Throws<InvalidOperationException>(() => CustomDebugInfoReader.GetCustomDebugInfoRecords(bytes).ToArray());
PDB\CustomDebugInfoReaderTests.cs (1)
30Assert.Throws<InvalidOperationException>(() => CustomDebugInfoReader.DecodeForwardIteratorRecord(bytes.ToImmutableArray()));
Microsoft.CodeAnalysis.VisualBasic (2)
Symbols\MethodSymbol.vb (1)
794''' <exception cref="System.InvalidOperationException">If this is not a reduced extension method.</exception>
Syntax\SyntaxReplacer.vb (1)
227Private Shared Function GetItemNotListElementException() As InvalidOperationException
Microsoft.CodeAnalysis.Workspaces (34)
CodeFixes\CodeFixContext.cs (1)
27/// throw an <see cref="InvalidOperationException"/>. Such fixers should use the
CodeRefactorings\CodeRefactoringContext.cs (1)
22/// throw an <see cref="InvalidOperationException"/>. Such refactorings should use the
Shared\Extensions\ISymbolExtensions.cs (1)
623catch (InvalidOperationException)
Shared\Utilities\IOUtilities.cs (1)
58InvalidOperationException or
src\Dependencies\Contracts\ExceptionUtilities.cs (2)
17/// Creates an <see cref="InvalidOperationException"/> with information about an unexpected value. 20/// <returns>The <see cref="InvalidOperationException"/>, which should be thrown by the caller.</returns>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\NonReentrantLock.cs (2)
147/// <exception cref="InvalidOperationException">The lock is not currently held by the calling thread.</exception> 171/// <exception cref="InvalidOperationException">The lock is not currently held by the calling thread.</exception>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Diagnostics\DiagnosticSeverityExtensions.cs (1)
18/// <exception cref="InvalidOperationException">
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Diagnostics\ReportDiagnosticExtensions.cs (1)
20/// <exception cref="InvalidOperationException">
Workspace\Host\HostLanguageServices.cs (1)
60/// If the host does not provide the service, this method returns throws <see cref="InvalidOperationException"/>.
Workspace\Host\HostWorkspaceServices.cs (2)
79/// If the host does not provide the service, this method throws <see cref="InvalidOperationException"/>. 81/// <exception cref="InvalidOperationException">The host does not provide the service.</exception>
Workspace\Solution\Solution.cs (21)
566/// <exception cref="InvalidOperationException">Document specified in <paramref name="documentIds"/> does not exist in project <paramref name="projectId"/>.</exception> 604/// <exception cref="InvalidOperationException">The project already references the target project.</exception> 618/// <exception cref="InvalidOperationException">The solution does not contain <paramref name="projectId"/>.</exception> 619/// <exception cref="InvalidOperationException">The project already references the target project.</exception> 620/// <exception cref="InvalidOperationException">Adding the project reference would create a circular dependency.</exception> 681/// <exception cref="InvalidOperationException">The solution does not contain <paramref name="projectId"/>.</exception> 701/// <exception cref="InvalidOperationException">The solution does not contain <paramref name="projectId"/>.</exception> 702/// <exception cref="InvalidOperationException">The project already contains the specified reference.</exception> 716/// <exception cref="InvalidOperationException">The solution does not contain <paramref name="projectId"/>.</exception> 717/// <exception cref="InvalidOperationException">The project already contains the specified reference.</exception> 743/// <exception cref="InvalidOperationException">The solution does not contain <paramref name="projectId"/>.</exception> 744/// <exception cref="InvalidOperationException">The project does not contain the specified reference.</exception> 766/// <exception cref="InvalidOperationException">The solution does not contain <paramref name="projectId"/>.</exception> 782/// <exception cref="InvalidOperationException">The solution does not contain <paramref name="projectId"/>.</exception> 796/// <exception cref="InvalidOperationException">The solution does not contain <paramref name="projectId"/>.</exception> 797/// <exception cref="InvalidOperationException">The project already contains the specified reference.</exception> 830/// <exception cref="InvalidOperationException">The solution does not contain <paramref name="projectId"/>.</exception> 831/// <exception cref="InvalidOperationException">The project does not contain the specified reference.</exception> 860/// <exception cref="InvalidOperationException">The solution does not contain <paramref name="projectId"/>.</exception> 885/// <exception cref="InvalidOperationException">The solution already contains the specified reference.</exception> 909/// <exception cref="InvalidOperationException">The solution does not contain the specified reference.</exception>
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (3)
src\Compilers\Core\Portable\InternalUtilities\XmlUtilities.cs (1)
80catch (InvalidOperationException e)
src\Dependencies\Contracts\ExceptionUtilities.cs (2)
17/// Creates an <see cref="InvalidOperationException"/> with information about an unexpected value. 20/// <returns>The <see cref="InvalidOperationException"/>, which should be thrown by the caller.</returns>
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (12)
NewlyCreatedProjectsFromDotNetNew.cs (1)
193catch (InvalidOperationException ex) when (ex.Message.Contains("command: dotnet workload restore"))
VisualStudioMSBuildWorkspaceTests.cs (11)
861var e = await Assert.ThrowsAsync<InvalidOperationException>(async delegate 876var e = await Assert.ThrowsAsync<InvalidOperationException>(async delegate 1127var e = await Assert.ThrowsAsync<InvalidOperationException>(async () => 1149var e = await Assert.ThrowsAsync<InvalidOperationException>(async () => 1188var e = await Assert.ThrowsAsync<InvalidOperationException>(() => workspace.OpenProjectAsync(projectName)); 1305await Assert.ThrowsAsync<InvalidOperationException>(async () =>
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (2)
TestExportJoinableTaskContext+DenyExecutionSynchronizationContext.cs (2)
108catch (InvalidOperationException e) 128catch (InvalidOperationException e)
Microsoft.CodeAnalysis.Workspaces.UnitTests (71)
CommandLineProject\CommandLineProjectTests.cs (1)
37Assert.Throws<InvalidOperationException>(delegate
SolutionTests\SolutionTests.cs (58)
117Assert.Throws<InvalidOperationException>(() => solution.RemoveDocument(s_unrelatedDocumentId)); 126Assert.Throws<InvalidOperationException>(() => solution.RemoveDocuments(ImmutableArray.Create(s_unrelatedDocumentId))); 136Assert.Throws<InvalidOperationException>(() => solution.RemoveAdditionalDocument(s_unrelatedDocumentId)); 145Assert.Throws<InvalidOperationException>(() => solution.RemoveAdditionalDocuments(ImmutableArray.Create(s_unrelatedDocumentId))); 155Assert.Throws<InvalidOperationException>(() => solution.RemoveAnalyzerConfigDocument(s_unrelatedDocumentId)); 164Assert.Throws<InvalidOperationException>(() => solution.RemoveAnalyzerConfigDocuments(ImmutableArray.Create(s_unrelatedDocumentId))); 185Assert.Throws<InvalidOperationException>(() => solution.WithDocumentName(s_unrelatedDocumentId, name)); 215Assert.Throws<InvalidOperationException>(() => solution.WithDocumentFolders(s_unrelatedDocumentId, folders)); 243Assert.Throws<InvalidOperationException>(() => solution.WithDocumentFilePath(s_unrelatedDocumentId, path)); 261Assert.Throws<InvalidOperationException>(() => solution.WithDocumentSourceCodeKind(s_unrelatedDocumentId, SourceCodeKind.Script)); 320Assert.Throws<InvalidOperationException>(() => solution.WithDocumentSyntaxRoot(s_unrelatedDocumentId, root)); 363Assert.Throws<InvalidOperationException>(() => solution.WithDocumentText(s_unrelatedDocumentId, text, PreservationMode.PreserveIdentity)); 387Assert.Throws<InvalidOperationException>(() => solution.WithDocumentText(s_unrelatedDocumentId, textAndVersion, PreservationMode.PreserveIdentity)); 931Assert.Throws<InvalidOperationException>(() => solution.WithAdditionalDocumentText(s_unrelatedDocumentId, text, PreservationMode.PreserveIdentity)); 955Assert.Throws<InvalidOperationException>(() => solution.WithAdditionalDocumentText(s_unrelatedDocumentId, textAndVersion, PreservationMode.PreserveIdentity)); 977Assert.Throws<InvalidOperationException>(() => solution.WithAnalyzerConfigDocumentText(s_unrelatedDocumentId, text, PreservationMode.PreserveIdentity)); 1001Assert.Throws<InvalidOperationException>(() => solution.WithAnalyzerConfigDocumentText(s_unrelatedDocumentId, textAndVersion, PreservationMode.PreserveIdentity)); 1023Assert.Throws<InvalidOperationException>(() => solution.WithDocumentTextLoader(s_unrelatedDocumentId, loader, PreservationMode.PreserveIdentity)); 1045Assert.Throws<InvalidOperationException>(() => solution.WithAdditionalDocumentTextLoader(s_unrelatedDocumentId, loader, PreservationMode.PreserveIdentity)); 1067Assert.Throws<InvalidOperationException>(() => solution.WithAnalyzerConfigDocumentTextLoader(s_unrelatedDocumentId, loader, PreservationMode.PreserveIdentity)); 1449Assert.Throws<InvalidOperationException>(() => solution.WithProjectAssemblyName(ProjectId.CreateNewId(), "x.dll")); 1473Assert.Throws<InvalidOperationException>(() => solution.WithProjectOutputFilePath(ProjectId.CreateNewId(), "x.dll")); 1527Assert.Throws<InvalidOperationException>(() => solution.WithProjectOutputRefFilePath(ProjectId.CreateNewId(), "x.dll")); 1550Assert.Throws<InvalidOperationException>(() => solution.WithProjectCompilationOutputInfo(ProjectId.CreateNewId(), info)); 1573Assert.Throws<InvalidOperationException>(() => solution.WithProjectDefaultNamespace(ProjectId.CreateNewId(), "x")); 1687Assert.Throws<InvalidOperationException>(() => solution.WithProjectName(ProjectId.CreateNewId(), "x")); 1710Assert.Throws<InvalidOperationException>(() => solution.WithProjectFilePath(ProjectId.CreateNewId(), "x")); 1726Assert.Throws<InvalidOperationException>(() => solution.WithProjectCompilationOptions(ProjectId.CreateNewId(), options)); 1775Assert.Throws<InvalidOperationException>(() => solution.WithProjectParseOptions(ProjectId.CreateNewId(), options)); 1933Assert.Throws<InvalidOperationException>(() => solution.WithProjectReferences(ProjectId.CreateNewId(), [projectRef])); 1936Assert.Throws<InvalidOperationException>(() => solution2.WithProjectReferences(projectId2, [new ProjectReference(projectId)])); 1937Assert.Throws<InvalidOperationException>(() => solution.WithProjectReferences(projectId, [new ProjectReference(projectId)])); 1991Assert.Throws<InvalidOperationException>(() => solution.AddProjectReferences(projectId3, [projectRef2])); 1994Assert.Throws<InvalidOperationException>(() => solution3.AddProjectReferences(projectId2, [projectRef3])); 1995Assert.Throws<InvalidOperationException>(() => solution3.AddProjectReferences(projectId, [new ProjectReference(projectId)])); 2030Assert.Throws<InvalidOperationException>(() => solution.RemoveProjectReference(ProjectId.CreateNewId(), projectRef2)); 2061Assert.Throws<InvalidOperationException>(() => solution.AddProjectReferences(submissionId2, [new ProjectReference(submissionId3)])); 2062Assert.Throws<InvalidOperationException>(() => solution.WithProjectReferences(submissionId1, [new ProjectReference(submissionId2), new ProjectReference(submissionId3)])); 2065Assert.Throws<InvalidOperationException>(() => solution.AddProjectReferences(projectId0, [new ProjectReference(submissionId1)])); 2066Assert.Throws<InvalidOperationException>(() => solution.WithProjectReferences(projectId0, [new ProjectReference(submissionId1)])); 2084Assert.Throws<InvalidOperationException>(() => solution.WithProjectMetadataReferences(ProjectId.CreateNewId(), [metadataRef])); 2109Assert.Throws<InvalidOperationException>(() => solution3.AddMetadataReferences(projectId, [metadataRef1])); 2133Assert.Throws<InvalidOperationException>(() => solution.RemoveMetadataReference(projectId, new TestMetadataReference())); 2136Assert.Throws<InvalidOperationException>(() => solution.RemoveMetadataReference(ProjectId.CreateNewId(), metadataRef1)); 2154Assert.Throws<InvalidOperationException>(() => solution.WithProjectAnalyzerReferences(ProjectId.CreateNewId(), [analyzerRef])); 2182Assert.Throws<InvalidOperationException>(() => solution3.AddAnalyzerReferences(projectId, [analyzerRef1])); 2206Assert.Throws<InvalidOperationException>(() => solution.RemoveAnalyzerReference(projectId, new TestAnalyzerReference())); 2209Assert.Throws<InvalidOperationException>(() => solution.RemoveAnalyzerReference(ProjectId.CreateNewId(), analyzerRef1)); 2249Assert.Throws<InvalidOperationException>(() => solution3.AddAnalyzerReferences([analyzerRef1])); 2271Assert.Throws<InvalidOperationException>(() => solution.RemoveAnalyzerReference(new TestAnalyzerReference())); 2376Assert.Throws<InvalidOperationException>(() => solution.AddDocument(documentId: DocumentId.CreateNewId(ProjectId.CreateNewId()), "name", loader)); 2407Assert.Throws<InvalidOperationException>(() => solution.AddDocument(documentId: DocumentId.CreateNewId(ProjectId.CreateNewId()), "name", "text")); 2435Assert.Throws<InvalidOperationException>(() => solution.AddDocument(documentId: DocumentId.CreateNewId(ProjectId.CreateNewId()), "name", sourceText)); 2487Assert.Throws<InvalidOperationException>(() => solution.AddDocument(documentId: DocumentId.CreateNewId(ProjectId.CreateNewId()), "name", syntaxRoot: root)); 2694Assert.ThrowsAny<InvalidOperationException>(() => solution.AddDocuments(ImmutableArray.Create(documentInfo1, documentInfo2))); 4704Assert.Throws<InvalidOperationException>(() => solution = solution.WithProjectDocumentsOrder(pid, ImmutableList.CreateRange([did5, did3, did2, did1]))); 5185Assert.Throws<InvalidOperationException>(() => solution.AddProjects(projects)); 5299Assert.Throws<InvalidOperationException>(() => solution.RemoveProjects(projectsToRemove));
UtilityTest\SpecializedTasksTests.cs (12)
378var exception = Assert.Throws<InvalidOperationException>(() => SpecializedTasks.TransformWithoutIntermediateCancellationExceptionAsync(func, transform, arg, cancellationToken)); 401var exception = Assert.Throws<InvalidOperationException>(() => task.Result); 431var exception = await Assert.ThrowsAsync<InvalidOperationException>(() => task.AsTask()); 455var exception = Assert.Throws<InvalidOperationException>(() => SpecializedTasks.TransformWithoutIntermediateCancellationExceptionAsync(func, transform, arg, cancellationToken)); 530var exception = Assert.Throws<InvalidOperationException>(() => SpecializedTasks.TransformWithoutIntermediateCancellationExceptionAsync(func, transform, arg, cancellationToken)); 554var exception = await Assert.ThrowsAsync<InvalidOperationException>(() => task.AsTask());
Microsoft.CommonLanguageServerProtocol.Framework.Example (2)
src\Dependencies\Contracts\ExceptionUtilities.cs (2)
17/// Creates an <see cref="InvalidOperationException"/> with information about an unexpected value. 20/// <returns>The <see cref="InvalidOperationException"/>, which should be thrown by the caller.</returns>
Microsoft.CommonLanguageServerProtocol.Framework.Package (2)
src\Dependencies\Contracts\ExceptionUtilities.cs (2)
17/// Creates an <see cref="InvalidOperationException"/> with information about an unexpected value. 20/// <returns>The <see cref="InvalidOperationException"/>, which should be thrown by the caller.</returns>
Microsoft.CommonLanguageServerProtocol.Framework.UnitTests (4)
ExampleTests.cs (2)
22var ex = Assert.Throws<InvalidOperationException>(() => TestExampleLanguageServer.CreateBadLanguageServer(logger));
HandlerProviderTests.cs (2)
55Assert.Throws<InvalidOperationException>(() => handlerProvider.GetMethodHandler("UndefinedMethod", TestMethodHandler.RequestType, TestMethodHandler.ResponseType, LanguageServerConstants.DefaultLanguageName)); 63Assert.Throws<InvalidOperationException>(() => handlerProvider.GetMethodHandler(TestMethodHandler.Name, TestMethodHandler.RequestType, responseTypeRef: TypeRef.Of<long>(), LanguageServerConstants.DefaultLanguageName));
Microsoft.Data.Analysis.Tests (1)
TextFieldParserTests.cs (1)
291Assert.Throws<InvalidOperationException>(() => parser.ReadFields());
Microsoft.DotNet.Build.Tasks.Feed.Tests (1)
DownloadFileTests.cs (1)
253FluentActions.Invoking(() => client.GetAsync(uri)).Should().ThrowAsync<InvalidOperationException>().WithMessage("Unexpected end of response sequence*");
Microsoft.DotNet.Build.Tasks.Packaging (1)
GetAssemblyReferences.cs (1)
80catch (InvalidOperationException)
Microsoft.DotNet.Internal.SymbolHelper (5)
SymbolUploadHelper.cs (1)
483try { process.Kill(); } catch (InvalidOperationException) { }
SymbolUploadHelperFactory.cs (4)
36/// <exception cref="InvalidOperationException">If the host is not supported for symbol publishing.</exception> 37/// <exception cref="InvalidOperationException">If the download response does not contain the expected URI.</exception> 67/// <exception cref="InvalidOperationException">If the host is not supported for symbol publishing.</exception> 88/// <exception cref="InvalidOperationException">If the host is not supported for symbol publishing.</exception>
Microsoft.DotNet.NuGetRepack.Tests (2)
VersionUpdaterTests.cs (2)
138var e1 = Assert.Throws<InvalidOperationException>(() => NuGetVersionUpdater.Run(new[] { c_daily }, outDirectoryOpt: null, VersionTranslation.Release, exactVersions: false));
Microsoft.DotNet.SignTool (1)
src\SignTool.cs (1)
64/// <exception cref="InvalidOperationException"></exception>
Microsoft.DotNet.SignTool.Tests (1)
SignToolTests.cs (1)
3214shouldFail.Should().Throw<InvalidOperationException>();
Microsoft.DotNet.StrongName (2)
Signing.cs (1)
138/// <exception cref="InvalidOperationException"></exception>
StrongNameHelper.cs (1)
71/// <exception cref="InvalidOperationException"></exception>
Microsoft.DotNet.XliffTasks (1)
Model\Document.cs (1)
113/// <exception cref="InvalidOperationException"><see cref="HasContent"/> is false.</exception>
Microsoft.DotNet.XUnitAssert.Tests (3)
ExceptionAssertsTests.cs (3)
101 Assert.IsType<InvalidOperationException>(ex); 254 Assert.IsType<InvalidOperationException>(ex); 571 Assert.IsType<InvalidOperationException>(ex);
Microsoft.Extensions.AI (2)
src\Shared\Throw\Throw.cs (2)
390/// Throws an <see cref="System.InvalidOperationException"/>. 401/// Throws an <see cref="System.InvalidOperationException"/>.
Microsoft.Extensions.AI.Abstractions (12)
ChatCompletion\ChatClientExtensions.cs (2)
42/// <exception cref="InvalidOperationException">No service of the requested type for the specified key is available.</exception> 66/// <exception cref="InvalidOperationException">No service of the requested type for the specified key is available.</exception>
Embeddings\EmbeddingGeneratorExtensions.cs (5)
47/// <exception cref="InvalidOperationException">No service of the requested type for the specified key is available.</exception> 72/// <exception cref="InvalidOperationException">No service of the requested type for the specified key is available.</exception> 100/// <exception cref="InvalidOperationException">The generator did not produce exactly one embedding.</exception> 127/// <exception cref="InvalidOperationException">The generator did not produce exactly one embedding.</exception> 177/// <exception cref="InvalidOperationException">The generator did not produce one embedding for each input value.</exception>
src\Shared\Throw\Throw.cs (2)
390/// Throws an <see cref="System.InvalidOperationException"/>. 401/// Throws an <see cref="System.InvalidOperationException"/>.
Throw.cs (1)
11public static InvalidOperationException CreateMissingServiceException(Type serviceType, object? serviceKey) =>
Utilities\AIJsonUtilities.cs (2)
35/// <exception cref="InvalidOperationException"><paramref name="options"/> is a read-only instance.</exception> 53/// <exception cref="InvalidOperationException"><paramref name="options"/> is a read-only instance.</exception>
Microsoft.Extensions.AI.Abstractions.Tests (15)
ChatCompletion\ChatClientExtensionsTests.cs (5)
65Assert.Throws<InvalidOperationException>(() => client.GetRequiredService(typeof(object))); 66Assert.Throws<InvalidOperationException>(() => client.GetRequiredService<object>()); 67Assert.Throws<InvalidOperationException>(() => client.GetRequiredService(typeof(object), "key")); 68Assert.Throws<InvalidOperationException>(() => client.GetRequiredService<object>("key")); 69Assert.Throws<InvalidOperationException>(() => client.GetRequiredService<IChatClient>());
Contents\FunctionCallContentTests..cs (3)
80var ex = new InvalidOperationException("hello", new NullReferenceException("bye")); 301[InlineData(typeof(InvalidOperationException))] 311Assert.IsType<InvalidOperationException>(content.Exception);
Embeddings\EmbeddingGeneratorExtensionsTests.cs (5)
69Assert.Throws<InvalidOperationException>(() => generator.GetRequiredService(typeof(object))); 70Assert.Throws<InvalidOperationException>(() => generator.GetRequiredService<object>()); 72Assert.Throws<InvalidOperationException>(() => generator.GetRequiredService(typeof(object), "key")); 73Assert.Throws<InvalidOperationException>(() => generator.GetRequiredService<object>("key")); 75Assert.Throws<InvalidOperationException>(() => generator.GetRequiredService<int?>());
Utilities\AIJsonUtilitiesTests.cs (2)
953Assert.Throws<InvalidOperationException>(() => AIJsonUtilities.DefaultOptions.AddAIContentType<DerivedAIContent>("derivativeContent")); 981Assert.Throws<InvalidOperationException>(() => JsonSerializer.Serialize(c, options));
Microsoft.Extensions.AI.AzureAIInference (2)
src\Shared\Throw\Throw.cs (2)
390/// Throws an <see cref="System.InvalidOperationException"/>. 401/// Throws an <see cref="System.InvalidOperationException"/>.
Microsoft.Extensions.AI.AzureAIInference.Tests (4)
AzureAIInferenceChatClientTests.cs (4)
42await Assert.ThrowsAsync<InvalidOperationException>(() => chatClient.GetResponseAsync("hello")); 43await Assert.ThrowsAsync<InvalidOperationException>(() => chatClient.GetStreamingResponseAsync("hello").GetAsyncEnumerator().MoveNextAsync().AsTask()); 45await Assert.ThrowsAsync<InvalidOperationException>(() => chatClient.GetResponseAsync("hello", new ChatOptions { ModelId = null })); 46await Assert.ThrowsAsync<InvalidOperationException>(() => chatClient.GetStreamingResponseAsync("hello", new ChatOptions { ModelId = null }).GetAsyncEnumerator().MoveNextAsync().AsTask());
Microsoft.Extensions.AI.Evaluation (2)
src\Shared\Throw\Throw.cs (2)
390/// Throws an <see cref="System.InvalidOperationException"/>. 401/// Throws an <see cref="System.InvalidOperationException"/>.
Microsoft.Extensions.AI.Evaluation.Console (2)
src\Shared\Throw\Throw.cs (2)
390/// Throws an <see cref="System.InvalidOperationException"/>. 401/// Throws an <see cref="System.InvalidOperationException"/>.
Microsoft.Extensions.AI.Evaluation.Console.Tests (1)
ExceptionUtilitiesTests.cs (1)
17var exception = new InvalidOperationException();
Microsoft.Extensions.AI.Evaluation.NLP (2)
src\Shared\Throw\Throw.cs (2)
390/// Throws an <see cref="System.InvalidOperationException"/>. 401/// Throws an <see cref="System.InvalidOperationException"/>.
Microsoft.Extensions.AI.Evaluation.Quality (2)
src\Shared\Throw\Throw.cs (2)
390/// Throws an <see cref="System.InvalidOperationException"/>. 401/// Throws an <see cref="System.InvalidOperationException"/>.
Microsoft.Extensions.AI.Evaluation.Reporting (2)
src\Shared\Throw\Throw.cs (2)
390/// Throws an <see cref="System.InvalidOperationException"/>. 401/// Throws an <see cref="System.InvalidOperationException"/>.
Microsoft.Extensions.AI.Evaluation.Reporting.Azure (2)
src\Shared\Throw\Throw.cs (2)
390/// Throws an <see cref="System.InvalidOperationException"/>. 401/// Throws an <see cref="System.InvalidOperationException"/>.
Microsoft.Extensions.AI.Evaluation.Safety (2)
src\Shared\Throw\Throw.cs (2)
390/// Throws an <see cref="System.InvalidOperationException"/>. 401/// Throws an <see cref="System.InvalidOperationException"/>.
Microsoft.Extensions.AI.Integration.Tests (2)
src\Shared\Throw\Throw.cs (2)
390/// Throws an <see cref="System.InvalidOperationException"/>. 401/// Throws an <see cref="System.InvalidOperationException"/>.
Microsoft.Extensions.AI.Ollama (2)
src\Shared\Throw\Throw.cs (2)
390/// Throws an <see cref="System.InvalidOperationException"/>. 401/// Throws an <see cref="System.InvalidOperationException"/>.
Microsoft.Extensions.AI.Ollama.Tests (5)
OllamaChatClientIntegrationTests.cs (3)
98InvalidOperationException ex; 99ex = await Assert.ThrowsAsync<InvalidOperationException>(() => chatClient.GetResponseAsync("Hello, world!")); 102ex = await Assert.ThrowsAsync<InvalidOperationException>(() => chatClient.GetStreamingResponseAsync("Hello, world!").ToChatResponseAsync());
OllamaEmbeddingGeneratorIntegrationTests.cs (2)
28InvalidOperationException ex; 29ex = await Assert.ThrowsAsync<InvalidOperationException>(() => generator.GenerateAsync(["Hello, world!"]));
Microsoft.Extensions.AI.OpenAI (4)
src\Shared\ServerSentEvents\SseParser_1.cs (2)
111/// <exception cref="InvalidOperationException">The parser has already been enumerated. Such an exception may propagate out of a call to <see cref="IEnumerator.MoveNext"/>.</exception> 190/// <exception cref="InvalidOperationException">The parser has already been enumerated. May propagate out of a call to <see cref="IAsyncEnumerator{T}.MoveNextAsync"/>.</exception>
src\Shared\Throw\Throw.cs (2)
390/// Throws an <see cref="System.InvalidOperationException"/>. 401/// Throws an <see cref="System.InvalidOperationException"/>.
Microsoft.Extensions.AI.Templates.Tests (1)
Infrastructure\ProcessExtensions.cs (1)
14catch (InvalidOperationException ex) when (ex.Message.Contains("No process is associated with this object"))
Microsoft.Extensions.AI.Tests (10)
ChatCompletion\ChatClientBuilderTest.cs (3)
77var ex = Assert.Throws<InvalidOperationException>(() => builder.Build()); 92Assert.Throws<InvalidOperationException>(() => keyedServiceProvider.GetRequiredKeyedService(typeof(object), "key"));
ChatCompletion\ChatClientStructuredOutputExtensionsTests.cs (4)
229var ex = Assert.Throws<InvalidOperationException>(() => response.Result); 248var ex = Assert.Throws<InvalidOperationException>(() => response.Result);
Embeddings\EmbeddingGeneratorBuilderTests.cs (2)
77var ex = Assert.Throws<InvalidOperationException>(() => builder.Build());
Functions\AIFunctionFactoryTest.cs (1)
410await Assert.ThrowsAsync<InvalidOperationException>(async () => await func.InvokeAsync());
Microsoft.Extensions.AmbientMetadata.Application (2)
src\Shared\Throw\Throw.cs (2)
390/// Throws an <see cref="System.InvalidOperationException"/>. 401/// Throws an <see cref="System.InvalidOperationException"/>.
Microsoft.Extensions.AsyncState (6)
IAsyncContext.cs (2)
22/// <exception cref="InvalidOperationException">Context is not initialized.</exception> 33/// <exception cref="InvalidOperationException">Context is not initialized.</exception>
IAsyncState.cs (2)
42/// <exception cref="InvalidOperationException">The context is not initialized.</exception> 51/// <exception cref="InvalidOperationException">Context is not initialized.</exception>
src\Shared\Throw\Throw.cs (2)
390/// Throws an <see cref="System.InvalidOperationException"/>. 401/// Throws an <see cref="System.InvalidOperationException"/>.
Microsoft.Extensions.AsyncState.Tests (4)
AsyncContextTests.cs (2)
146Assert.Throws<InvalidOperationException>(() => _ = context1.Get()); 165Assert.Throws<InvalidOperationException>(() => context1.Set(new Thing()));
AsyncStateTests.cs (2)
114Assert.Throws<InvalidOperationException>(() => state.Get(token)); 187Assert.Throws<InvalidOperationException>(() => state.Get(token));
Microsoft.Extensions.Caching.Hybrid (2)
src\Shared\Throw\Throw.cs (2)
390/// Throws an <see cref="System.InvalidOperationException"/>. 401/// Throws an <see cref="System.InvalidOperationException"/>.
Microsoft.Extensions.Caching.SqlServer.Tests (2)
SqlServerCacheWithDatabaseTest.cs (2)
81var exception = await Assert.ThrowsAsync<InvalidOperationException>(() =>
Microsoft.Extensions.Compliance.Abstractions (2)
src\Shared\Throw\Throw.cs (2)
390/// Throws an <see cref="System.InvalidOperationException"/>. 401/// Throws an <see cref="System.InvalidOperationException"/>.
Microsoft.Extensions.Compliance.Redaction (3)
src\Shared\Data.Validation\LengthAttribute.cs (1)
92/// <exception cref="InvalidOperationException">The validated type is not supported.</exception>
src\Shared\Throw\Throw.cs (2)
390/// Throws an <see cref="System.InvalidOperationException"/>. 401/// Throws an <see cref="System.InvalidOperationException"/>.
Microsoft.Extensions.Compliance.Redaction.Tests (2)
RedactorProviderTests.cs (2)
113Assert.Throws<InvalidOperationException>(() => new RedactorProvider( 126Assert.Throws<InvalidOperationException>(() => new RedactorProvider(
Microsoft.Extensions.Compliance.Testing (5)
FakeRedactionCollector.cs (2)
21/// <exception cref="InvalidOperationException">There has been no previous redactor request event.</exception> 55/// <exception cref="InvalidOperationException">There has been no previous redaction event.</exception>
FakeRedactionServiceProviderExtensions.cs (1)
20/// <exception cref="InvalidOperationException">The collector is not in the container.</exception>
src\Shared\Throw\Throw.cs (2)
390/// Throws an <see cref="System.InvalidOperationException"/>. 401/// Throws an <see cref="System.InvalidOperationException"/>.
Microsoft.Extensions.Compliance.Testing.Tests (3)
RedactionFakesEventCollectorTests.cs (3)
18Assert.Throws<InvalidOperationException>(() => c.LastRedactorRequested); 19Assert.Throws<InvalidOperationException>(() => c.LastRedactedData); 27Assert.Throws<InvalidOperationException>(() => sp.GetFakeRedactionCollector());
Microsoft.Extensions.Configuration.Abstractions (1)
ConfigurationExtensions.cs (1)
97/// <exception cref="System.InvalidOperationException">There is no section with key <paramref name="key"/>.</exception>
Microsoft.Extensions.Configuration.Binder (2)
BinderOptions.cs (1)
24/// <see langword="true" /> if an <see cref="System.InvalidOperationException"/> is thrown with a description; <see langword="false" /> if no exceptions are thrown. The default is <see langword="false" />.
ConfigurationBinder.cs (1)
541/// <exception cref="InvalidOperationException">If the type cannot be created.</exception>
Microsoft.Extensions.Configuration.UserSecrets (6)
UserSecretsConfigurationExtensions.cs (6)
28/// <exception cref="InvalidOperationException">The assembly containing <typeparamref name="T"/> does not have <see cref="UserSecretsIdAttribute"/>.</exception> 45/// <exception cref="InvalidOperationException"><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"><paramref name="optional"/> is <see langword="false"/> and the assembly containing <typeparamref name="T"/> does not have a valid <see cref="UserSecretsIdAttribute"/>.</exception> 82/// <exception cref="InvalidOperationException"><paramref name="assembly"/> does not have a valid <see cref="UserSecretsIdAttribute"/>.</exception> 99/// <exception cref="InvalidOperationException"><paramref name="optional"/> is false and <paramref name="assembly"/> does not have a valid <see cref="UserSecretsIdAttribute"/>.</exception> 117/// <exception cref="InvalidOperationException"><paramref name="optional"/> is false and <paramref name="assembly"/> does not have a valid <see cref="UserSecretsIdAttribute"/>.</exception>
Microsoft.Extensions.DependencyInjection (2)
ServiceProvider.cs (2)
111/// <exception cref="InvalidOperationException">The <see cref="KeyedService.AnyKey"/> value is used for <paramref name="serviceKey"/> 136/// <exception cref="InvalidOperationException">The service wasn't found or the <see cref="KeyedService.AnyKey"/> value is used
Microsoft.Extensions.DependencyInjection.Abstractions (8)
ServiceCollection.cs (1)
108/// After the collection is marked as read-only, any further attempt to modify it throws an <see cref="InvalidOperationException" />.
ServiceDescriptor.cs (3)
167/// or throws <see cref="InvalidOperationException"/> if <see cref="IsKeyedService"/> is <see langword="false"/>. 198/// or throws <see cref="InvalidOperationException"/> if <see cref="IsKeyedService"/> is <see langword="false"/>. 228/// or throws <see cref="InvalidOperationException"/> if <see cref="IsKeyedService"/> is <see langword="false"/>.
ServiceProviderKeyedServiceExtensions.cs (2)
61/// <exception cref="System.InvalidOperationException">There is no service of type <paramref name="serviceType"/>.</exception> 82/// <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.DependencyInjection.AutoActivation (2)
src\Shared\Throw\Throw.cs (2)
390/// Throws an <see cref="System.InvalidOperationException"/>. 401/// Throws an <see cref="System.InvalidOperationException"/>.
Microsoft.Extensions.Diagnostics.ExceptionSummarization (2)
src\Shared\Throw\Throw.cs (2)
390/// Throws an <see cref="System.InvalidOperationException"/>. 401/// Throws an <see cref="System.InvalidOperationException"/>.
Microsoft.Extensions.Diagnostics.HealthChecks.Common (2)
src\Shared\Throw\Throw.cs (2)
390/// Throws an <see cref="System.InvalidOperationException"/>. 401/// Throws an <see cref="System.InvalidOperationException"/>.
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.Diagnostics.Probes (3)
src\Shared\Data.Validation\LengthAttribute.cs (1)
92/// <exception cref="InvalidOperationException">The validated type is not supported.</exception>
src\Shared\Throw\Throw.cs (2)
390/// Throws an <see cref="System.InvalidOperationException"/>. 401/// Throws an <see cref="System.InvalidOperationException"/>.
Microsoft.Extensions.Diagnostics.ResourceMonitoring (4)
src\Shared\Data.Validation\LengthAttribute.cs (1)
92/// <exception cref="InvalidOperationException">The validated type is not supported.</exception>
src\Shared\Throw\Throw.cs (2)
390/// Throws an <see cref="System.InvalidOperationException"/>. 401/// Throws an <see cref="System.InvalidOperationException"/>.
Windows\Interop\JobObjectInfo.cs (1)
187/// <exception cref="InvalidOperationException">The process is not running in a job.</exception>
Microsoft.Extensions.Diagnostics.ResourceMonitoring.Tests (33)
Linux\LinuxUtilizationParserCgroupV1Tests.cs (17)
30Assert.Throws<InvalidOperationException>(() => parser.GetHostAvailableMemory()); 31Assert.Throws<InvalidOperationException>(() => parser.GetAvailableMemoryInBytes()); 32Assert.Throws<InvalidOperationException>(() => parser.GetMemoryUsageInBytes()); 33Assert.Throws<InvalidOperationException>(() => parser.GetCgroupLimitedCpus()); 34Assert.Throws<InvalidOperationException>(() => parser.GetHostCpuUsageInNanoseconds()); 35Assert.Throws<InvalidOperationException>(() => parser.GetHostCpuCount()); 36Assert.Throws<InvalidOperationException>(() => parser.GetCgroupCpuUsageInNanoseconds()); 37Assert.Throws<InvalidOperationException>(() => parser.GetCgroupRequestCpu()); 91Assert.IsAssignableFrom<InvalidOperationException>(r); 118Assert.IsAssignableFrom<InvalidOperationException>(r); 137Assert.IsAssignableFrom<InvalidOperationException>(r); 163Assert.IsAssignableFrom<InvalidOperationException>(r); 237Assert.IsAssignableFrom<InvalidOperationException>(r); 258Assert.IsAssignableFrom<InvalidOperationException>(r); 286Assert.IsAssignableFrom<InvalidOperationException>(r); 336Assert.IsAssignableFrom<InvalidOperationException>(r); 353Assert.IsAssignableFrom<InvalidOperationException>(r);
Linux\LinuxUtilizationParserCgroupV2Tests.cs (12)
32Assert.Throws<InvalidOperationException>(() => parser.GetHostAvailableMemory()); 33Assert.Throws<InvalidOperationException>(() => parser.GetAvailableMemoryInBytes()); 34Assert.Throws<InvalidOperationException>(() => parser.GetMemoryUsageInBytes()); 35Assert.Throws<InvalidOperationException>(() => parser.GetCgroupLimitedCpus()); 36Assert.Throws<InvalidOperationException>(() => parser.GetCgroupLimitV2()); 37Assert.Throws<InvalidOperationException>(() => parser.GetHostCpuUsageInNanoseconds()); 38Assert.Throws<InvalidOperationException>(() => parser.GetHostCpuCount()); 39Assert.Throws<InvalidOperationException>(() => parser.GetCgroupCpuUsageInNanoseconds()); 40Assert.Throws<InvalidOperationException>(() => parser.GetCgroupCpuUsageInNanosecondsAndCpuPeriodsV2()); 41Assert.Throws<InvalidOperationException>(() => parser.GetCgroupRequestCpu()); 42Assert.Throws<InvalidOperationException>(() => parser.GetCgroupRequestCpuV2()); 43Assert.Throws<InvalidOperationException>(() => parser.GetCgroupPeriodsIntervalInMicroSecondsV2());
Windows\Tcp6TableInfoTests.cs (2)
240Assert.Throws<InvalidOperationException>(() => 256Assert.Throws<InvalidOperationException>(() =>
Windows\TcpTableInfoTests.cs (2)
182Assert.Throws<InvalidOperationException>(() => 198Assert.Throws<InvalidOperationException>(() =>
Microsoft.Extensions.Diagnostics.Testing (5)
Logging\FakeLogCollector.cs (1)
87/// <exception cref="InvalidOperationException">No records have been captured.</exception>
Logging\FakeLogger.cs (1)
109/// <exception cref="InvalidOperationException">No records have been captured.</exception>
Logging\FakeLoggerServiceProviderExtensions.cs (1)
18/// <exception cref="InvalidOperationException">No collector exists in the provider.</exception>
src\Shared\Throw\Throw.cs (2)
390/// Throws an <see cref="System.InvalidOperationException"/>. 401/// Throws an <see cref="System.InvalidOperationException"/>.
Microsoft.Extensions.Diagnostics.Testing.Tests (4)
Logging\FakeLoggerExtensionsTests.cs (1)
85Assert.Throws<InvalidOperationException>(() => serviceProvider.GetFakeLogCollector());
Logging\FakeLoggerTests.cs (1)
64Assert.Throws<InvalidOperationException>(() => logger.LatestRecord.Level);
Metrics\MetricCollectorTests.cs (2)
36Assert.Throws<InvalidOperationException>(() => new MetricCollector<Guid>(meter, "Counter")); 37Assert.Throws<InvalidOperationException>(() => new MetricCollector<Guid>(null, meter.Name, "Counter"));
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">In all cases.</exception>
Microsoft.Extensions.Hosting.Testing (4)
FakeHostingExtensions.cs (2)
50/// <exception cref="InvalidOperationException">No collector exists in the provider.</exception> 62/// <exception cref="InvalidOperationException">No collector exists in the provider.</exception>
src\Shared\Throw\Throw.cs (2)
390/// Throws an <see cref="System.InvalidOperationException"/>. 401/// Throws an <see cref="System.InvalidOperationException"/>.
Microsoft.Extensions.Hosting.Testing.Tests (4)
FakeHostBuilderTests.cs (2)
140x => Assert.IsType<InvalidOperationException>(x)); 172x => Assert.IsType<InvalidOperationException>(x));
HostingFakesExtensionsTests.cs (2)
54Assert.IsType<InvalidOperationException>(exception); 76Assert.IsType<InvalidOperationException>(exception);
Microsoft.Extensions.Http (2)
DefaultTypedHttpClientFactory.cs (1)
44catch (InvalidOperationException iox)
HttpMessageHandlerBuilder.cs (1)
78/// <exception cref="InvalidOperationException"><paramref name="additionalHandlers"/> contains a <see langword="null"/> entry.
Microsoft.Extensions.Http.Diagnostics (1)
Logging\Internal\ServiceProviderExtensions.cs (1)
18/// <exception cref="InvalidOperationException">There is no service of type <typeparamref name="T"/> registered.</exception>
Microsoft.Extensions.Http.Diagnostics.Tests (3)
Logging\HttpClientLoggerTest.cs (3)
520var exception = new InvalidOperationException("test"); 554await Assert.ThrowsAsync<InvalidOperationException>(act); 973var exception = new InvalidOperationException("Test exception");
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.Http.Resilience (3)
src\Shared\Data.Validation\LengthAttribute.cs (1)
92/// <exception cref="InvalidOperationException">The validated type is not supported.</exception>
src\Shared\Throw\Throw.cs (2)
390/// Throws an <see cref="System.InvalidOperationException"/>. 401/// Throws an <see cref="System.InvalidOperationException"/>.
Microsoft.Extensions.Http.Resilience.Tests (16)
Hedging\HedgingTests.cs (2)
151var exception = await Assert.ThrowsAsync<InvalidOperationException>(
Hedging\StandardHedgingTests.cs (2)
119generator.Invoking(g => g(args)).Should().Throw<InvalidOperationException>().WithMessage("Request message snapshot is not attached to the resilience context."); 139Assert.Throws<InvalidOperationException>(() =>
Internal\RequestMessageSnapshotStrategyTests.cs (2)
39strategy.Invoking(s => s.Execute(() => { })).Should().Throw<InvalidOperationException>(); 49strategy.Invoking(s => s.Execute(_ => { }, context)).Should().Throw<InvalidOperationException>();
Resilience\HttpClientBuilderExtensionsTests.BySelector.cs (1)
55Assert.Throws<InvalidOperationException>(() => provider(request));
Resilience\HttpClientBuilderExtensionsTests.Standard.cs (1)
150Assert.Throws<InvalidOperationException>(() => HttpClientBuilderExtensionsTests.GetPipeline(builder.Services, "test-standard"));
Resilience\RequestMessageSnapshotTests.cs (2)
28var exception = Assert.Throws<InvalidOperationException>(() => RequestMessageSnapshot.Create(initialRequest));
Resilience\ResilienceHandlerTest.cs (1)
159await Assert.ThrowsAsync<InvalidOperationException>(() => InvokeHandler(invoker, request, asynchronous));
Routing\RoutingHelperTest.cs (1)
34Assert.Throws<InvalidOperationException>(() => new List<int> { 1, 2, 3, 4 }.SelectByWeight(v => v, randomizer.Object));
Routing\RoutingResilienceStrategyTests.cs (2)
21strategy.Invoking(s => s.Execute(() => { })).Should().Throw<InvalidOperationException>().WithMessage("The HTTP request message was not found in the resilience context."); 31strategy.Invoking(s => s.Execute(_ => { }, context)).Should().Throw<InvalidOperationException>().WithMessage("The HTTP request message was not found in the resilience context.");
Routing\RoutingStrategyTest.cs (2)
92Assert.Throws<InvalidOperationException>(() => CreateEmptyStrategy().TryGetNextRoute(out _)); 108Assert.Throws<InvalidOperationException>(() => strategy.TryGetNextRoute(out _));
Microsoft.Extensions.Logging.Console (1)
ConfigurationConsoleLoggerSettings.cs (1)
76/// <exception cref="InvalidOperationException"></exception>
Microsoft.Extensions.ML.Tests (4)
FileLoaderTests.cs (2)
35Assert.Throws<InvalidOperationException>(() => loaderUnderTest.GetModel()); 36Assert.Throws<InvalidOperationException>(() => loaderUnderTest.GetReloadToken());
UriLoaderTests.cs (2)
35Assert.Throws<InvalidOperationException>(() => loaderUnderTest.GetModel()); 36Assert.Throws<InvalidOperationException>(() => loaderUnderTest.GetReloadToken());
Microsoft.Extensions.ObjectPool.DependencyInjection (2)
src\Shared\Throw\Throw.cs (2)
390/// Throws an <see cref="System.InvalidOperationException"/>. 401/// Throws an <see cref="System.InvalidOperationException"/>.
Microsoft.Extensions.ObjectPool.DependencyInjection.Tests (1)
DependencyInjectionExtensionsTests.cs (1)
217Assert.Throws<InvalidOperationException>(() => provider.GetRequiredService<ObjectPool<ITestClass>>().Get());
Microsoft.Extensions.Options.Contextual (2)
src\Shared\Throw\Throw.cs (2)
390/// Throws an <see cref="System.InvalidOperationException"/>. 401/// Throws an <see cref="System.InvalidOperationException"/>.
Microsoft.Extensions.Resilience (2)
src\Shared\Throw\Throw.cs (2)
390/// Throws an <see cref="System.InvalidOperationException"/>. 401/// Throws an <see cref="System.InvalidOperationException"/>.
Microsoft.Extensions.ServiceDiscovery (1)
Http\HttpServiceEndpointResolver.cs (1)
31/// <exception cref="InvalidOperationException">The request had no <see cref="HttpRequestMessage.RequestUri"/> set or a suitable endpoint could not be found.</exception>
Microsoft.Extensions.ServiceDiscovery.Dns.Tests (1)
Resolver\TcpFailoverTests.cs (1)
62await Assert.ThrowsAsync<InvalidOperationException>(() => serverTask);
Microsoft.Extensions.ServiceDiscovery.Tests (9)
ServiceEndpointResolverTests.cs (9)
29var exception = Assert.Throws<InvalidOperationException>(() => resolverFactory.CreateWatcher("https://basket")); 40var exception = Assert.Throws<InvalidOperationException>(watcher.Start); 42exception = await Assert.ThrowsAsync<InvalidOperationException>(async () => await watcher.GetEndpointsAsync()); 63var exception = await Assert.ThrowsAsync<InvalidOperationException>(async () => await client.GetStringAsync("/")); 255var exception = await Assert.ThrowsAsync<InvalidOperationException>(async () =>
Microsoft.Extensions.Telemetry (3)
src\Shared\Data.Validation\LengthAttribute.cs (1)
92/// <exception cref="InvalidOperationException">The validated type is not supported.</exception>
src\Shared\Throw\Throw.cs (2)
390/// Throws an <see cref="System.InvalidOperationException"/>. 401/// Throws an <see cref="System.InvalidOperationException"/>.
Microsoft.Extensions.Telemetry.Abstractions (2)
src\Shared\Throw\Throw.cs (2)
390/// Throws an <see cref="System.InvalidOperationException"/>. 401/// Throws an <see cref="System.InvalidOperationException"/>.
Microsoft.Extensions.Telemetry.Tests (9)
Http\HttpParserTests.cs (2)
64var ex = Assert.Throws<InvalidOperationException>(
Http\HttpRouteFormatterTests.cs (2)
144var ex = Assert.Throws<InvalidOperationException>(
Logging\ExtendedLoggerTests.cs (3)
475catch (InvalidOperationException e) 840var exception = logException ? new InvalidOperationException() : null; 880var exception = logException ? new InvalidOperationException() : null;
Sampling\RandomProbabilisticSamplerTests.cs (1)
16private readonly InvalidOperationException _dummyException = new("test.");
Sampling\TraceBasedSamplerTests.cs (1)
16private readonly InvalidOperationException _dummyException = new("test.");
Microsoft.Extensions.TimeProvider.Testing (2)
src\Shared\Throw\Throw.cs (2)
390/// Throws an <see cref="System.InvalidOperationException"/>. 401/// Throws an <see cref="System.InvalidOperationException"/>.
Microsoft.Extensions.TimeProvider.Testing.Tests (1)
FakeTimeProviderTests.cs (1)
555catch (InvalidOperationException)
Microsoft.Extensions.Validation.GeneratorTests (2)
ValidationsGenerator.Recursion.cs (2)
81var exception = await Assert.ThrowsAsync<InvalidOperationException>(async () => await endpoint.RequestDelegate(httpContext));
Microsoft.Extensions.Validation.Tests (4)
RuntimeValidatableParameterInfoResolverTests.cs (2)
29var exception = Assert.Throws<InvalidOperationException>(() =>
ValidatableTypeInfoTests.cs (2)
371var exception = await Assert.ThrowsAsync<InvalidOperationException>(
Microsoft.Gen.Logging.Generated.Tests (5)
test\Generators\Microsoft.Gen.Logging\TestClasses\ArgTestExtensions.cs (5)
21public static partial void Method4(ILogger logger, InvalidOperationException p1); 24public static partial void Method5(ILogger logger, System.InvalidOperationException p1, System.InvalidOperationException p2); 27public static partial void Method6(ILogger logger, System.InvalidOperationException p1, int p2); 30public static partial void Method7(ILogger logger, int p1, System.InvalidOperationException p2);
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)
118/// <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)
170var ex = Assert.Throws<InvalidOperationException>(() => 868var ex = Assert.Throws<InvalidOperationException>(() => DotNetDispatcher.ParseArguments(new TestJSRuntime(), method, arguments, new[] { typeof(int), typeof(TestDTO), }));
Microsoft.Maui (1)
Primitives\RetrievePlatformValueRequest.cs (1)
23 /// <exception cref="InvalidOperationException">The result has already been set.</exception>
Microsoft.Maui.Controls (13)
BindableObject.cs (4)
115 /// <exception cref="InvalidOperationException">Thrown when <paramref name="propertyKey"/> is a read-only property.</exception> 505 /// <exception cref="InvalidOperationException">Thrown when the bindable property identified by <paramref name="propertyKey"/> is read-only.</exception> 791 /// <exception cref="InvalidOperationException">Thrown when <paramref name="property"/> is read-only.</exception> 802 /// <exception cref="InvalidOperationException">Thrown when the bindable property identified by <paramref name="propertyKey"/> is read-only.</exception>
BindingExpressionHelper.cs (2)
21 catch (InvalidOperationException) 51 catch (Exception ex) when (ex is InvalidCastException || ex is FormatException || ex is InvalidOperationException || ex is OverflowException)
Element\Element.cs (1)
514 /// <exception cref="InvalidOperationException">Thrown if the element's namescope couldn't be found.</exception>
ListProxy.cs (1)
330 catch (InvalidOperationException ioex)
Page\Page.cs (1)
550 /// <exception cref="InvalidOperationException">Thrown when the page's <see cref="Element.RealParent"/> can't be casted to <see cref="Page"/> or <see cref="BaseShellItem"/>.</exception>
ShadowTypeConverter.cs (3)
46 /// <exception cref="InvalidOperationException">Thrown when <paramref name="value" /> is not a valid Shadow.</exception> 142 /// <exception cref="InvalidOperationException">Thrown when <paramref name="value" /> is not a Shadow or the Brush is not a SolidColorBrush.</exception> 174 /// <exception cref="InvalidOperationException">Thrown when the value is not a SolidColorBrush or has no Color.</exception>
Tweener.cs (1)
202 catch (InvalidOperationException)
Microsoft.Maui.Controls.Xaml (2)
XamlParser.cs (2)
309 catch (InvalidOperationException) 425 catch (InvalidOperationException)
Microsoft.Maui.Essentials (12)
Accelerometer\Accelerometer.shared.cs (2)
38 /// Will throw <see cref="InvalidOperationException"/> if <see cref="IsMonitoring"/> is <see langword="true"/>.</remarks> 218 /// <exception cref="InvalidOperationException">Thrown if <see cref="IsMonitoring"/> returns <see langword="true"/>.</exception>
Barometer\Barometer.shared.cs (2)
69 /// Will throw <see cref="InvalidOperationException"/> if <see cref="IsMonitoring"/> is <see langword="true"/>. 197 /// <exception cref="InvalidOperationException">Thrown if <see cref="IsMonitoring"/> returns <see langword="true"/>.</exception>
Compass\Compass.shared.cs (2)
90 /// Will throw <see cref="InvalidOperationException"/> if <see cref="IsMonitoring"/> is <see langword="true"/>. 101 /// Will throw <see cref="InvalidOperationException"/> if <see cref="IsMonitoring"/> is <see langword="true"/>.
Geolocation\Geolocation.shared.cs (2)
57 /// <exception cref="InvalidOperationException">Thrown if already listening and <see cref="IsListeningForeground"/> returns <see langword="true"/>.</exception> 145 /// <exception cref="InvalidOperationException">Thrown if already listening and <see cref="IsListeningForeground"/> returns <see langword="true"/>.</exception>
Magnetometer\Magnetometer.shared.cs (1)
72 /// Will throw <see cref="InvalidOperationException"/> if <see cref="IsMonitoring"/> is <see langword="true"/>.
OrientationSensor\OrientationSensor.shared.cs (2)
70 /// Will throw <see cref="InvalidOperationException"/> if <see cref="IsMonitoring"/> is <see langword="true"/>. 225 /// Will throw <see cref="InvalidOperationException"/> if <see cref="IsMonitoring"/> is <see langword="true"/>.
WebAuthenticator\WebAuthenticator.shared.cs (1)
24 /// <exception cref="InvalidOperationException">
Microsoft.ML.AutoML.Tests (1)
SplitUtilTests.cs (1)
34Assert.Throws<InvalidOperationException>(() => SplitUtil.CrossValSplit(mlContext, dataView, 10, null));
Microsoft.ML.Core.Tests (2)
UnitTests\TestUtilities.cs (2)
134Assert.Throws<InvalidOperationException>(() => Utils.IsIncreasing(0, x, 11, 10)); 156Assert.Throws<InvalidOperationException>(() => Utils.IsIncreasing(0, nullX, 7, 10));
Microsoft.ML.Data (2)
Transforms\ValueMapping.cs (2)
576catch (InvalidOperationException) 586catch (InvalidOperationException)
Microsoft.ML.OnnxTransformerTest (3)
DnnImageFeaturizerTest.cs (1)
92catch (InvalidOperationException) { }
OnnxTransformTests.cs (2)
175catch (InvalidOperationException) { } 417Assert.Throws<InvalidOperationException>(() => ML.Transforms.ApplyOnnxModel("softmaxout_1", "data_0", modelFile, gpuDeviceId: _gpuDeviceId, fallbackToCpu: _fallbackToCpu));
Microsoft.ML.Parquet (6)
PartitionedFileLoader.cs (2)
489catch (InvalidOperationException e) 733catch (InvalidOperationException e)
PartitionedPathParser.cs (2)
50/// <exception cref="InvalidOperationException">Thrown when parsing fails.</exception> 58/// <exception cref="InvalidOperationException">Thrown when parsing fails.</exception>
PartitionedPathUtils.cs (2)
20/// <exception cref="InvalidOperationException">If the paths are not relative.</exception> 48catch (InvalidOperationException e)
Microsoft.ML.Sweeper (1)
AsyncSweeper.cs (1)
284catch (InvalidOperationException)
Microsoft.ML.TensorFlow.Tests (1)
TensorFlowEstimatorTests.cs (1)
97catch (InvalidOperationException) { }
Microsoft.ML.TestFramework (5)
DataPipe\Parquet.cs (2)
31var ex = Assert.Throws<InvalidOperationException>(() => TestCore(pathData, false, new[] { "loader=Parquet{bigIntDates=+}" }, forceDense: true));
DataPipe\TestDataPipe.cs (1)
1608catch (InvalidOperationException ex)
DataPipe\TestDataPipeBase.cs (2)
48catch (InvalidOperationException) { } 55Assert.True(e is ArgumentOutOfRangeException || e is InvalidOperationException);
Microsoft.ML.TestFrameworkCommon (2)
TestCommon.cs (1)
277catch (InvalidOperationException ex)
Utility\NativeLibrary.cs (1)
134/// <exception cref="InvalidOperationException">Thrown when no function with the given name
Microsoft.ML.Tests (30)
CachingTests.cs (2)
67var ex = Assert.Throws<InvalidOperationException>(() => CacheOnEmptyEstimatorChain());
ImagesTests.cs (7)
1319Assert.Throws<InvalidOperationException>(() => image.Tag); 1320Assert.Throws<InvalidOperationException>(() => image.Tag = "Something"); 1321Assert.Throws<InvalidOperationException>(() => image.Width); 1322Assert.Throws<InvalidOperationException>(() => image.Height); 1323Assert.Throws<InvalidOperationException>(() => image.PixelFormat); 1324Assert.Throws<InvalidOperationException>(() => image.BitsPerPixel); 1325Assert.Throws<InvalidOperationException>(() => image.Pixels[0]);
Scenarios\Api\TestApi.cs (3)
96catch (InvalidOperationException ex) 119catch (InvalidOperationException ex) 263Assert.Throws<InvalidOperationException>(() => idv.Schema[1].Annotations.GetValue(kindFloat, ref retrievedReadOnlyMemoryVBuffer));
Scenarios\GetColumnTests.cs (2)
103catch (InvalidOperationException) { } 110Assert.True(e is ArgumentOutOfRangeException || e is InvalidOperationException);
SvmLightTests.cs (15)
236var ex = Assert.Throws<InvalidOperationException>(() => 350var ex = Assert.Throws<InvalidOperationException>(() => 369ex = Assert.Throws<InvalidOperationException>(() => 388ex = Assert.Throws<InvalidOperationException>(() => 406ex = Assert.Throws<InvalidOperationException>(() => ML.Data.LoadFromSvmLightFile(path)); 443var ex = Assert.Throws<InvalidOperationException>(() => ML.Data.CreateSvmLightLoader()); 445ex = Assert.Throws<InvalidOperationException>(() => ML.Data.CreateSvmLightLoaderWithFeatureNames()); 507var ex = Assert.Throws<InvalidOperationException>(() => 515ex = Assert.Throws<InvalidOperationException>(() => 523ex = Assert.Throws<InvalidOperationException>(() => 531ex = Assert.Throws<InvalidOperationException>(() =>
Transformers\ValueMappingTests.cs (1)
352Assert.Throws<InvalidOperationException>(() => new ValueMappingEstimator<string, int>(Env, lookupMap,
Microsoft.ML.Tokenizers (4)
Model\TiktokenTokenizer.cs (3)
45/// <exception cref="InvalidOperationException">Thrown when failed to load the BPE vocab file.</exception> 60/// <exception cref="InvalidOperationException">Thrown when failed to load the BPE vocab file.</exception> 156/// <exception cref="InvalidOperationException"></exception>
Tokenizer.cs (1)
359/// <exception cref="InvalidOperationException"><paramref name="ids"/> contains invalid data.</exception>
Microsoft.ML.Tokenizers.Tests (1)
TokenizerTests.cs (1)
28Assert.Throws<InvalidOperationException>(() => tokenizer.Decode([26, 27, 28, 29]));
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
Microsoft.VisualBasic.Tests (3)
Microsoft\VisualBasic\Devices\MouseTests.cs (3)
30Assert.Throws<InvalidOperationException>(() => mouse.ButtonsSwapped); 48Assert.Throws<InvalidOperationException>(() => mouse.WheelExists); 69Assert.Throws<InvalidOperationException>(() => mouse.WheelScrollLines);
Microsoft.VisualStudio.LanguageServices (6)
Diagnostics\VisualStudioDiagnosticAnalyzerProvider.cs (1)
102catch (TargetInvocationException ex) when (ex.InnerException is InvalidOperationException)
ExternalAccess\ProjectSystem\Api\IProjectSystemUpdateReferenceOperation.cs (2)
17/// <remarks>Throws <see cref="InvalidOperationException"/> if operation has already been applied.</remarks> 24/// <remarks>Throws <see cref="InvalidOperationException"/> if operation has not been applied.</remarks>
Packaging\PackageInstallerServiceFactory.cs (1)
172catch (Exception ex) when (ex is InvalidDataException or InvalidOperationException)
ProjectSystem\CPS\IWorkspaceProjectContextFactory.cs (1)
32/// <exception cref="InvalidOperationException">A required property or item is not present in <see cref="EvaluationData"/> or has invalid value.</exception>
ProjectSystem\MetadataReferences\VisualStudioFrameworkAssemblyPathResolverFactory.cs (1)
157catch (InvalidOperationException)
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (4)
ProjectSystemShim\CPS\SourceFileHandlingTests.cs (4)
317Assert.Throws<InvalidOperationException>(() => project.ReorderSourceFiles([@"C:\invalid source file", sourceFileFullPath2, sourceFileFullPath3, sourceFileFullPath4, sourceFileFullPath5])); 350Assert.Throws<InvalidOperationException>(() => project.ReorderSourceFiles([@"C:\invalid source file"])); 366Assert.Throws<InvalidOperationException>(() => project.ReorderSourceFiles([@"C:\invalid source file", sourceFileFullPath2, sourceFileFullPath3, sourceFileFullPath4, sourceFileFullPath5])); 390Assert.Throws<InvalidOperationException>(() => project.ReorderSourceFiles([sourceFileFullPath2]));
MSBuild (6)
ExceptionHandling.cs (1)
313|| e is InvalidOperationException
NodeEndpointOutOfProcBase.cs (1)
481catch (InvalidOperationException)
ResourceUtilities.cs (1)
464catch (InvalidOperationException e)
XMake.cs (3)
474catch (InvalidOperationException) // Instance 'WmiApSrv' does not exist in the specified Category. (??) 502catch (InvalidOperationException) 552catch (InvalidOperationException) // Instance 'WmiApSrv' does not exist in the specified Category. (??)
MSBuildTaskHost (3)
ExceptionHandling.cs (1)
313|| e is InvalidOperationException
NodeEndpointOutOfProcBase.cs (1)
481catch (InvalidOperationException)
ResourceUtilities.cs (1)
464catch (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 (53)
MS\Internal\FontCache\FamilyCollection.cs (1)
163catch (InvalidOperationException)
MS\Internal\Ink\InkSerializedFormat\DrawingAttributeSerializer.cs (1)
280catch (InvalidOperationException) // Matrix.Parse failed.
MS\Internal\Ink\InkSerializedFormat\InkSerializer.cs (1)
135catch (InvalidOperationException ex)
MS\Internal\Media3D\GeneralTransform2DTo3DTo2D.cs (1)
270catch (InvalidOperationException)
System\Windows\Duration.cs (1)
390/// <exception cref="InvalidOperationException">Thrown if this Duration represents null.</exception>
System\Windows\FreezableCollection.cs (1)
927/// <exception cref="InvalidOperationException"> raised when changing the collection
System\Windows\GlobalEventManager.cs (1)
430/// <exception cref="InvalidOperationException">Thrown in case the index is bigger than <see cref="int.MaxValue"/>.</exception>
System\Windows\Input\Stylus\Common\StylusPlugInCollection.cs (1)
265catch (System.InvalidOperationException)
System\Windows\Input\Stylus\Wisp\WispLogic.cs (1)
3025InvalidOperationException ioe = new InvalidOperationException();
System\Windows\Input\Stylus\Wisp\WispTabletDeviceCollection.cs (2)
335catch (InvalidOperationException ex) 469catch (InvalidOperationException ex)
System\Windows\InterOp\HwndTarget.cs (1)
60/// thread than it was created will throw a <see cref="System.InvalidOperationException"/>.
System\Windows\LayoutManager.cs (3)
591catch(InvalidOperationException) //this will happen if element is being resurrected after finalization 694catch(InvalidOperationException) //this will happen if element is being resurrected after finalization 748catch(InvalidOperationException) //this will happen if element is being resurrected after finalization
System\Windows\Markup\XmlLanguage.cs (3)
173/// <exception cref="InvalidOperationException"> 213/// <exception cref="InvalidOperationException"> 643catch (InvalidOperationException)
System\Windows\Media\Animation\Generated\BooleanAnimationUsingKeyFrames.cs (1)
272/// <exception cref="InvalidOperationException">Timelines have no way
System\Windows\Media\Animation\Generated\ByteAnimationUsingKeyFrames.cs (1)
272/// <exception cref="InvalidOperationException">Timelines have no way
System\Windows\Media\Animation\Generated\CharAnimationUsingKeyFrames.cs (1)
272/// <exception cref="InvalidOperationException">Timelines have no way
System\Windows\Media\Animation\Generated\ColorAnimationUsingKeyFrames.cs (1)
272/// <exception cref="InvalidOperationException">Timelines have no way
System\Windows\Media\Animation\Generated\DecimalAnimationUsingKeyFrames.cs (1)
272/// <exception cref="InvalidOperationException">Timelines have no way
System\Windows\Media\Animation\Generated\DoubleAnimationUsingKeyFrames.cs (1)
272/// <exception cref="InvalidOperationException">Timelines have no way
System\Windows\Media\Animation\Generated\Int16AnimationUsingKeyFrames.cs (1)
272/// <exception cref="InvalidOperationException">Timelines have no way
System\Windows\Media\Animation\Generated\Int32AnimationUsingKeyFrames.cs (1)
272/// <exception cref="InvalidOperationException">Timelines have no way
System\Windows\Media\Animation\Generated\Int64AnimationUsingKeyFrames.cs (1)
272/// <exception cref="InvalidOperationException">Timelines have no way
System\Windows\Media\Animation\Generated\MatrixAnimationUsingKeyFrames.cs (1)
272/// <exception cref="InvalidOperationException">Timelines have no way
System\Windows\Media\Animation\Generated\ObjectAnimationUsingKeyFrames.cs (1)
272/// <exception cref="InvalidOperationException">Timelines have no way
System\Windows\Media\Animation\Generated\Point3DAnimationUsingKeyFrames.cs (1)
272/// <exception cref="InvalidOperationException">Timelines have no way
System\Windows\Media\Animation\Generated\PointAnimationUsingKeyFrames.cs (1)
272/// <exception cref="InvalidOperationException">Timelines have no way
System\Windows\Media\Animation\Generated\QuaternionAnimationUsingKeyFrames.cs (1)
272/// <exception cref="InvalidOperationException">Timelines have no way
System\Windows\Media\Animation\Generated\RectAnimationUsingKeyFrames.cs (1)
272/// <exception cref="InvalidOperationException">Timelines have no way
System\Windows\Media\Animation\Generated\Rotation3DAnimationUsingKeyFrames.cs (1)
272/// <exception cref="InvalidOperationException">Timelines have no way
System\Windows\Media\Animation\Generated\SingleAnimationUsingKeyFrames.cs (1)
272/// <exception cref="InvalidOperationException">Timelines have no way
System\Windows\Media\Animation\Generated\SizeAnimationUsingKeyFrames.cs (1)
272/// <exception cref="InvalidOperationException">Timelines have no way
System\Windows\Media\Animation\Generated\StringAnimationUsingKeyFrames.cs (1)
272/// <exception cref="InvalidOperationException">Timelines have no way
System\Windows\Media\Animation\Generated\Vector3DAnimationUsingKeyFrames.cs (1)
272/// <exception cref="InvalidOperationException">Timelines have no way
System\Windows\Media\Animation\Generated\VectorAnimationUsingKeyFrames.cs (1)
272/// <exception cref="InvalidOperationException">Timelines have no way
System\Windows\Media\Animation\KeyTime.cs (2)
233/// <exception cref="System.InvalidOperationException"> 254/// <exception cref="System.InvalidOperationException">
System\Windows\Media\Animation\RepeatBehavior.cs (2)
104/// <exception cref="InvalidOperationException">Thrown if this RepeatBehavior does not represent an iteration count.</exception> 120/// <exception cref="InvalidOperationException">Thrown if this RepeatBehavior does not represent a repeat duration.</exception>
System\Windows\Media\Animation\TimelineGroup.cs (1)
198/// <exception cref="InvalidOperationException">Timelines have no way
System\Windows\Media\MediaPlayerState.cs (1)
815catch (InvalidOperationException)
System\Windows\Media\Visual.cs (4)
4299/// <exception cref="InvalidOperationException">If the Visuals are not connected.</exception> 4320/// <exception cref="InvalidOperationException">If the Visuals are not connected.</exception> 4339/// <exception cref="InvalidOperationException">If the Visuals are not connected.</exception> 4356/// <exception cref="InvalidOperationException">If the Visuals are not connected.</exception>
System\Windows\Media3D\Matrix3D.cs (1)
644/// <exception cref="InvalidOperationException">
System\Windows\Media3D\Visual3D.cs (3)
1610/// <exception cref="InvalidOperationException">If the Visual3Ds are not connected.</exception> 1631/// <exception cref="InvalidOperationException">If the Visual3Ds are not connected.</exception> 1772/// <exception cref="InvalidOperationException">If the Visual3D and Visual are not connected.</exception>
PresentationCore.Tests (5)
System\Windows\Media\Animation\KeySplineConverter.Tests.cs (1)
136Assert.Throws<InvalidOperationException>(() => converter.ConvertFrom(null, CultureInfo.InvariantCulture, input));
System\Windows\Media\Animation\RepeatBehavior.Tests.cs (4)
48Assert.Throws<InvalidOperationException>(() => behavior.Duration); 100Assert.Throws<InvalidOperationException>(() => behavior.Count); 108Assert.Throws<InvalidOperationException>(() => behavior.Count); 109Assert.Throws<InvalidOperationException>(() => behavior.Duration);
PresentationFramework (127)
Microsoft\Win32\FileDialog.cs (1)
670/// <exception cref="System.InvalidOperationException">
Microsoft\Win32\OpenFileDialog.cs (2)
60/// <exception cref="System.InvalidOperationException"> 81/// <exception cref="System.InvalidOperationException">
Microsoft\Win32\SaveFileDialog.cs (1)
59/// <exception cref="System.InvalidOperationException">
MS\Internal\AnimatedTypeHelpers.cs (1)
26/// <exception cref="System.InvalidOperationException">
MS\Internal\Annotations\Anchoring\LocatorManager.cs (1)
875/// <exception cref="InvalidOperationException">if a locator set is resolved and the individual selections
MS\Internal\AppModel\INavigator.cs (3)
114///<exception cref="System.InvalidOperationException"> 235///<exception cref="System.InvalidOperationException"> 245///<exception cref="System.InvalidOperationException">
MS\Internal\Controls\InnerItemCollectionView.cs (1)
224/// <exception cref="InvalidOperationException">
MS\Internal\Data\EnumerableCollectionView.cs (1)
566catch (InvalidOperationException)
MS\Internal\Data\IndexedEnumerable.cs (2)
391catch (InvalidOperationException) 416catch (InvalidOperationException)
MS\Internal\Documents\DocumentViewerHelper.cs (1)
252catch (InvalidOperationException)
MS\Internal\Documents\ParentUndoUnit.cs (3)
100/// <exception cref="InvalidOperationException"> 203/// <exception cref="InvalidOperationException"> 248/// <exception cref="InvalidOperationException">
MS\Internal\Documents\UndoManager.cs (7)
178/// <exception cref="InvalidOperationException"> 225/// <exception cref="InvalidOperationException"> 303/// <exception cref="InvalidOperationException"> 394/// <exception cref="InvalidOperationException"> 468/// <exception cref="InvalidOperationException"> 493/// <exception cref="InvalidOperationException"> 558/// <exception cref="InvalidOperationException">
MS\Internal\Text\DynamicPropertyReader.cs (1)
306catch (InvalidOperationException)
MS\Internal\WindowsRuntime\Generated\WinRT\Projections\IEnumerable.cs (1)
375catch (InvalidOperationException)
System\Windows\Annotations\AnnotationHelper.cs (4)
41/// <exception cref="InvalidOperationException">selection is of zero length</exception> 71/// <exception cref="InvalidOperationException">selection is of zero length</exception> 87/// <exception cref="InvalidOperationException">selection is of zero length</exception> 877/// <exception cref="InvalidOperationException">selection is of zero length</exception>
System\Windows\Annotations\AnnotationService.cs (8)
154/// <exception cref="InvalidOperationException">DocumentViewerBase has content which is neither 156/// <exception cref="InvalidOperationException">this service or another service is already 219/// <exception cref="InvalidOperationException">service isn't enabled</exception> 341/// <exception cref="InvalidOperationException">service is not enabled</exception> 381/// <exception cref="InvalidOperationException">service is not enabled</exception> 421/// <exception cref="InvalidOperationException">service is not enabled</exception> 858/// <exception cref="InvalidOperationException">service is not enabled</exception> 1043/// <exception cref="InvalidOperationException">Other Instance of AnnotationService Is Already Set</exception>
System\Windows\Annotations\Storage\XmlStreamStore.cs (5)
114/// <exception cref="InvalidOperationException">if no stream has been set on the store</exception> 160/// <exception cref="InvalidOperationException">if no stream has been set on the store</exception> 225/// <exception cref="InvalidOperationException">the stream is null</exception> 353/// <exception cref="InvalidOperationException">if no stream has been set on the store</exception> 537/// <exception cref="InvalidOperationException">if no stream has been set on the store</exception>
System\Windows\Application.cs (1)
1649/// <exception cref="InvalidOperationException"></exception>
System\Windows\Controls\DataGrid.cs (2)
7106catch (InvalidOperationException invalidOperationException) 7201catch (InvalidOperationException invalidOperationException)
System\Windows\Controls\Frame.cs (5)
842/// <exception cref="InvalidOperationException"> The frame doesn't own a journal. </exception> 915/// <exception cref="InvalidOperationException"> The frame doesn't own a journal. </exception> 916/// <exception cref="InvalidOperationException"> There is no forward journal entry to go to. </exception> 929/// <exception cref="InvalidOperationException"> The frame doesn't own a journal. </exception> 930/// <exception cref="InvalidOperationException"> There is no back journal entry to go to. </exception>
System\Windows\Controls\ItemCollection.cs (6)
218/// <exception cref="InvalidOperationException"> 235/// <exception cref="InvalidOperationException"> 358/// <exception cref="InvalidOperationException"> 376/// <exception cref="InvalidOperationException"> 400/// <exception cref="InvalidOperationException"> 503/// <exception cref="InvalidOperationException">
System\Windows\Controls\RichTextBox.cs (1)
197/// <exception cref="System.InvalidOperationException">
System\Windows\Controls\TextAdaptor.cs (2)
379catch (InvalidOperationException) 420catch (InvalidOperationException)
System\Windows\Controls\TextBlock.cs (1)
375/// <exception cref="System.InvalidOperationException">
System\Windows\Controls\TextSearch.cs (1)
810catch (InvalidOperationException)
System\Windows\Data\BindingExpression.cs (1)
2349catch (InvalidOperationException)
System\Windows\Data\BindingGroup.cs (1)
434/// <exception cref="InvalidOperationException">
System\Windows\Data\CollectionView.cs (2)
1000/// <exception cref="InvalidOperationException"> 1017/// <exception cref="InvalidOperationException">
System\Windows\Data\CollectionViewSource.cs (1)
835catch (InvalidOperationException)
System\Windows\Data\RelativeSource.cs (3)
140/// <exception cref="InvalidOperationException"> RelativeSource Mode is immutable after initialization; 162/// <exception cref="InvalidOperationException"> RelativeSource is not in FindAncestor mode </exception> 201/// <exception cref="InvalidOperationException"> RelativeSource is not in FindAncestor mode </exception>
System\Windows\Documents\DocumentSequenceTextView.cs (9)
64/// <exception cref="System.InvalidOperationException"> 105/// <exception cref="System.InvalidOperationException"> 192/// <exception cref="System.InvalidOperationException"> 240/// <exception cref="System.InvalidOperationException"> 278/// <exception cref="System.InvalidOperationException"> 318/// <exception cref="System.InvalidOperationException"> 344/// <exception cref="System.InvalidOperationException"> 390/// <exception cref="System.InvalidOperationException"> 417/// <exception cref="System.InvalidOperationException">
System\Windows\Documents\FixedDocument.cs (3)
122/// <exception cref="InvalidOperationException">A PageContent cannot be added while previous partial page isn't completely Loaded.</exception> 665if (e is InvalidOperationException || e is ApplicationException) 954if (!(e is System.Net.WebException || e is System.InvalidOperationException))
System\Windows\Documents\FixedTextView.cs (8)
60/// <exception cref="System.InvalidOperationException"> 134/// <exception cref="System.InvalidOperationException"> 320/// <exception cref="System.InvalidOperationException"> 421/// <exception cref="System.InvalidOperationException"> 482/// <exception cref="System.InvalidOperationException"> 550/// <exception cref="System.InvalidOperationException"> 569/// <exception cref="System.InvalidOperationException"> 627/// <exception cref="System.InvalidOperationException">
System\Windows\Documents\ITextView.cs (10)
48/// <exception cref="System.InvalidOperationException"> 72/// <exception cref="System.InvalidOperationException"> 109/// <exception cref="System.InvalidOperationException"> 169/// <exception cref="System.InvalidOperationException"> 215/// <exception cref="System.InvalidOperationException"> 247/// <exception cref="System.InvalidOperationException"> 286/// <exception cref="System.InvalidOperationException"> 312/// <exception cref="System.InvalidOperationException"> 341/// <exception cref="System.InvalidOperationException"> 370/// <exception cref="System.InvalidOperationException">
System\Windows\Documents\PageContent.cs (1)
158/// <exception cref="InvalidOperationException">A child already exists (a PageContent can have at most one child).</exception>
System\Windows\Documents\PageContentCollection.cs (1)
48/// <exception cref="InvalidOperationException">
System\Windows\Documents\Speller.cs (1)
1517catch (InvalidOperationException)
System\Windows\Documents\TextContainer.cs (2)
203/// <exception cref="System.InvalidOperationException"> 244/// <exception cref="System.InvalidOperationException">
System\Windows\Documents\TextPointer.cs (11)
1138/// <exception cref="System.InvalidOperationException"> 1376/// <exception cref="InvalidOperationException"> 1408/// <exception cref="InvalidOperationException"> 1576/// <exception cref="System.InvalidOperationException"> 1844/// <exception cref="System.InvalidOperationException"> 1870/// <exception cref="System.InvalidOperationException"> 1944/// <exception cref="System.InvalidOperationException"> 2010/// <exception cref="System.InvalidOperationException"> 2044/// <exception cref="System.InvalidOperationException"> 2088/// <exception cref="System.InvalidOperationException"> 2176/// <exception cref="InvalidOperationException">
System\Windows\Documents\TextStore.cs (2)
4210catch (InvalidOperationException) 4225catch (InvalidOperationException)
System\Windows\Documents\WinRTSpellerInterop.cs (3)
126catch (InvalidOperationException) 658catch(InvalidOperationException) 711/// <exception cref="InvalidOperationException">
System\Windows\Markup\Primitives\ElementMarkupObject.cs (1)
364catch (InvalidOperationException)
System\Windows\Media\Animation\Generated\ThicknessAnimationUsingKeyFrames.cs (1)
272/// <exception cref="InvalidOperationException">Timelines have no way
System\Windows\Navigation\NavigationService.cs (1)
3034/// <exception cref="System.InvalidOperationException">
System\Windows\Navigation\NavigationWindow.cs (2)
312/// <exception cref="System.InvalidOperationException"> 324/// <exception cref="System.InvalidOperationException">
System\Windows\Standard\Verify.cs (1)
34/// <exception cref="InvalidOperationException">
PresentationFramework.Tests (1)
System\Windows\Controls\VirtualizationCacheLengthConverter.Tests.cs (1)
226Assert.Throws<InvalidOperationException>(() => converter.ConvertFrom(null, CultureInfo.InvariantCulture, input));
PresentationFramework-SystemCore (1)
DynamicAccessorImpl.cs (1)
236typeof(InvalidOperationException).GetConstructor(new Type[] { typeof(string) }),
PresentationUI (5)
MS\Internal\Documents\Application\DocumentStream.cs (3)
485/// <exception cref="System.InvalidOperationException"/> 948/// <exception cref="System.InvalidOperationException"/> 967/// <exception cref="System.InvalidOperationException"/>
MS\Internal\Documents\Application\PackageController.cs (1)
103/// <exception cref="System.InvalidOperationException"/>
MS\Internal\Documents\Application\TransactionalPackage.cs (1)
486/// <exception cref="System.InvalidOperationException" />
Replay (2)
src\Dependencies\Contracts\ExceptionUtilities.cs (2)
17/// Creates an <see cref="InvalidOperationException"/> with information about an unexpected value. 20/// <returns>The <see cref="InvalidOperationException"/>, which should be thrown by the caller.</returns>
Roslyn.Diagnostics.Analyzers (6)
src\Dependencies\Contracts\ExceptionUtilities.cs (2)
17/// Creates an <see cref="InvalidOperationException"/> with information about an unexpected value. 20/// <returns>The <see cref="InvalidOperationException"/>, which should be thrown by the caller.</returns>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\NonReentrantLock.cs (2)
147/// <exception cref="InvalidOperationException">The lock is not currently held by the calling thread.</exception> 171/// <exception cref="InvalidOperationException">The lock is not currently held by the calling thread.</exception>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Diagnostics\DiagnosticSeverityExtensions.cs (1)
18/// <exception cref="InvalidOperationException">
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Diagnostics\ReportDiagnosticExtensions.cs (1)
20/// <exception cref="InvalidOperationException">
Roslyn.VisualStudio.Next.UnitTests (8)
Services\ServiceHubServicesTests_ExtensionMessageHandler.cs (8)
45Assert.Contains(nameof(InvalidOperationException), fatalRpcErrorMessage); 62Assert.Contains(nameof(InvalidOperationException), fatalRpcErrorMessage); 80Assert.Contains(nameof(InvalidOperationException), fatalRpcErrorMessage); 103Assert.Contains(nameof(InvalidOperationException), fatalRpcErrorMessage); 120Assert.Contains(nameof(InvalidOperationException), fatalRpcErrorMessage); 142Assert.Contains(nameof(InvalidOperationException), fatalRpcErrorMessage); 353Assert.Contains(nameof(InvalidOperationException), fatalRpcErrorMessage); 664Assert.Contains(nameof(InvalidOperationException), fatalRpcErrorMessage);
RunTests (1)
ProcessRunner.cs (1)
151catch (InvalidOperationException)
SemanticSearch.BuildTask (2)
src\Dependencies\Contracts\ExceptionUtilities.cs (2)
17/// Creates an <see cref="InvalidOperationException"/> with information about an unexpected value. 20/// <returns>The <see cref="InvalidOperationException"/>, which should be thrown by the caller.</returns>
Shared (5)
Data.Validation\LengthAttribute.cs (1)
92/// <exception cref="InvalidOperationException">The validated type is not supported.</exception>
ServerSentEvents\SseParser_1.cs (2)
111/// <exception cref="InvalidOperationException">The parser has already been enumerated. Such an exception may propagate out of a call to <see cref="IEnumerator.MoveNext"/>.</exception> 190/// <exception cref="InvalidOperationException">The parser has already been enumerated. May propagate out of a call to <see cref="IAsyncEnumerator{T}.MoveNextAsync"/>.</exception>
Throw\Throw.cs (2)
390/// Throws an <see cref="System.InvalidOperationException"/>. 401/// Throws an <see cref="System.InvalidOperationException"/>.
Shared.Tests (17)
Data.Validation\LengthAttributeTests.cs (5)
343Assert.Throws<InvalidOperationException>(() => _ = Validator.TryValidateObject(options0, context, results, true)); 348Assert.Throws<InvalidOperationException>(() => _ = Validator.TryValidateObject(options1, context, results, true)); 353Assert.Throws<InvalidOperationException>(() => _ = Validator.TryValidateObject(options2, context, results, true)); 358Assert.Throws<InvalidOperationException>(() => _ = Validator.TryValidateObject(options3, context, results, true)); 363Assert.Throws<InvalidOperationException>(() => _ = Validator.TryValidateObject(options4, context, results, true));
Data.Validation\TimeSpanAttributeTests.cs (3)
230Assert.Throws<InvalidOperationException>(() => _ = Validator.TryValidateObject(options0, context, results, true)); 235Assert.Throws<InvalidOperationException>(() => _ = Validator.TryValidateObject(options1, context, results, true)); 240Assert.Throws<InvalidOperationException>(() => _ = Validator.TryValidateObject(options3, context, results, true));
EmptyCollections\EmptyReadOnlyListTests.cs (2)
48Assert.Throws<InvalidOperationException>(() => enumerator.Current); 49Assert.Throws<InvalidOperationException>(() => ((IEnumerator)enumerator).Current);
JsonSchemaExporter\JsonSchemaExporterTests.cs (3)
150Assert.Throws<InvalidOperationException>(() => options.GetJsonSchemaAsNode(typeof(int))); 157var ex = Assert.Throws<InvalidOperationException>(() => options.GetJsonSchemaAsNode(typeof(TestTypes.SimplePoco)));
Throw\ThrowTest.cs (4)
20var exception = Assert.Throws<InvalidOperationException>(() => Throw.InvalidOperationException(message)); 31var exception = Assert.Throws<InvalidOperationException>(() => Throw.InvalidOperationException(message, innerException));
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 (3)
System\Collections\Generic\PriorityQueue.cs (3)
227/// <exception cref="InvalidOperationException">The <see cref="PriorityQueue{TElement, TPriority}"/> is empty.</exception> 242/// <exception cref="InvalidOperationException">The queue is empty.</exception> 261/// <exception cref="InvalidOperationException">The queue is empty.</exception>
System.Collections.Concurrent (37)
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\ConcurrentDictionary.cs (1)
238/// <exception cref="InvalidOperationException">This instance's comparer is not compatible with <typeparamref name="TAlternateKey"/>.</exception>
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 (54)
System\Collections\Frozen\FrozenDictionary.AlternateLookup.cs (1)
19/// <exception cref="InvalidOperationException">This instance's comparer is not compatible with <typeparamref name="TAlternateKey"/>.</exception>
System\Collections\Frozen\FrozenSet.AlternateLookup.cs (1)
19/// <exception cref="InvalidOperationException">This instance's comparer is not compatible with <typeparamref name="TAlternate"/>.</exception>
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)
468/// <exception cref="InvalidOperationException"> 498/// <exception cref="InvalidOperationException"> 526/// <exception cref="InvalidOperationException"> 565/// <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)
934/// <exception cref="InvalidOperationException"> 959/// <exception cref="InvalidOperationException"> 993/// <exception cref="InvalidOperationException">
System\Collections\Immutable\ImmutableList_1.cs (3)
64/// <exception cref="InvalidOperationException"> 86/// <exception cref="InvalidOperationException"> 119/// <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)
646/// <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.Configuration.ConfigurationManager (1)
System\Configuration\ExceptionUtil.cs (1)
33internal static InvalidOperationException UnexpectedError(string methodName)
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)
565/// <exception cref="InvalidOperationException">when type implements IDynamicMetaObjectProvider and not IXmlSerializable</exception> 592/// <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)
560/// <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.Data.Odbc (14)
Common\System\Data\Common\AdapterUtil.Odbc.cs (9)
62internal static InvalidOperationException InvalidOperation(string error, Exception? inner) 64InvalidOperationException e = new InvalidOperationException(error, inner); 192internal static InvalidOperationException InvalidDataDirectory() 208internal static InvalidOperationException NoConnectionString() 243internal static InvalidOperationException TransactionConnectionMismatch() 247internal static InvalidOperationException TransactionRequired(string method) 260internal static InvalidOperationException ConnectionRequired(string method) 264internal static InvalidOperationException OpenConnectionRequired(string method, ConnectionState state) 308internal static InvalidOperationException QuotePrefixNotSet(string method)
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\Odbc\Odbc32.cs (1)
79internal static InvalidOperationException NoMappingForSqlTransactionLevel(int value)
System.Diagnostics.Process (3)
System\Diagnostics\Process.cs (2)
835/// <exception cref="InvalidOperationException"> 1524catch (InvalidOperationException)
System\Diagnostics\Process.NonUap.cs (1)
106e is InvalidOperationException || e is Win32Exception;
System.Drawing.Common.Tests (119)
mono\System.Drawing\BitmapTests.cs (4)
114Assert.Throws<InvalidOperationException>(() => bmp.LockBits(r, ImageLockMode.ReadOnly, PixelFormat.Format24bppRgb)); 128Assert.Throws<InvalidOperationException>(() => bmp.SetPixel(0, 0, c)); 137Assert.Throws<InvalidOperationException>(() => bmp.SetPixel(0, 0, c)); 146Assert.Throws<InvalidOperationException>(() => bmp.SetPixel(0, 0, c));
System\Drawing\BitmapTests.cs (6)
908Assert.Throws<InvalidOperationException>(() => bitmap.MakeTransparent(Color.Red)); 932Assert.Throws<InvalidOperationException>(() => bitmap.SetPixel(0, 0, Color.Red)); 1187Assert.Throws<InvalidOperationException>(() => bitmap.LockBits(new Rectangle(0, 0, 1, 1), ImageLockMode.ReadOnly, bitmap.PixelFormat)); 1188Assert.Throws<InvalidOperationException>(() => bitmap.LockBits(new Rectangle(0, 0, 1, 1), ImageLockMode.ReadOnly, bitmap.PixelFormat, new BitmapData())); 1190Assert.Throws<InvalidOperationException>(() => bitmap.LockBits(new Rectangle(1, 1, 1, 1), ImageLockMode.ReadOnly, bitmap.PixelFormat)); 1191Assert.Throws<InvalidOperationException>(() => bitmap.LockBits(new Rectangle(1, 1, 1, 1), ImageLockMode.ReadOnly, bitmap.PixelFormat, new BitmapData()));
System\Drawing\BufferedGraphicsContextTests.cs (4)
166Assert.Throws<InvalidOperationException>(() => context.Allocate(graphics, largeRectangle)); 167Assert.Throws<InvalidOperationException>(() => context.Allocate(graphics, Rectangle.Empty)); 233Assert.Throws<InvalidOperationException>(context.Dispose); 246Assert.Throws<InvalidOperationException>(context.Dispose);
System\Drawing\Drawing2D\MatrixTests.cs (2)
376Assert.Throws<InvalidOperationException>(() => matrix.Multiply(matrix)); 377Assert.Throws<InvalidOperationException>(() => matrix.Multiply(matrix, MatrixOrder.Prepend));
System\Drawing\Graphics_DrawBezierTests.cs (5)
92Assert.Throws<InvalidOperationException>(() => graphics.DrawBezier(pen, 1, 2, 3, 4, 5, 6, 7, 8)); 93Assert.Throws<InvalidOperationException>(() => graphics.DrawBezier(pen, Point.Empty, Point.Empty, Point.Empty, Point.Empty)); 94Assert.Throws<InvalidOperationException>(() => graphics.DrawBezier(pen, PointF.Empty, PointF.Empty, PointF.Empty, PointF.Empty)); 166Assert.Throws<InvalidOperationException>(() => graphics.DrawBeziers(pen, new Point[2])); 167Assert.Throws<InvalidOperationException>(() => graphics.DrawBeziers(pen, new PointF[2]));
System\Drawing\Graphics_DrawLineTests.cs (6)
72Assert.Throws<InvalidOperationException>(() => graphics.DrawLine(pen, Point.Empty, Point.Empty)); 73Assert.Throws<InvalidOperationException>(() => graphics.DrawLine(pen, 0, 0, 0, 0)); 74Assert.Throws<InvalidOperationException>(() => graphics.DrawLine(pen, PointF.Empty, PointF.Empty)); 75Assert.Throws<InvalidOperationException>(() => graphics.DrawLine(pen, 0f, 0f, 0f, 0f)); 149Assert.Throws<InvalidOperationException>(() => graphics.DrawLines(pen, new Point[2])); 150Assert.Throws<InvalidOperationException>(() => graphics.DrawLines(pen, new PointF[2]));
System\Drawing\GraphicsTests.Core.cs (4)
30Assert.Throws<InvalidOperationException>(() => graphics.TransformElements); 31Assert.Throws<InvalidOperationException>(() => graphics.TransformElements = Matrix3x2.Identity); 102Assert.Throws<InvalidOperationException>(() => graphics.DrawRectangle(pen, new RectangleF(0f, 0f, 1f, 1f))); 178Assert.Throws<InvalidOperationException>(() => graphics.FillPie(brush, new RectangleF(0, 0, 1, 1), 0, 90));
System\Drawing\GraphicsTests.cs (80)
63Assert.Throws<InvalidOperationException>(() => graphics.GetHdc()); 351Assert.Throws<InvalidOperationException>(() => graphics.CompositingMode); 352Assert.Throws<InvalidOperationException>(() => graphics.CompositingMode = CompositingMode.SourceCopy); 435Assert.Throws<InvalidOperationException>(() => graphics.CompositingQuality); 436Assert.Throws<InvalidOperationException>(() => graphics.CompositingQuality = CompositingQuality.AssumeLinear); 489Assert.Throws<InvalidOperationException>(() => graphics.DpiX); 515Assert.Throws<InvalidOperationException>(() => graphics.DpiX); 560Assert.Throws<InvalidOperationException>(graphics.Flush); 561Assert.Throws<InvalidOperationException>(() => graphics.Flush(FlushIntention.Sync)); 623Assert.Throws<InvalidOperationException>(() => graphics.InterpolationMode); 624Assert.Throws<InvalidOperationException>(() => graphics.InterpolationMode = InterpolationMode.HighQualityBilinear); 676Assert.Throws<InvalidOperationException>(() => graphics.PageScale); 677Assert.Throws<InvalidOperationException>(() => graphics.PageScale = 10); 737Assert.Throws<InvalidOperationException>(() => graphics.PageUnit); 738Assert.Throws<InvalidOperationException>(() => graphics.PageUnit = GraphicsUnit.Document); 797Assert.Throws<InvalidOperationException>(() => graphics.PixelOffsetMode); 798Assert.Throws<InvalidOperationException>(() => graphics.PixelOffsetMode = PixelOffsetMode.Default); 879Assert.Throws<InvalidOperationException>(() => graphics.RenderingOrigin); 880Assert.Throws<InvalidOperationException>(() => graphics.RenderingOrigin = Point.Empty); 939Assert.Throws<InvalidOperationException>(() => graphics.SmoothingMode); 940Assert.Throws<InvalidOperationException>(() => graphics.SmoothingMode = SmoothingMode.AntiAlias); 989Assert.Throws<InvalidOperationException>(() => graphics.TextContrast); 990Assert.Throws<InvalidOperationException>(() => graphics.TextContrast = 5); 1042Assert.Throws<InvalidOperationException>(() => graphics.TextRenderingHint); 1043Assert.Throws<InvalidOperationException>(() => graphics.TextRenderingHint = TextRenderingHint.SingleBitPerPixelGridFit); 1125Assert.Throws<InvalidOperationException>(() => graphics.Transform); 1126Assert.Throws<InvalidOperationException>(() => graphics.Transform = matrix); 1167Assert.Throws<InvalidOperationException>(graphics.ResetTransform); 1271Assert.Throws<InvalidOperationException>(() => graphics.MultiplyTransform(matrix)); 1272Assert.Throws<InvalidOperationException>(() => graphics.MultiplyTransform(matrix, MatrixOrder.Append)); 1347Assert.Throws<InvalidOperationException>(() => graphics.TranslateTransform(0, 0)); 1348Assert.Throws<InvalidOperationException>(() => graphics.TranslateTransform(0, 0, MatrixOrder.Append)); 1428Assert.Throws<InvalidOperationException>(() => graphics.ScaleTransform(0, 0)); 1429Assert.Throws<InvalidOperationException>(() => graphics.ScaleTransform(0, 0, MatrixOrder.Append)); 1504Assert.Throws<InvalidOperationException>(() => graphics.RotateTransform(0)); 1505Assert.Throws<InvalidOperationException>(() => graphics.RotateTransform(0, MatrixOrder.Append)); 1661Assert.Throws<InvalidOperationException>(() => graphics.CopyFromScreen(0, 0, 0, 0, Size.Empty)); 1662Assert.Throws<InvalidOperationException>(() => graphics.CopyFromScreen(0, 0, 0, 0, Size.Empty, CopyPixelOperation.DestinationInvert)); 1663Assert.Throws<InvalidOperationException>(() => graphics.CopyFromScreen(Point.Empty, Point.Empty, Size.Empty)); 1664Assert.Throws<InvalidOperationException>(() => graphics.CopyFromScreen(Point.Empty, Point.Empty, Size.Empty, CopyPixelOperation.DestinationInvert)); 1895Assert.Throws<InvalidOperationException>(() => graphics.TransformPoints(CoordinateSpace.Page, CoordinateSpace.Page, [Point.Empty])); 1896Assert.Throws<InvalidOperationException>(() => graphics.TransformPoints(CoordinateSpace.Page, CoordinateSpace.Page, [PointF.Empty])); 1938Assert.Throws<InvalidOperationException>(() => graphics.GetNearestColor(Color.Red)); 2014Assert.Throws<InvalidOperationException>(() => graphics.DrawArc(pen, new Rectangle(0, 0, 1, 1), 0, 90)); 2015Assert.Throws<InvalidOperationException>(() => graphics.DrawArc(pen, 0, 0, 1, 1, 0, 90)); 2016Assert.Throws<InvalidOperationException>(() => graphics.DrawArc(pen, new RectangleF(0, 0, 1, 1), 0, 90)); 2017Assert.Throws<InvalidOperationException>(() => graphics.DrawArc(pen, 0f, 0f, 1f, 1f, 0, 90)); 2071Assert.Throws<InvalidOperationException>(() => graphics.DrawRectangle(pen, new Rectangle(0, 0, 1, 1))); 2072Assert.Throws<InvalidOperationException>(() => graphics.DrawRectangle(pen, 0, 0, 1, 1)); 2073Assert.Throws<InvalidOperationException>(() => graphics.DrawRectangle(pen, 0f, 0f, 1f, 1f)); 2144Assert.Throws<InvalidOperationException>(() => graphics.DrawRectangles(pen, new Rectangle[2])); 2145Assert.Throws<InvalidOperationException>(() => graphics.DrawRectangles(pen, new RectangleF[2])); 2199Assert.Throws<InvalidOperationException>(() => graphics.DrawEllipse(pen, new Rectangle(0, 0, 1, 1))); 2200Assert.Throws<InvalidOperationException>(() => graphics.DrawEllipse(pen, 0, 0, 1, 1)); 2201Assert.Throws<InvalidOperationException>(() => graphics.DrawEllipse(pen, new RectangleF(0, 0, 1, 1))); 2202Assert.Throws<InvalidOperationException>(() => graphics.DrawEllipse(pen, 0f, 0f, 1f, 1f)); 2282Assert.Throws<InvalidOperationException>(() => graphics.DrawPie(pen, new Rectangle(0, 0, 1, 1), 0, 90)); 2283Assert.Throws<InvalidOperationException>(() => graphics.DrawPie(pen, 0, 0, 1, 1, 0, 90)); 2284Assert.Throws<InvalidOperationException>(() => graphics.DrawPie(pen, new RectangleF(0, 0, 1, 1), 0, 90)); 2285Assert.Throws<InvalidOperationException>(() => graphics.DrawPie(pen, 0f, 0f, 1f, 1f, 0, 90)); 2359Assert.Throws<InvalidOperationException>(() => graphics.DrawPolygon(pen, new Point[2])); 2360Assert.Throws<InvalidOperationException>(() => graphics.DrawPolygon(pen, new PointF[2])); 2432Assert.Throws<InvalidOperationException>(() => graphics.DrawPath(pen, graphicsPath)); 2540Assert.Throws<InvalidOperationException>(() => graphics.DrawCurve(pen, new Point[2])); 2541Assert.Throws<InvalidOperationException>(() => graphics.DrawCurve(pen, new PointF[2])); 2542Assert.Throws<InvalidOperationException>(() => graphics.DrawCurve(pen, new Point[2], 1)); 2543Assert.Throws<InvalidOperationException>(() => graphics.DrawCurve(pen, new PointF[2], 1)); 2544Assert.Throws<InvalidOperationException>(() => graphics.DrawCurve(pen, new PointF[2], 0, 2)); 2545Assert.Throws<InvalidOperationException>(() => graphics.DrawCurve(pen, new Point[2], 0, 2, 1)); 2546Assert.Throws<InvalidOperationException>(() => graphics.DrawCurve(pen, new PointF[2], 0, 2, 1)); 2632Assert.Throws<InvalidOperationException>(() => graphics.DrawClosedCurve(pen, new Point[3])); 2633Assert.Throws<InvalidOperationException>(() => graphics.DrawClosedCurve(pen, new Point[3], 1, FillMode.Winding)); 2634Assert.Throws<InvalidOperationException>(() => graphics.DrawClosedCurve(pen, new PointF[3])); 2635Assert.Throws<InvalidOperationException>(() => graphics.DrawClosedCurve(pen, new PointF[3], 1, FillMode.Winding)); 2711Assert.Throws<InvalidOperationException>(() => graphics.FillPie(brush, new Rectangle(0, 0, 1, 1), 0, 90)); 2712Assert.Throws<InvalidOperationException>(() => graphics.FillPie(brush, 0, 0, 1, 1, 0, 90)); 2713Assert.Throws<InvalidOperationException>(() => graphics.FillPie(brush, 0f, 0f, 1f, 1f, 0, 90)); 2761Assert.Throws<InvalidOperationException>(() => graphics.Clear(Color.Red)); 2911Assert.Throws<InvalidOperationException>(() => graphics.DrawCachedBitmap(cachedBitmap, 0, 0)); 2936Assert.Throws<InvalidOperationException>(() => graphics2.DrawCachedBitmap(cachedBitmap, 0, 0));
System\Drawing\Imaging\EncoderParameterTests.cs (1)
210Assert.Throws<InvalidOperationException>(() => new EncoderParameter(s_anyEncoder, 1, (EncoderParameterValueType)999, IntPtr.Zero));
System\Drawing\PenTests.cs (2)
600Assert.Throws<InvalidOperationException>(() => pen.DashPattern); 1214Assert.Throws<InvalidOperationException>(() => pen.DashPattern);
System\Drawing\RegionTests.cs (5)
419Assert.Throws<InvalidOperationException>(() => region.Complement(region)); 826Assert.Throws<InvalidOperationException>(() => region.Exclude(region)); 1159Assert.Throws<InvalidOperationException>(() => region.Intersect(region)); 1722Assert.Throws<InvalidOperationException>(() => region.Union(region)); 2080Assert.Throws<InvalidOperationException>(() => region.Xor(region));
System.Formats.Asn1 (14)
System\Formats\Asn1\AsnWriter.cs (11)
107/// <exception cref="InvalidOperationException"> 133/// <exception cref="InvalidOperationException"> 168/// <exception cref="InvalidOperationException"> 191/// <exception cref="InvalidOperationException"> 228/// <exception cref="InvalidOperationException"> 270/// <exception cref="InvalidOperationException"> 307/// <exception cref="InvalidOperationException"> 355/// <exception cref="InvalidOperationException"> 375/// <exception cref="InvalidOperationException"> 523/// <exception cref="InvalidOperationException"> 888/// <exception cref="InvalidOperationException">
System\Formats\Asn1\AsnWriter.OctetString.cs (1)
47/// <exception cref="InvalidOperationException">
System\Formats\Asn1\AsnWriter.Sequence.cs (1)
43/// <exception cref="InvalidOperationException">
System\Formats\Asn1\AsnWriter.SetOf.cs (1)
47/// <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> 34/// <exception cref="InvalidOperationException"><para>Writing a new value exceeds the definite length of the parent data item.</para> 59/// <exception cref="InvalidOperationException"><para>Writing a new value exceeds the definite length of the parent data item.</para> 90/// <exception cref="InvalidOperationException">The written data is not accepted under the current conformance mode.</exception> 101/// <exception cref="InvalidOperationException"><para>Writing a new value exceeds the definite length of the parent data item.</para> 116/// <exception cref="InvalidOperationException"><para>Writing a new value exceeds the definite length of the parent data item.</para> 153/// <exception cref="InvalidOperationException"><para>Writing a new value exceeds the definite length of the parent data item.</para> 184/// <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.Nrbf (3)
System\Formats\Nrbf\ArrayRecord.cs (1)
66/// <exception cref="InvalidOperationException"><paramref name="expectedArrayType" /> does not match the data from the payload.</exception>
System\Formats\Nrbf\ClassRecord.cs (2)
59/// <exception cref="InvalidOperationException">The member with the specified name has a value of a different type.</exception> 116/// <exception cref="InvalidOperationException">The specified member is not a <see cref="SerializationRecord"/>, but just a raw primitive value.</exception>
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> 78/// <exception cref="InvalidOperationException">The entry does not represent a block device or a character device.</exception>
System\Formats\Tar\TarEntry.cs (4)
121/// <exception cref="InvalidOperationException">The entry type is not <see cref="TarEntryType.HardLink"/> or <see cref="TarEntryType.SymbolicLink"/>.</exception> 198/// <exception cref="InvalidOperationException">Attempted to extract a symbolic link, a hard link or an unsupported entry type.</exception> 228/// <exception cref="InvalidOperationException">Attempted to extract an unsupported entry type.</exception> 250/// <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)
179/// <exception cref="InvalidOperationException">This property is not available because the entry has been written to or modified.</exception> 295/// <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)
61/// <exception cref="InvalidOperationException"><para>Cannot perform write operations on a <see cref="BrotliStream" /> constructed with <see cref="CompressionMode.Decompress" />.</para> 111/// <exception cref="System.InvalidOperationException">The write operation cannot be performed because the stream is closed.</exception> 117/// <exception cref="System.InvalidOperationException">The underlying stream is closed or <see langword="null" />.</exception>
System.IO.Packaging (35)
System\IO\Packaging\Package.cs (5)
186/// <exception cref="InvalidOperationException">If a PackagePart with the given partUri already exists in the Package</exception> 209/// <exception cref="InvalidOperationException">If a PackagePart with the given partUri already exists in the Package</exception> 258/// <exception cref="InvalidOperationException">If the requested part does not exists in the Package</exception> 384/// <exception cref="InvalidOperationException">The part name prefix exists.</exception> 684/// <exception cref="InvalidOperationException">If the requested relationship does not exist in the Package</exception>
System\IO\Packaging\PackagePart.cs (30)
132/// <exception cref="InvalidOperationException">If this part has been deleted</exception> 133/// <exception cref="InvalidOperationException">If the parent package has been closed or disposed</exception> 155/// <exception cref="InvalidOperationException">If this part has been deleted</exception> 156/// <exception cref="InvalidOperationException">If the parent package has been closed or disposed</exception> 157/// <exception cref="InvalidOperationException">If the subclass fails to provide a non-null content type value.</exception> 197/// <exception cref="InvalidOperationException">If this part has been deleted</exception> 198/// <exception cref="InvalidOperationException">If the parent package has been closed or disposed</exception> 212/// <exception cref="InvalidOperationException">If this part has been deleted</exception> 213/// <exception cref="InvalidOperationException">If the parent package has been closed or disposed</exception> 262/// <exception cref="InvalidOperationException">If this part has been deleted</exception> 263/// <exception cref="InvalidOperationException">If the parent package has been closed or disposed</exception> 280/// <exception cref="InvalidOperationException">If this part has been deleted</exception> 281/// <exception cref="InvalidOperationException">If the parent package has been closed or disposed</exception> 303/// <exception cref="InvalidOperationException">If this part has been deleted</exception> 304/// <exception cref="InvalidOperationException">If the parent package has been closed or disposed</exception> 368/// <exception cref="InvalidOperationException">If this part has been deleted</exception> 369/// <exception cref="InvalidOperationException">If the parent package has been closed or disposed</exception> 392/// <exception cref="InvalidOperationException">If this part has been deleted</exception> 393/// <exception cref="InvalidOperationException">If the parent package has been closed or disposed</exception> 417/// <exception cref="InvalidOperationException">If this part has been deleted</exception> 418/// <exception cref="InvalidOperationException">If the parent package has been closed or disposed</exception> 441/// <exception cref="InvalidOperationException">If this part has been deleted</exception> 442/// <exception cref="InvalidOperationException">If the parent package has been closed or disposed</exception> 459/// <exception cref="InvalidOperationException">If this part has been deleted</exception> 460/// <exception cref="InvalidOperationException">If the parent package has been closed or disposed</exception> 484/// <exception cref="InvalidOperationException">If this part has been deleted</exception> 485/// <exception cref="InvalidOperationException">If the parent package has been closed or disposed</exception> 489/// <exception cref="InvalidOperationException">If the requested relationship does not exist in the Package</exception> 507/// <exception cref="InvalidOperationException">If this part has been deleted</exception> 508/// <exception cref="InvalidOperationException">If the parent package has been closed or disposed</exception>
System.IO.Pipelines (12)
System\IO\Pipelines\PipeReader.cs (1)
48/// examine at least <paramref name="minimumSize" /> bytes in order to avoid an <see cref="System.InvalidOperationException" />.
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.AsyncEnumerable (32)
System\Linq\AggregateAsync.cs (2)
21/// <exception cref="InvalidOperationException"><paramref name="source"/> contains no elements.</exception> 62/// <exception cref="InvalidOperationException"><paramref name="source"/> contains no elements.</exception>
System\Linq\AverageAsync.cs (10)
19/// <exception cref="InvalidOperationException"><paramref name="source"/> contains no elements (via the returned task).</exception> 54/// <exception cref="InvalidOperationException"><paramref name="source"/> contains no elements (via the returned task).</exception> 88/// <exception cref="InvalidOperationException"><paramref name="source"/> contains no elements (via the returned task).</exception> 121/// <exception cref="InvalidOperationException"><paramref name="source"/> contains no elements (via the returned task).</exception> 154/// <exception cref="InvalidOperationException"><paramref name="source"/> contains no elements (via the returned task).</exception> 188/// <exception cref="InvalidOperationException"><paramref name="source"/> contains no elements (via the returned task).</exception> 220/// <exception cref="InvalidOperationException"><paramref name="source"/> contains no elements (via the returned task).</exception> 251/// <exception cref="InvalidOperationException"><paramref name="source"/> contains no elements (via the returned task).</exception> 282/// <exception cref="InvalidOperationException"><paramref name="source"/> contains no elements (via the returned task).</exception> 313/// <exception cref="InvalidOperationException"><paramref name="source"/> contains no elements (via the returned task).</exception>
System\Linq\FirstAsync.cs (3)
19/// <exception cref="InvalidOperationException">The source sequence is empty (via the returned task).</exception> 51/// <exception cref="InvalidOperationException"> 90/// <exception cref="InvalidOperationException">
System\Linq\LastAsync.cs (3)
18/// <exception cref="InvalidOperationException">The source sequence is empty (via the returned task).</exception> 57/// <exception cref="InvalidOperationException"> 111/// <exception cref="InvalidOperationException">
System\Linq\SingleAsync.cs (14)
21/// <exception cref="InvalidOperationException">The <paramref name="source"/> sequence is empty (via the returned task).</exception> 22/// <exception cref="InvalidOperationException">The <paramref name="source"/> sequence contains more than one element. (via the returned task).</exception> 62/// <exception cref="InvalidOperationException">The <paramref name="source"/> sequence is empty (via the returned task).</exception> 63/// <exception cref="InvalidOperationException">No element satisfies the condition in <paramref name="predicate"/> (via the returned task).</exception> 64/// <exception cref="InvalidOperationException">More than one element satisfies the condition in <paramref name="predicate"/> (via the returned task).</exception> 115/// <exception cref="InvalidOperationException">The <paramref name="source"/> sequence is empty (via the returned task).</exception> 116/// <exception cref="InvalidOperationException">No element satisfies the condition in <paramref name="predicate"/> (via the returned task).</exception> 117/// <exception cref="InvalidOperationException">More than one element satisfies the condition in <paramref name="predicate"/> (via the returned task).</exception> 169/// <exception cref="InvalidOperationException">The <paramref name="source"/> sequence contains more than one element. (via the returned task).</exception> 182/// <exception cref="InvalidOperationException">The input sequence contains more than one element.</exception> 229/// <exception cref="InvalidOperationException">The input sequence contains more than one element.</exception> 251/// <exception cref="InvalidOperationException">The input sequence contains more than one element.</exception> 267/// <exception cref="InvalidOperationException">More than one element satisfies the condition in <paramref name="predicate" />.</exception> 317/// <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)
1978/// <exception cref="InvalidOperationException">The input sequence contains more than one element.</exception> 2011/// <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)
670var e = new InvalidOperationException(SR.net_http_content_no_task_returned);
System\Net\Http\SocketsHttpHandler\Http2Connection.cs (1)
2069catch (Exception e) when (e is IOException || e is ObjectDisposedException || e is InvalidOperationException)
System\Net\Http\SocketsHttpHandler\HttpConnection.cs (1)
923if (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)
311/// <exception cref="InvalidOperationException">Uninitialized <see cref="IPNetwork"/> instance.</exception> 321/// <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.ServerSentEvents (2)
System\Net\ServerSentEvents\SseParser_1.cs (2)
95/// <exception cref="InvalidOperationException">The parser has already been enumerated. Such an exception may propagate out of a call to <see cref="IEnumerator.MoveNext"/>.</exception> 174/// <exception cref="InvalidOperationException">The parser has already been enumerated. Such an exception may propagate out of a call to <see cref="IAsyncEnumerator{T}.MoveNextAsync"/>.</exception>
System.Net.Sockets (8)
System\Net\Sockets\Socket.cs (3)
1291/// <exception cref="InvalidOperationException">The <see cref="Socket"/> object is not in blocking mode and cannot accept this synchronous call.</exception> 1319/// <exception cref="InvalidOperationException">The <see cref="Socket"/> object is not in blocking mode and cannot accept this synchronous call.</exception> 1739/// <exception cref="InvalidOperationException">
System\Net\Sockets\UDPClient.cs (5)
561/// <exception cref="InvalidOperationException">The <see cref="UdpClient"/> has already established a default remote host.</exception> 595/// <exception cref="InvalidOperationException"><see cref="UdpClient"/> has already established a default remote host and <paramref name="endPoint"/> is not <see langword="null"/>.</exception> 887/// <exception cref="InvalidOperationException"><see cref="UdpClient"/> has already established a default remote host and <paramref name="endPoint"/> is not <see langword="null"/>.</exception> 928/// <exception cref="InvalidOperationException">The <see cref="UdpClient"/> has already established a default remote host.</exception> 957/// <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 (111)
src\libraries\System.Private.CoreLib\src\System\Collections\BitArray.cs (1)
1038private InvalidOperationException GetInvalidOperationException(int index)
src\libraries\System.Private.CoreLib\src\System\Collections\Generic\Dictionary.cs (1)
644/// <exception cref="InvalidOperationException">The dictionary's comparer is not compatible with <typeparamref name="TAlternateKey"/>.</exception>
src\libraries\System.Private.CoreLib\src\System\Collections\Generic\HashSet.cs (1)
376/// <exception cref="InvalidOperationException">The set's comparer is not compatible with <typeparamref name="TAlternate"/>.</exception>
src\libraries\System.Private.CoreLib\src\System\Diagnostics\StackTrace.cs (1)
356catch (InvalidOperationException) { }
src\libraries\System.Private.CoreLib\src\System\Enum.cs (4)
303/// <exception cref="InvalidOperationException"> 1393/// <exception cref="InvalidOperationException"><paramref name="format"/> equals "X" or "x", but the enumeration type is unknown.</exception> 1623/// <exception cref="InvalidOperationException"><paramref name="format"/> equals "X" or "x", but the enumeration type is unknown.</exception> 2157private static InvalidOperationException CreateUnknownEnumTypeException() =>
src\libraries\System.Private.CoreLib\src\System\IO\StreamReader.cs (2)
865/// <exception cref="InvalidOperationException">The reader is currently in use by a previous read operation.</exception> 997/// <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)
495/// <exception cref="InvalidOperationException">
src\libraries\System.Private.CoreLib\src\System\MemoryExtensions.cs (4)
4289/// <exception cref="InvalidOperationException"> 4305/// <exception cref="InvalidOperationException"> 4350/// <exception cref="InvalidOperationException"> 4372/// <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\ExceptionServices\ExceptionHandling.cs (1)
21/// <exception cref="InvalidOperationException">If a handler is already set</exception>
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\ComWrappers.cs (2)
1381/// in a <see cref="System.InvalidOperationException"/> being thrown. 1402/// in a <see cref="System.InvalidOperationException"/> being thrown.
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)
343/// <exception cref="InvalidOperationException"> 367/// <exception cref="InvalidOperationException"> 396/// <exception cref="InvalidOperationException"> 429/// <exception cref="InvalidOperationException"> 455/// <exception cref="InvalidOperationException"> 479/// <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)
909/// <exception cref="InvalidOperationException"> 934/// <exception cref="InvalidOperationException"> 994/// <exception cref="InvalidOperationException"> 1019/// <exception cref="InvalidOperationException"> 1573/// <exception cref="InvalidOperationException"> 2483/// <exception cref="InvalidOperationException">The awaiter was not properly initialized.</exception> 2555/// <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 335/// <exception cref="InvalidOperationException"> 392/// <exception cref="InvalidOperationException"> 543/// <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)
192/// <exception cref="InvalidOperationException">This thread was created using a <see cref="ThreadStart"/> delegate instead of a <see cref="ParameterizedThreadStart"/> delegate.</exception> 202/// <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)
216/// <exception cref="InvalidOperationException"> 234/// <exception cref="InvalidOperationException">
src\libraries\System.Private.CoreLib\src\System\Threading\Timer.cs (1)
633var e = new InvalidOperationException(SR.InvalidOperation_TimerAlreadyClosed);
src\libraries\System.Private.CoreLib\src\System\Threading\WaitHandle.cs (1)
497var ex = new InvalidOperationException(SR.InvalidOperation_InvalidHandle);
src\libraries\System.Private.CoreLib\src\System\ThrowHelper.cs (2)
723private static InvalidOperationException GetInvalidOperationException(ExceptionResource resource) 758private static InvalidOperationException GetInvalidOperationException_EnumCurrent(int index)
src\libraries\System.Reflection.Metadata\src\System\Reflection\Metadata\TypeName.cs (6)
145/// <exception cref="InvalidOperationException">The current type is not a nested type.</exception> 369/// <exception cref="InvalidOperationException">This instance is a nested type.</exception> 478/// <exception cref="InvalidOperationException">The current type is not an array, pointer or reference.</exception> 495/// <exception cref="InvalidOperationException">The current type is not a generic type.</exception> 513/// <exception cref="InvalidOperationException">Parsing has exceeded the limit set by <seealso cref="TypeNameParseOptions.MaxNodes"/>.</exception> 553/// <exception cref="InvalidOperationException">The current type is not an array.</exception>
src\System\GC.CoreCLR.cs (3)
702/// <exception cref="InvalidOperationException"><para>The GC is not currently under a no GC region.</para> 964/// <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> 965/// <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)
35/// <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>
System.Private.DataContractSerialization (1)
System\Runtime\Serialization\DataContractSet.cs (1)
375catch (InvalidOperationException)
System.Private.Windows.Core (2)
System\Private\Windows\BinaryFormat\Serializer\Record.cs (1)
83/// <exception cref="InvalidOperationException">
Windows\Win32\System\Com\Lifetime.cs (1)
73/// <exception cref="InvalidOperationException">The handle was freed.</exception>
System.Private.Windows.Core.Tests (3)
System\Private\Windows\Ole\TypeBinderTests.cs (3)
39action.Should().Throw<InvalidOperationException>(); 59action.Should().Throw<InvalidOperationException>(); 102action.Should().Throw<InvalidOperationException>();
System.Private.Windows.GdiPlus (1)
Windows\Win32\Graphics\GdiPlus\GpImageExtensions.cs (1)
36/// <exception cref="InvalidOperationException">The image type isn't supported.</exception>
System.Private.Xml (6)
System\Xml\Serialization\SoapReflectionImporter.cs (1)
137private static InvalidOperationException ReflectionException(string context, Exception e)
System\Xml\Serialization\XmlReflectionImporter.cs (5)
374private static InvalidOperationException CreateReflectionException(string context, Exception e) 379private static InvalidOperationException CreateTypeReflectionException(string context, Exception e) 384private static InvalidOperationException CreateMemberReflectionException(FieldModel model, Exception e) 623private static InvalidOperationException InvalidAttributeUseException(Type type) 628private 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 (86)
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)
385/// <exception cref="InvalidOperationException"><see cref="ControlFlowBuilder"/> is null.</exception> 415/// <exception cref="InvalidOperationException"><see cref="ControlFlowBuilder"/> is null.</exception> 438/// times. Failure to do so will throw <see cref="InvalidOperationException"/>. 472/// <exception cref="InvalidOperationException"><see cref="ControlFlowBuilder"/> is null.</exception>
System\Reflection\Metadata\Ecma335\Encoding\MethodBodyStreamEncoder.cs (2)
133/// <exception cref="InvalidOperationException"> 156/// <exception cref="InvalidOperationException">
System\Reflection\Metadata\Ecma335\MetadataRootBuilder.cs (1)
94/// <exception cref="InvalidOperationException">
System\Reflection\Metadata\MetadataReader.netstandard.cs (1)
108catch (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 (8)
145/// <exception cref="InvalidOperationException">The current type is not a nested type.</exception> 369/// <exception cref="InvalidOperationException">This instance is a nested type.</exception> 478/// <exception cref="InvalidOperationException">The current type is not an array, pointer or reference.</exception> 495/// <exception cref="InvalidOperationException">The current type is not a generic type.</exception> 513/// <exception cref="InvalidOperationException">Parsing has exceeded the limit set by <seealso cref="TypeNameParseOptions.MaxNodes"/>.</exception> 553/// <exception cref="InvalidOperationException">The current type is not an array.</exception> 585/// <exception cref="InvalidOperationException">The current type name is not simple.</exception> 665/// <exception cref="InvalidOperationException">The current type name is not simple.</exception>
System\Reflection\PortableExecutable\PEReader.cs (11)
339/// <exception cref="InvalidOperationException">PE image not available.</exception> 356/// <exception cref="InvalidOperationException">PE image doesn't have metadata.</exception> 378/// <exception cref="InvalidOperationException">PE image not available.</exception> 441/// <exception cref="InvalidOperationException">The entire PE image is not available.</exception> 460/// <exception cref="InvalidOperationException">The PE image doesn't contain metadata (<see cref="HasMetadata"/> returns false).</exception> 478/// <exception cref="InvalidOperationException">PE image not available.</exception> 512/// <exception cref="InvalidOperationException">PE image not available.</exception> 534/// <exception cref="InvalidOperationException">PE image not available.</exception> 603/// <exception cref="InvalidOperationException">PE image not available.</exception> 643/// <exception cref="InvalidOperationException">PE image not available.</exception> 707/// <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)
455/// <see cref="GetMetadataToken(MemberInfo)"/> throws <see cref="InvalidOperationException"/> otherwise. 467catch (InvalidOperationException) 478/// <exception cref="InvalidOperationException">
System.Runtime (1)
artifacts\obj\System.Runtime\Debug\net10.0\System.Runtime.Forwards.cs (1)
286[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.InvalidOperationException))]
System.Runtime.Caching (1)
System\Runtime\Caching\SRef.cs (1)
51catch (InvalidOperationException)
System.Security.Claims (4)
System\Security\Claims\ClaimsIdentity.cs (4)
151/// <exception cref="InvalidOperationException">if 'identity' is a <see cref="ClaimsIdentity"/> and <see cref="ClaimsIdentity.Actor"/> results in a circular reference back to 'this'.</exception> 272/// <exception cref="InvalidOperationException"> 330/// <exception cref="InvalidOperationException">if 'value' results in a circular reference back to 'this'.</exception> 544/// <exception cref="InvalidOperationException">if 'claim' cannot be removed.</exception>
System.Security.Cryptography (17)
System\Security\Cryptography\Shake128.cs (1)
242/// <exception cref="InvalidOperationException">
System\Security\Cryptography\Shake256.cs (1)
242/// <exception cref="InvalidOperationException">
System\Security\Cryptography\X509Certificates\CertificateRequest.cs (9)
365/// <exception cref="InvalidOperationException"> 415/// <exception cref="InvalidOperationException"> 514/// <exception cref="InvalidOperationException"> 562/// <exception cref="InvalidOperationException"> 625/// <exception cref="InvalidOperationException"> 703/// <exception cref="InvalidOperationException"> 761/// <exception cref="InvalidOperationException"> 909/// <exception cref="InvalidOperationException"> 954/// <exception cref="InvalidOperationException">
System\Security\Cryptography\X509Certificates\X500RelativeDistinguishedName.cs (2)
85/// <exception cref="InvalidOperationException"> 111/// <exception cref="InvalidOperationException">
System\Security\Cryptography\X509Certificates\X509Certificate2.cs (4)
746/// <exception cref="InvalidOperationException"> 845/// <exception cref="InvalidOperationException"> 946/// <exception cref="InvalidOperationException"> 1038/// <exception cref="InvalidOperationException">
System.Security.Cryptography.Cose (58)
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)
125/// <exception cref="InvalidOperationException">The value could not be decoded as a 32-bit signed integer.</exception> 135catch (Exception ex) when (ex is CborContentException or InvalidOperationException or OverflowException) 152/// <exception cref="InvalidOperationException">The value could not be decoded as text string.</exception> 162catch (Exception ex) when (ex is CborContentException or InvalidOperationException) 179/// <exception cref="InvalidOperationException">The value could not be decoded as byte string.</exception> 189catch (Exception ex) when (ex is CborContentException or InvalidOperationException) 208/// <exception cref="InvalidOperationException">The value could not be decoded as byte string.</exception> 221catch (Exception ex) when (ex is CborContentException or InvalidOperationException)
System\Security\Cryptography\Cose\CoseMessage.cs (5)
165catch (Exception ex) when (ex is CborContentException or InvalidOperationException) 250catch (Exception ex) when (ex is CborContentException or InvalidOperationException) 592/// <exception cref="InvalidOperationException">The <see cref="ProtectedHeaders"/> and <see cref="UnprotectedHeaders"/> collections have one or more labels in common.</exception> 609/// <exception cref="InvalidOperationException">The <see cref="ProtectedHeaders"/> and <see cref="UnprotectedHeaders"/> collections have one or more labels in common.</exception> 628/// <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)
561/// <exception cref="InvalidOperationException"> 645/// <exception cref="InvalidOperationException">The content is detached from this message, use an overload that accepts a detached content.</exception> 664/// <exception cref="InvalidOperationException">The content is detached from this message, use an overload that accepts a detached content.</exception> 693/// <exception cref="InvalidOperationException">The content is embedded on this message, use an overload that uses embedded content.</exception> 717/// <exception cref="InvalidOperationException">The content is embedded on this message, use an overload that uses embedded content.</exception> 750/// <exception cref="InvalidOperationException">The content is embedded on this message, use an overload that uses embedded content.</exception> 826/// <exception cref="InvalidOperationException">The content is embedded on this message, use an overload that uses embedded content.</exception>
System\Security\Cryptography\Cose\CoseSign1Message.cs (12)
365/// <exception cref="InvalidOperationException">The content is detached from this message, use an overload that accepts a detached content.</exception> 408/// <exception cref="InvalidOperationException">The content is detached from this message, use an overload that accepts a detached content.</exception> 451/// <exception cref="InvalidOperationException">The content is detached from this message, use an overload that accepts a detached content.</exception> 492/// <exception cref="InvalidOperationException">The content is embedded on this message, use an overload that uses embedded content.</exception> 537/// <exception cref="InvalidOperationException">The content is embedded on this message, use an overload that uses embedded content.</exception> 574/// <exception cref="InvalidOperationException">The content is embedded on this message, use an overload that uses embedded content.</exception> 617/// <exception cref="InvalidOperationException">The content is embedded on this message, use an overload that uses embedded content.</exception> 666/// <exception cref="InvalidOperationException">The content is embedded on this message, use an overload that uses embedded content.</exception> 728/// <exception cref="InvalidOperationException">The content is embedded on this message, use an overload that uses embedded content.</exception> 833/// <exception cref="InvalidOperationException">The content is embedded on this message, use an overload that uses embedded content.</exception> 896/// <exception cref="InvalidOperationException">The content is embedded on this message, use an overload that uses embedded content.</exception> 1000/// <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 (11)
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> 163/// <exception cref="InvalidOperationException">The content is detached from the associated message, use an overload that accepts a detached content.</exception> 207/// <exception cref="InvalidOperationException">The content is embedded on the associated message, use an overload that uses embedded content.</exception> 253/// <exception cref="InvalidOperationException">The content is embedded on the associated message, use an overload that uses embedded content.</exception> 290/// <exception cref="InvalidOperationException">The content is embedded on the associated message, use an overload that uses embedded content.</exception> 334/// <exception cref="InvalidOperationException">The content is embedded on the associated message, use an overload that uses embedded content.</exception> 383/// <exception cref="InvalidOperationException">The content is embedded on the associated message, use an overload that uses embedded content.</exception> 447/// <exception cref="InvalidOperationException">The content is embedded on the associated message, use an overload that uses embedded content.</exception> 507/// <exception cref="InvalidOperationException">The content is embedded on the associated message, use an overload that uses embedded content.</exception> 571/// <exception cref="InvalidOperationException">The content is embedded on the associated message, use an overload that uses embedded content.</exception>
System.ServiceModel.Http.Tests (2)
ServiceModel\HttpIdentityTests.cs (2)
20Assert.Throws<InvalidOperationException>(() => channel.Echo("")); 32Assert.Throws<InvalidOperationException>(() => channel.Echo(""));
System.ServiceModel.Primitives.Tests (38)
Channels\BinaryMessageEncodingBindingElementTest.cs (1)
75Assert.Throws<InvalidOperationException>(() => bindingElement.MessageVersion = version);
Channels\CommunicationObjectTest.cs (8)
316InvalidOperationException actualException = Assert.Throws<InvalidOperationException>(() => 343InvalidOperationException actualException = Assert.Throws<InvalidOperationException>(() => 368InvalidOperationException actualException = Assert.Throws<InvalidOperationException>(() => 399InvalidOperationException actualException = Assert.Throws<InvalidOperationException>(() =>
Channels\CustomChannelTest.cs (12)
245InvalidOperationException actualException = Assert.Throws<InvalidOperationException>(() => 299InvalidOperationException actualException = Assert.Throws<InvalidOperationException>(() => 449InvalidOperationException thrownException = new InvalidOperationException("test threw this"); 467InvalidOperationException caughtException = 468Assert.Throws<InvalidOperationException>(() => factory.CreateChannel()); 623Assert.Throws<InvalidOperationException>(() => ((IClientChannel)channel).Open()); 676Assert.Throws<InvalidOperationException>(() => ((IClientChannel)channel).DisplayInitializationUI()); 696InvalidOperationException thrownException = new InvalidOperationException("ui initialization failed"); 721InvalidOperationException caughtException = 722Assert.Throws<InvalidOperationException>(() => channel.Process(inputMessage));
Description\OperationContractAttributeTest.cs (4)
30var exception = Assert.Throws<InvalidOperationException>(() => 43var exception = Assert.Throws<InvalidOperationException>(() =>
ServiceModel\ClientBaseTest.cs (6)
46Assert.Throws<InvalidOperationException>(() => MyClientBase.CacheSetting = CacheSetting.AlwaysOn); 67Assert.Throws<InvalidOperationException>(() => MyClientBase.CacheSetting = CacheSetting.AlwaysOn); 96Assert.Throws<InvalidOperationException>(() => MyClientBase2.CacheSetting = CacheSetting.Default); 132Assert.Throws<InvalidOperationException>(() => MyClientBase2.CacheSetting = CacheSetting.Default); 152Assert.Throws<InvalidOperationException>(() => MyClientBase.CacheSetting = CacheSetting.AlwaysOn); 173Assert.Throws<InvalidOperationException>(() => MyClientBase.CacheSetting = CacheSetting.AlwaysOn);
ServiceModel\DeliveryRequirementsTest.cs (3)
29Assert.Throws<InvalidOperationException>(() => factory.Open()); 59Assert.Throws<InvalidOperationException>(() => factory.Open()); 68Assert.Throws<InvalidOperationException>(() => factory.Open());
ServiceModel\DuplexChannelFactoryTest.cs (4)
28Assert.Throws<InvalidOperationException>(() => 103var exception = Assert.Throws<InvalidOperationException>(() => 133Assert.Throws<InvalidOperationException>(() =>
System.ServiceModel.Syndication (1)
System\ServiceModel\XmlBuffer.cs (1)
109private static InvalidOperationException CreateInvalidStateException() => new InvalidOperationException(SR.XmlBufferInInvalidState);
System.Text.Json (295)
System\Text\Json\Document\JsonDocument.cs (1)
98/// <exception cref="InvalidOperationException">
System\Text\Json\Document\JsonElement.cs (47)
53/// <exception cref="InvalidOperationException"> 76/// <exception cref="InvalidOperationException"> 93/// <exception cref="InvalidOperationException"> 121/// <exception cref="InvalidOperationException"> 164/// <exception cref="InvalidOperationException"> 203/// <exception cref="InvalidOperationException"> 243/// <exception cref="InvalidOperationException"> 281/// <exception cref="InvalidOperationException"> 317/// <exception cref="InvalidOperationException"> 337/// <exception cref="InvalidOperationException"> 369/// <exception cref="InvalidOperationException"> 394/// <exception cref="InvalidOperationException"> 414/// <exception cref="InvalidOperationException"> 445/// <exception cref="InvalidOperationException"> 463/// <exception cref="InvalidOperationException"> 494/// <exception cref="InvalidOperationException"> 514/// <exception cref="InvalidOperationException"> 544/// <exception cref="InvalidOperationException"> 561/// <exception cref="InvalidOperationException"> 591/// <exception cref="InvalidOperationException"> 612/// <exception cref="InvalidOperationException"> 643/// <exception cref="InvalidOperationException"> 660/// <exception cref="InvalidOperationException"> 690/// <exception cref="InvalidOperationException"> 711/// <exception cref="InvalidOperationException"> 742/// <exception cref="InvalidOperationException"> 762/// <exception cref="InvalidOperationException"> 792/// <exception cref="InvalidOperationException"> 813/// <exception cref="InvalidOperationException"> 853/// <exception cref="InvalidOperationException"> 881/// <exception cref="InvalidOperationException"> 920/// <exception cref="InvalidOperationException"> 948/// <exception cref="InvalidOperationException"> 978/// <exception cref="InvalidOperationException"> 999/// <exception cref="InvalidOperationException"> 1030/// <exception cref="InvalidOperationException"> 1050/// <exception cref="InvalidOperationException"> 1081/// <exception cref="InvalidOperationException"> 1101/// <exception cref="InvalidOperationException"> 1132/// <exception cref="InvalidOperationException"> 1152/// <exception cref="InvalidOperationException"> 1431/// <exception cref="InvalidOperationException"> 1458/// <exception cref="InvalidOperationException"> 1489/// <exception cref="InvalidOperationException"> 1539/// <exception cref="InvalidOperationException"> 1567/// <exception cref="InvalidOperationException"> 1593/// <exception cref="InvalidOperationException">
System\Text\Json\Document\JsonProperty.cs (4)
39/// <exception cref="InvalidOperationException"> 59/// <exception cref="InvalidOperationException"> 79/// <exception cref="InvalidOperationException"> 109/// <exception cref="InvalidOperationException">
System\Text\Json\Nodes\JsonArray.cs (1)
190/// <exception cref="InvalidOperationException">
System\Text\Json\Nodes\JsonNode.cs (8)
60/// <exception cref="InvalidOperationException"> 81/// <exception cref="InvalidOperationException"> 102/// <exception cref="InvalidOperationException"> 195/// <exception cref="InvalidOperationException"> 209/// <exception cref="InvalidOperationException"> 235/// <exception cref="InvalidOperationException"> 268/// <exception cref="InvalidOperationException"> 286/// <exception cref="InvalidOperationException">
System\Text\Json\Nodes\JsonObject.IList.cs (2)
23/// <exception cref="InvalidOperationException"><paramref name="value"/> already has a parent.</exception> 39/// <exception cref="InvalidOperationException"><paramref name="value"/> already has a parent.</exception>
System\Text\Json\Reader\Utf8JsonReader.cs (4)
295/// <exception cref="InvalidOperationException"> 438/// <exception cref="InvalidOperationException"> 468/// <exception cref="InvalidOperationException"> 509/// <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"> 1275/// <exception cref="InvalidOperationException"> 1321/// <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)
70case InvalidOperationException when ex.Source == ThrowHelper.ExceptionSourceValueToRethrowAsJsonException:
System\Text\Json\Serialization\JsonConverterOfT.WriteCore.cs (1)
29case InvalidOperationException when ex.Source == ThrowHelper.ExceptionSourceValueToRethrowAsJsonException:
System\Text\Json\Serialization\JsonSerializer.Read.Document.cs (1)
151/// <exception cref="InvalidOperationException">
System\Text\Json\Serialization\JsonSerializer.Read.Element.cs (1)
135/// <exception cref="InvalidOperationException">
System\Text\Json\Serialization\JsonSerializer.Read.Node.cs (1)
126/// <exception cref="InvalidOperationException">
System\Text\Json\Serialization\JsonSerializer.Read.Span.cs (1)
123/// <exception cref="InvalidOperationException">
System\Text\Json\Serialization\JsonSerializer.Read.Stream.cs (2)
294/// <exception cref="InvalidOperationException"> 332/// <exception cref="InvalidOperationException">
System\Text\Json\Serialization\JsonSerializer.Read.String.cs (2)
320/// <exception cref="InvalidOperationException"> 365/// <exception cref="InvalidOperationException">
System\Text\Json\Serialization\JsonSerializer.Read.Utf8JsonReader.cs (1)
235/// <exception cref="InvalidOperationException">
System\Text\Json\Serialization\JsonSerializer.Write.ByteArray.cs (1)
116/// <exception cref="InvalidOperationException">
System\Text\Json\Serialization\JsonSerializer.Write.Document.cs (1)
107/// <exception cref="InvalidOperationException">
System\Text\Json\Serialization\JsonSerializer.Write.Element.cs (1)
107/// <exception cref="InvalidOperationException">
System\Text\Json\Serialization\JsonSerializer.Write.Node.cs (1)
108/// <exception cref="InvalidOperationException">
System\Text\Json\Serialization\JsonSerializer.Write.String.cs (1)
126/// <exception cref="InvalidOperationException">
System\Text\Json\Serialization\JsonSerializer.Write.Utf8JsonWriter.cs (1)
128/// <exception cref="InvalidOperationException">
System\Text\Json\Serialization\JsonSerializerOptions.Converters.cs (1)
32/// <exception cref="InvalidOperationException">
System\Text\Json\Serialization\JsonSerializerOptions.cs (21)
226/// <exception cref="InvalidOperationException"> 274/// <exception cref="InvalidOperationException"> 301/// <exception cref="InvalidOperationException"> 325/// <exception cref="InvalidOperationException"> 388/// <exception cref="InvalidOperationException"> 420/// <exception cref="InvalidOperationException"> 451/// <exception cref="InvalidOperationException"> 504/// <exception cref="InvalidOperationException"> 528/// <exception cref="InvalidOperationException"> 548/// <exception cref="InvalidOperationException"> 567/// <exception cref="InvalidOperationException"> 638/// <exception cref="InvalidOperationException"> 697/// <exception cref="InvalidOperationException"> 718/// <exception cref="InvalidOperationException"> 740/// <exception cref="InvalidOperationException"> 781/// <exception cref="InvalidOperationException"> 801/// <exception cref="InvalidOperationException"> 830/// <exception cref="InvalidOperationException"> 853/// <exception cref="InvalidOperationException"> 911/// <exception cref="InvalidOperationException">The instance does not specify a <see cref="TypeInfoResolver"/> setting.</exception> 927/// <exception cref="InvalidOperationException">
System\Text\Json\Serialization\Metadata\DefaultJsonTypeInfoResolver.Helpers.cs (1)
247catch (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 (12)
39/// <exception cref="InvalidOperationException"> 63/// <exception cref="InvalidOperationException"> 82/// <exception cref="InvalidOperationException"> 109/// <exception cref="InvalidOperationException"> 154/// <exception cref="InvalidOperationException"> 231/// <exception cref="InvalidOperationException"> 267/// <exception cref="InvalidOperationException"> 306/// <exception cref="InvalidOperationException"> 338/// <exception cref="InvalidOperationException"> 779/// <exception cref="InvalidOperationException"> 826/// <exception cref="InvalidOperationException"> 1037/// <exception cref="InvalidOperationException">
System\Text\Json\Serialization\Metadata\JsonTypeInfo.cs (12)
79/// <exception cref="InvalidOperationException"> 110/// <exception cref="InvalidOperationException"> 140/// <exception cref="InvalidOperationException"> 170/// <exception cref="InvalidOperationException"> 206/// <exception cref="InvalidOperationException"> 295/// <exception cref="InvalidOperationException"> 490/// <exception cref="InvalidOperationException"> 522/// <exception cref="InvalidOperationException"> 566/// <exception cref="InvalidOperationException"> 604/// <exception cref="InvalidOperationException"> 636/// <exception cref="InvalidOperationException"> 983/// <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)
98public static InvalidOperationException GetInvalidOperationException_CallFlushFirst(int _buffered) 224private static InvalidOperationException GetInvalidOperationException(string message) 235private static InvalidOperationException GetInvalidOperationException(int currentDepth) 263public static InvalidOperationException GetInvalidOperationException_ExpectedArray(JsonTokenType tokenType) 268public static InvalidOperationException GetInvalidOperationException_ExpectedObject(JsonTokenType tokenType) 335private static InvalidOperationException GetInvalidOperationException(string message, JsonTokenType tokenType) 340private static InvalidOperationException GetInvalidOperationException(JsonTokenType tokenType) 353internal static InvalidOperationException GetJsonElementWrongTypeException( 361internal static InvalidOperationException GetJsonElementWrongTypeException( 575public static InvalidOperationException GetInvalidOperationException_ReadInvalidUTF8(DecoderFallbackException? innerException = null) 585public static InvalidOperationException GetInvalidOperationException(string message, Exception? innerException) 587InvalidOperationException ex = new InvalidOperationException(message, innerException); 593public static InvalidOperationException GetInvalidOperationException(ExceptionResource resource, int currentDepth, int maxDepth, byte token, JsonTokenType tokenType) 596InvalidOperationException 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)
25/// an <see cref="InvalidOperationException"/> with a context specific error message. 546/// <exception cref="InvalidOperationException"> 559/// <exception cref="InvalidOperationException"> 696/// <exception cref="InvalidOperationException"> 710/// <exception cref="InvalidOperationException"> 742/// <exception cref="InvalidOperationException"> 767/// <exception cref="InvalidOperationException"> 848/// <exception cref="InvalidOperationException"> 871/// <exception cref="InvalidOperationException"> 891/// <exception cref="InvalidOperationException"> 916/// <exception cref="InvalidOperationException"> 987/// <exception cref="InvalidOperationException"> 999/// <exception cref="InvalidOperationException">
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.Bytes.cs (4)
17/// <exception cref="InvalidOperationException"> 42/// <exception cref="InvalidOperationException"> 62/// <exception cref="InvalidOperationException"> 86/// <exception cref="InvalidOperationException">
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.DateTime.cs (4)
17/// <exception cref="InvalidOperationException"> 46/// <exception cref="InvalidOperationException"> 67/// <exception cref="InvalidOperationException"> 92/// <exception cref="InvalidOperationException">
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.DateTimeOffset.cs (4)
17/// <exception cref="InvalidOperationException"> 45/// <exception cref="InvalidOperationException"> 66/// <exception cref="InvalidOperationException"> 91/// <exception cref="InvalidOperationException">
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.Decimal.cs (4)
17/// <exception cref="InvalidOperationException"> 45/// <exception cref="InvalidOperationException"> 66/// <exception cref="InvalidOperationException"> 91/// <exception cref="InvalidOperationException">
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.Double.cs (4)
17/// <exception cref="InvalidOperationException"> 47/// <exception cref="InvalidOperationException"> 68/// <exception cref="InvalidOperationException"> 94/// <exception cref="InvalidOperationException">
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.Float.cs (4)
17/// <exception cref="InvalidOperationException"> 47/// <exception cref="InvalidOperationException"> 68/// <exception cref="InvalidOperationException"> 94/// <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"> 66/// <exception cref="InvalidOperationException"> 91/// <exception cref="InvalidOperationException">
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.Literal.cs (8)
17/// <exception cref="InvalidOperationException"> 68/// <exception cref="InvalidOperationException"> 87/// <exception cref="InvalidOperationException"> 112/// <exception cref="InvalidOperationException"> 135/// <exception cref="InvalidOperationException"> 163/// <exception cref="InvalidOperationException"> 183/// <exception cref="InvalidOperationException"> 209/// <exception cref="InvalidOperationException">
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.SignedNumber.cs (8)
17/// <exception cref="InvalidOperationException"> 45/// <exception cref="InvalidOperationException"> 66/// <exception cref="InvalidOperationException"> 91/// <exception cref="InvalidOperationException"> 113/// <exception cref="InvalidOperationException"> 133/// <exception cref="InvalidOperationException"> 154/// <exception cref="InvalidOperationException"> 171/// <exception cref="InvalidOperationException">
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.String.cs (20)
16/// <exception cref="InvalidOperationException"> 64/// <exception cref="InvalidOperationException"> 83/// <exception cref="InvalidOperationException"> 232/// <exception cref="InvalidOperationException"> 420/// <exception cref="InvalidOperationException"> 447/// <exception cref="InvalidOperationException"> 470/// <exception cref="InvalidOperationException"> 504/// <exception cref="InvalidOperationException"> 528/// <exception cref="InvalidOperationException"> 552/// <exception cref="InvalidOperationException"> 584/// <exception cref="InvalidOperationException"> 627/// <exception cref="InvalidOperationException"> 647/// <exception cref="InvalidOperationException"> 671/// <exception cref="InvalidOperationException"> 714/// <exception cref="InvalidOperationException"> 734/// <exception cref="InvalidOperationException"> 758/// <exception cref="InvalidOperationException"> 798/// <exception cref="InvalidOperationException"> 830/// <exception cref="InvalidOperationException"> 870/// <exception cref="InvalidOperationException">
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.UnsignedNumber.cs (8)
17/// <exception cref="InvalidOperationException"> 46/// <exception cref="InvalidOperationException"> 68/// <exception cref="InvalidOperationException"> 94/// <exception cref="InvalidOperationException"> 117/// <exception cref="InvalidOperationException"> 138/// <exception cref="InvalidOperationException"> 160/// <exception cref="InvalidOperationException"> 179/// <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.StringSegment.cs (3)
20/// <exception cref="InvalidOperationException"> 188/// <exception cref="InvalidOperationException"> 355/// <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)
104/// then <see cref="MoveNext"/> returns <see langword="false"/> and <see cref="Current"/> throws an <see cref="InvalidOperationException"/>. 160/// <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)
861/// <exception cref="System.InvalidOperationException">No item could be received from the source.</exception> 875/// <exception cref="System.InvalidOperationException">No item could be received from the source.</exception> 896/// <exception cref="System.InvalidOperationException">No item could be received from the source.</exception> 918/// <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"> 274/// <exception cref="System.InvalidOperationException">Break() called after Stop().</exception>
System.Windows.Controls.Ribbon (2)
Microsoft\Windows\Controls\Ribbon\RibbonHelper.cs (1)
2535catch (InvalidOperationException)
Microsoft\Windows\Controls\TextSearchInternal.cs (1)
863catch (InvalidOperationException)
System.Windows.Forms (83)
System\Windows\Forms\ActiveX\AxHost.cs (2)
3564catch (InvalidOperationException) 3588catch (InvalidOperationException)
System\Windows\Forms\Application.cs (1)
1346/// <exception cref="InvalidOperationException">
System\Windows\Forms\Control.cs (3)
4869/// <exception cref="InvalidOperationException"> 12748catch (InvalidOperationException) 12772catch (InvalidOperationException)
System\Windows\Forms\Control_InvokeAsync.cs (2)
144/// <exception cref="InvalidOperationException">Thrown if the control's handle is not yet created.</exception> 208/// <exception cref="InvalidOperationException">Thrown if the control's handle is not yet created.</exception>
System\Windows\Forms\Controls\DateTimePicker\DateTimePicker.cs (1)
1459catch (InvalidOperationException) { } // If the destination thread does not exist, don't send.
System\Windows\Forms\Controls\ListView\ListView.ListViewItemCollection.IInnerList.cs (1)
38catch (InvalidOperationException)
System\Windows\Forms\Controls\MonthCalendar\MonthCalendar.cs (1)
2023catch (InvalidOperationException)
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyDescriptorGridEntry.cs (1)
882catch (InvalidOperationException ex)
System\Windows\Forms\Dialogs\TaskDialog\TaskDialog.cs (7)
324/// <exception cref="InvalidOperationException"> 357/// <exception cref="InvalidOperationException"> 391/// <exception cref="InvalidOperationException"> 456/// <exception cref="InvalidOperationException"> 488/// <exception cref="InvalidOperationException"> 522/// <exception cref="InvalidOperationException"> 1602catch (Exception ex) when (ex is InvalidOperationException or Win32Exception)
System\Windows\Forms\Dialogs\TaskDialog\TaskDialogButton.cs (5)
179/// <exception cref="InvalidOperationException"> 211/// <exception cref="InvalidOperationException"> 244/// <exception cref="InvalidOperationException"> 273/// <exception cref="InvalidOperationException"> 333/// <exception cref="InvalidOperationException">
System\Windows\Forms\Dialogs\TaskDialog\TaskDialogButtonCollection.cs (5)
34/// <exception cref="InvalidOperationException"> 52/// <exception cref="InvalidOperationException"> 92/// <exception cref="InvalidOperationException"> 116/// <exception cref="InvalidOperationException"> 132/// <exception cref="InvalidOperationException">
System\Windows\Forms\Dialogs\TaskDialog\TaskDialogCommandLinkButton.cs (1)
47/// <exception cref="InvalidOperationException">
System\Windows\Forms\Dialogs\TaskDialog\TaskDialogExpander.cs (5)
64/// <exception cref="InvalidOperationException"> 107/// <exception cref="InvalidOperationException"> 130/// <exception cref="InvalidOperationException"> 152/// <exception cref="InvalidOperationException"> 180/// <exception cref="InvalidOperationException">
System\Windows\Forms\Dialogs\TaskDialog\TaskDialogFootnote.cs (2)
51/// <exception cref="InvalidOperationException"> 96/// <exception cref="InvalidOperationException">
System\Windows\Forms\Dialogs\TaskDialog\TaskDialogIcon.cs (1)
176/// <exception cref="InvalidOperationException">
System\Windows\Forms\Dialogs\TaskDialog\TaskDialogPage.cs (15)
122/// <exception cref="InvalidOperationException"> 153/// <exception cref="InvalidOperationException"> 178/// <exception cref="InvalidOperationException"> 203/// <exception cref="InvalidOperationException"> 228/// <exception cref="InvalidOperationException"> 253/// <exception cref="InvalidOperationException"> 277/// <exception cref="InvalidOperationException"> 307/// <exception cref="InvalidOperationException"> 343/// <exception cref="InvalidOperationException"> 379/// <exception cref="InvalidOperationException"> 440/// <exception cref="InvalidOperationException"> 465/// <exception cref="InvalidOperationException"> 488/// <exception cref="InvalidOperationException"> 505/// <exception cref="InvalidOperationException"> 608/// <exception cref="InvalidOperationException">
System\Windows\Forms\Dialogs\TaskDialog\TaskDialogProgressBar.cs (5)
58/// <exception cref="InvalidOperationException"> 121/// <exception cref="InvalidOperationException"> 167/// <exception cref="InvalidOperationException"> 213/// <exception cref="InvalidOperationException"> 271/// <exception cref="InvalidOperationException">
System\Windows\Forms\Dialogs\TaskDialog\TaskDialogRadioButton.cs (3)
53/// <exception cref="InvalidOperationException"> 83/// <exception cref="InvalidOperationException"> 111/// <exception cref="InvalidOperationException">
System\Windows\Forms\Dialogs\TaskDialog\TaskDialogRadioButtonCollection.cs (5)
30/// <exception cref="InvalidOperationException"> 51/// <exception cref="InvalidOperationException"> 91/// <exception cref="InvalidOperationException"> 115/// <exception cref="InvalidOperationException"> 131/// <exception cref="InvalidOperationException">
System\Windows\Forms\Dialogs\TaskDialog\TaskDialogVerificationCheckBox.cs (2)
55/// <exception cref="InvalidOperationException"> 82/// <exception cref="InvalidOperationException">
System\Windows\Forms\Form.cs (12)
5433/// <exception cref="InvalidOperationException"> 5458/// If the operating system is in a non-interactive mode, this method will throw an <see cref="InvalidOperationException"/>. 5548/// If the operating system is in a non-interactive mode, this method will throw an <see cref="InvalidOperationException"/>. 5551/// If the form is already displayed asynchronously, an <see cref="InvalidOperationException"/> will be thrown. 5554/// An <see cref="InvalidOperationException"/> will also occur if no 5562/// <exception cref="InvalidOperationException"> 5831/// an <see cref="InvalidOperationException"/> will be thrown. 5834/// An <see cref="InvalidOperationException"/> will also occur if no 5845/// <exception cref="InvalidOperationException"> 5872/// an <see cref="InvalidOperationException"/> will be thrown. 5875/// An <see cref="InvalidOperationException"/> will also occur if no 5886/// <exception cref="InvalidOperationException">
System\Windows\Forms\WindowSubclassHandler.cs (3)
84/// <exception cref="InvalidOperationException"><see cref="Open"/> was already called.</exception> 128/// <exception cref="InvalidOperationException"> 168/// <exception cref="InvalidOperationException">
System.Windows.Forms.Design (28)
System\ComponentModel\Design\ComponentDesigner.cs (1)
343catch (InvalidOperationException)
System\ComponentModel\Design\DesignSurface.cs (1)
120/// a root designer: <see cref="InvalidOperationException"/>.
System\ComponentModel\Design\Serialization\CodeDomDesignerLoader.cs (2)
217if (_documentCompileUnit.UserData[typeof(InvalidOperationException)] is InvalidOperationException invalidOperation)
System\Windows\Forms\Design\ChangeToolStripParentVerb.cs (1)
100if (e is InvalidOperationException)
System\Windows\Forms\Design\ControlDesigner.cs (1)
2504InvalidOperationException wrapper = new(
System\Windows\Forms\Design\DataGridViewAddColumnDialog.cs (2)
131catch (InvalidOperationException ex) 555catch (InvalidOperationException)
System\Windows\Forms\Design\DataGridViewColumnCollectionDialog.cs (1)
278catch (InvalidOperationException ex)
System\Windows\Forms\Design\DataGridViewDesigner.cs (1)
457catch (InvalidOperationException)
System\Windows\Forms\Design\DesignBindingPicker.cs (2)
1287catch (InvalidOperationException ex) 1442catch (InvalidOperationException ex)
System\Windows\Forms\Design\ListViewDesigner.cs (2)
145catch (InvalidOperationException ex) 186private static void ShowErrorDialog(IUIService uiService, InvalidOperationException ex, Control control)
System\Windows\Forms\Design\OleDragDropHandler.cs (1)
222if (ex is InvalidOperationException)
System\Windows\Forms\Design\SelectionUIHandler.cs (1)
538catch (InvalidOperationException)
System\Windows\Forms\Design\SplitContainerDesigner.cs (1)
324catch (InvalidOperationException ex)
System\Windows\Forms\Design\StandardMenuStripVerb.cs (2)
222if (e is InvalidOperationException) 365if (e is InvalidOperationException)
System\Windows\Forms\Design\TableLayoutPanelDesigner.cs (5)
1701catch (InvalidOperationException ex) 1778catch (InvalidOperationException ex) 1940catch (InvalidOperationException ex) 2035catch (InvalidOperationException ex) 2054catch (InvalidOperationException ex)
System\Windows\Forms\Design\ToolStripDesigner.cs (1)
2474catch (InvalidOperationException ex)
System\Windows\Forms\Design\ToolStripItemCustomMenuItemCollection.cs (2)
243catch (InvalidOperationException ex) 611catch (InvalidOperationException ex)
System\Windows\Forms\Design\ToolStripMenuItemDesigner.cs (1)
814catch (InvalidOperationException ex)
System.Windows.Forms.Design.Tests (95)
ButtonBaseDesignerTests.cs (1)
42action.Should().Throw<InvalidOperationException>();
ControlDesignerTests.cs (5)
43action1.Should().Throw<InvalidOperationException>(); 44action2.Should().Throw<InvalidOperationException>(); 45action3.Should().Throw<InvalidOperationException>(); 158action.Should().Throw<InvalidOperationException>(); 256action.Should().Throw<InvalidOperationException>();
System\ComponentModel\Design\ArrayEditorTests.cs (1)
44Assert.Throws<InvalidOperationException>(() => editor.CollectionItemType);
System\ComponentModel\Design\CollectionFormTests.cs (1)
728InvalidOperationException exception = new();
System\ComponentModel\Design\ComponentDesignerTests.cs (16)
24Assert.Throws<InvalidOperationException>(() => designer.Component); 28Assert.Throws<InvalidOperationException>(() => designer.ParentComponent); 554Assert.Throws<InvalidOperationException>(() => designer.Component); 559Assert.Throws<InvalidOperationException>(() => designer.Component); 611Assert.Throws<InvalidOperationException>(() => designer.Component); 615Assert.Throws<InvalidOperationException>(() => designer.Component); 623Assert.Throws<InvalidOperationException>(() => designer.Component); 627Assert.Throws<InvalidOperationException>(() => designer.Component); 648Assert.Throws<InvalidOperationException>(() => designer.Component); 661Assert.Throws<InvalidOperationException>(() => designer.Component); 696Assert.Throws<InvalidOperationException>(() => designer.Component); 707Assert.Throws<InvalidOperationException>(() => designer.Component); 721Assert.Throws<InvalidOperationException>(() => designer.Component); 725Assert.Throws<InvalidOperationException>(() => designer.Component); 2016Assert.Throws<InvalidOperationException>(() => designer.Component); 2377Assert.Throws<InvalidOperationException>(() => designer.PreFilterProperties(properties));
System\ComponentModel\Design\DesignerActionMethodItemTests.cs (2)
210Assert.Throws<InvalidOperationException>(item.Invoke); 222Assert.Throws<InvalidOperationException>(item.Invoke);
System\ComponentModel\Design\DesignerHostTests.cs (13)
1454Assert.Throws<InvalidOperationException>(() => component1.Site.Name = "name2"); 1455Assert.Throws<InvalidOperationException>(() => component1.Site.Name = "NAME2"); 1670Assert.Throws<InvalidOperationException>(() => host.Container.Add(component)); 1671Assert.Throws<InvalidOperationException>(() => host.Container.Add(new RootDesignerComponent(), host.RootComponentClassName)); 1680Assert.Throws<InvalidOperationException>(() => host.Container.Add(component)); 1681Assert.Throws<InvalidOperationException>(() => host.Container.Add(component, "name")); 1802Assert.Throws<InvalidOperationException>(disposable.Dispose); 1814Assert.Throws<InvalidOperationException>(surface.Dispose); 1829Assert.Throws<InvalidOperationException>(surface.Dispose); 1842Assert.Throws<InvalidOperationException>(surface.Dispose); 1854Assert.Throws<InvalidOperationException>(surface.Dispose); 2071Assert.Throws<InvalidOperationException>(transaction1.Cancel); 2184Assert.Throws<InvalidOperationException>(transaction1.Commit);
System\ComponentModel\Design\DesignSurfaceTests.cs (16)
34Assert.Throws<InvalidOperationException>(() => surface.View); 73Assert.Throws<InvalidOperationException>(() => surface.View); 293Assert.Throws<InvalidOperationException>(() => container.RemoveService(serviceType)); 353InvalidOperationException exception = new(); 361Assert.Same(exception, Assert.Throws<InvalidOperationException>(() => surface.View).InnerException); 383Assert.Throws<InvalidOperationException>(() => surface.View); 427Assert.Throws<InvalidOperationException>(() => surface.View); 434InvalidOperationException exception = new(); 472Exception error = Assert.IsType<InvalidOperationException>(Assert.Single(surface.LoadErrors)); 480InvalidOperationException exception = new(); 962Assert.Throws<InvalidOperationException>(() => surface.BeginLoad(typeof(RootDesignerComponent))); 963Assert.Throws<InvalidOperationException>(() => surface.BeginLoad(otherMockLoader.Object)); 1195Assert.Throws<InvalidOperationException>(surface.Dispose); 1216Assert.Throws<InvalidOperationException>(surface.Dispose); 1297Assert.Throws<InvalidOperationException>(() => surface.Dispose(true)); 1335Assert.Throws<InvalidOperationException>(() => surface.Dispose(true));
System\ComponentModel\Design\Serialization\CodeDomComponentSerializationServiceTests.cs (8)
908Assert.Throws<InvalidOperationException>(() => service.Serialize(mockStore.Object, new object())); 917Assert.Throws<InvalidOperationException>(() => service.Serialize(store, new object())); 1116Assert.Throws<InvalidOperationException>(() => service.SerializeAbsolute(mockStore.Object, new object())); 1125Assert.Throws<InvalidOperationException>(() => service.SerializeAbsolute(store, new object())); 1394Assert.Throws<InvalidOperationException>(() => service.SerializeMember(mockStore.Object, new DataClass(), member)); 1404Assert.Throws<InvalidOperationException>(() => service.SerializeMember(store, new DataClass(), member)); 1673Assert.Throws<InvalidOperationException>(() => service.SerializeMemberAbsolute(mockStore.Object, new DataClass(), member)); 1683Assert.Throws<InvalidOperationException>(() => service.SerializeMemberAbsolute(store, new DataClass(), member));
System\ComponentModel\Design\Serialization\DesignerSerializationManagerTests.cs (19)
106Assert.Throws<InvalidOperationException>(() => manager.Container = null); 130Assert.Throws<InvalidOperationException>(() => iManager.Context); 138Assert.Throws<InvalidOperationException>(() => iManager.Context); 159Assert.Throws<InvalidOperationException>(() => manager.Errors); 166Assert.Throws<InvalidOperationException>(() => manager.Errors); 194Assert.Throws<InvalidOperationException>(() => manager.PreserveNames = value); 349Assert.Throws<InvalidOperationException>(() => manager.RecycleInstances = value); 378Assert.Throws<InvalidOperationException>(() => manager.ValidateRecycledTypes = value); 389Assert.Throws<InvalidOperationException>(() => iManager.ResolveName += handler); 401Assert.Throws<InvalidOperationException>(() => iManager.SerializationComplete += handler); 464Assert.Throws<InvalidOperationException>(() => iManager.Context); 468Assert.Throws<InvalidOperationException>(() => iManager.Context); 473Assert.Throws<InvalidOperationException>(() => iManager.Context); 709Assert.Throws<InvalidOperationException>(manager.CreateSession); 870Assert.Throws<InvalidOperationException>(() => iManager.GetInstance(name)); 968Assert.Throws<InvalidOperationException>(() => iManager.GetName("value")); 1633Assert.Throws<InvalidOperationException>(() => iManager.GetType(typeName)); 1909Assert.Throws<InvalidOperationException>(() => iManager.ReportError(null)); 1981Assert.Throws<InvalidOperationException>(() => iManager.SetName(null, null));
System\ComponentModel\Design\SiteNestedContainerTests.cs (4)
587Assert.Throws<InvalidOperationException>(() => container.Add(component)); 588Assert.Throws<InvalidOperationException>(() => container.Add(new RootDesignerComponent(), host.RootComponentClassName)); 598Assert.Throws<InvalidOperationException>(() => container.Add(component)); 599Assert.Throws<InvalidOperationException>(() => container.Add(component, "name"));
System\Drawing\Design\ToolboxItemTests.cs (8)
593Assert.Throws<InvalidOperationException>(() => item.CreateComponents(mockDesignerHost.Object)); 597Assert.Throws<InvalidOperationException>(() => item.CreateComponents(mockDesignerHost.Object, null)); 601Assert.Throws<InvalidOperationException>(() => item.CreateComponents(mockDesignerHost.Object, new Hashtable())); 609Assert.Throws<InvalidOperationException>(() => item.CreateComponents(mockDesignerHost.Object)); 916Assert.Throws<InvalidOperationException>(() => item.CreateComponentsCore(mockDesignerHost.Object, null)); 920Assert.Throws<InvalidOperationException>(() => item.CreateComponentsCore(mockDesignerHost.Object, new Hashtable())); 978Assert.Throws<InvalidOperationException>(item.CheckUnlocked); 1446Assert.Throws<InvalidOperationException>(() => item.Initialize(type));
System\Windows\Forms\Design\SelectionUIHandlerTests.cs (1)
107_changedServiceMock.Setup(cs => cs.OnComponentChanging(It.IsAny<object>(), It.IsAny<PropertyDescriptor>())).Throws<InvalidOperationException>();
System.Windows.Forms.Primitives (5)
System\Drawing\ImageExtensions.cs (1)
16/// <exception cref="InvalidOperationException">Thrown if <paramref name="type"/> is not a known type.</exception>
System\ServiceExtensions.cs (1)
28/// <exception cref="InvalidOperationException"/>
System\Windows\Forms\SinglyLinkedList.cs (2)
134/// <exception cref="InvalidOperationException"> 180/// <exception cref="InvalidOperationException">
Windows\Win32\UI\Shell\FolderBrowserHelper.cs (1)
15/// <exception cref="InvalidOperationException">Could not get the root folder.</exception>
System.Windows.Forms.Primitives.Tests (4)
System\Windows\Forms\SinglyLinkedListTests.cs (4)
110Assert.Throws<InvalidOperationException>(enumerator.MoveCurrentToFront); 113Assert.Throws<InvalidOperationException>(enumerator.MoveCurrentToFront); 158Assert.Throws<InvalidOperationException>(enumerator.RemoveCurrent); 161Assert.Throws<InvalidOperationException>(enumerator.RemoveCurrent);
System.Windows.Forms.Primitives.TestUtilities.Tests (1)
Metafiles\Validators\RepeatValidatorTests.cs (1)
36Assert.Throws<InvalidOperationException>(() => repeatValidator.Validate(ref emfRecord, state: null!, out bool complete));
System.Windows.Forms.Tests (342)
ExceptionHandlingTests.cs (1)
21Assert.Throws<InvalidOperationException>(() => action());
MaskedTextBoxTests.cs (1)
817act.Should().Throw<InvalidOperationException>();
System\Windows\Forms\AccessibleObjects\Control.ControlAccessibleObjectTests.cs (1)
1062Assert.Throws<InvalidOperationException>(() => accessibleObject.RaiseLiveRegionChanged());
System\Windows\Forms\AccessibleObjects\DataGridViewButtonCellAccessibleObjectTests.cs (2)
58Assert.Throws<InvalidOperationException>(() 69Assert.Throws<InvalidOperationException>(accessibleObject.DoDefaultAction);
System\Windows\Forms\AccessibleObjects\DataGridViewCellAccessibleObjectTests.cs (12)
131Assert.Throws<InvalidOperationException>(() => accessibleObject.Bounds); 170Assert.Throws<InvalidOperationException>(() => accessibleObject.DefaultAction); 287Assert.Throws<InvalidOperationException>(() => accessibleObject.Name); 308Assert.Throws<InvalidOperationException>(() => accessibleObject.Owner = owner); 332Assert.Throws<InvalidOperationException>(() => accessibleObject.Parent); 339Assert.Throws<InvalidOperationException>(() => accessibleObject.State); 367Assert.Throws<InvalidOperationException>(() => accessibleObject.Value); 374Assert.Throws<InvalidOperationException>(accessibleObject.DoDefaultAction); 381Assert.Throws<InvalidOperationException>(() => accessibleObject.GetChild(-1)); 397Assert.Throws<InvalidOperationException>(() => accessibleObject.GetChildCount()); 446Assert.Throws<InvalidOperationException>(() => accessibleObject.Navigate(AccessibleNavigation.Right)); 463Assert.Throws<InvalidOperationException>(() => accessibleObject.Select(AccessibleSelection.None));
System\Windows\Forms\AccessibleObjects\DataGridViewCheckBoxCellAccessibleObjectTests.cs (4)
107Assert.Throws<InvalidOperationException>(() 180Assert.Throws<InvalidOperationException>(() 195Assert.Throws<InvalidOperationException>(() 205Assert.Throws<InvalidOperationException>(cell.AccessibilityObject.DoDefaultAction);
System\Windows\Forms\AccessibleObjects\DataGridViewColumnHeaderCellAccessibleObjectTests.cs (1)
23Assert.Throws<InvalidOperationException>(() => new DataGridViewColumnHeaderCellAccessibleObject(null).Parent);
System\Windows\Forms\AccessibleObjects\DataGridViewImageCellAccessibleObjectTests.cs (1)
93Assert.Throws<InvalidOperationException>(() =>
System\Windows\Forms\AccessibleObjects\DataGridViewLinkCellAccessibleObjectTests.cs (2)
58Assert.Throws<InvalidOperationException>(() => 68Assert.Throws<InvalidOperationException>(cell.AccessibilityObject.DoDefaultAction);
System\Windows\Forms\AccessibleObjects\DataGridViewRowAccessibleObjectTests.cs (12)
65Assert.Throws<InvalidOperationException>(() => accessibleObject.Bounds); 163Assert.Throws<InvalidOperationException>(() => accessibleObject.Name); 182Assert.Throws<InvalidOperationException>(() => accessibleObject.Owner = owner); 201Assert.Throws<InvalidOperationException>(() => accessibleObject.Parent); 220Assert.Throws<InvalidOperationException>(() => accessibleObject.State); 239Assert.Throws<InvalidOperationException>(() => accessibleObject.Value); 253Assert.Throws<InvalidOperationException>(() => accessibleObject.GetChild(0)); 280Assert.Throws<InvalidOperationException>(() => accessibleObject.GetChildCount()); 296Assert.Throws<InvalidOperationException>(accessibleObject.GetFocused); 327Assert.Throws<InvalidOperationException>(accessibleObject.GetSelected); 349Assert.Throws<InvalidOperationException>(() => accessibleObject.Navigate(AccessibleNavigation.Right)); 387Assert.Throws<InvalidOperationException>(() => accessibleObject.Select(AccessibleSelection.None));
System\Windows\Forms\AccessibleObjects\DataGridViewRowHeaderCellAccessibleObjectTests.cs (1)
23Assert.Throws<InvalidOperationException>(() => new DataGridViewRowHeaderCellAccessibleObject(null).Parent);
System\Windows\Forms\AccessibleObjects\DataGridViewTopLeftHeaderCellAccessibleObjectTests.cs (5)
22Assert.Throws<InvalidOperationException>(() => 87action.Should().Throw<InvalidOperationException>().WithMessage(SR.DataGridViewCellAccessibleObject_OwnerNotSet); 96action.Should().Throw<InvalidOperationException>().WithMessage(SR.DataGridViewCellAccessibleObject_OwnerNotSet); 173action.Should().Throw<InvalidOperationException>().WithMessage(SR.DataGridViewCellAccessibleObject_OwnerNotSet); 195action.Should().Throw<InvalidOperationException>().WithMessage(SR.DataGridViewCellAccessibleObject_OwnerNotSet);
System\Windows\Forms\AccessibleObjects\ListViewItem.ListViewItemAccessibleObjectTests.cs (2)
1762Assert.Throws<InvalidOperationException>(() => accessibleObject.GetChild(0)); 1795Assert.Throws<InvalidOperationException>(() => accessibleObject.GetChildCount());
System\Windows\Forms\AccessibleObjects\ListViewItem.ListViewItemListAccessibleObjectTests.cs (1)
23Assert.Throws<InvalidOperationException>(() => new ListViewItemListAccessibleObject(new ListViewItem()));
System\Windows\Forms\AccessibleObjects\ListViewItem.ListViewItemTileAccessibleObjectTests.cs (1)
21Assert.Throws<InvalidOperationException>(() => new ListViewItemTileAccessibleObject(new ListViewItem()));
System\Windows\Forms\ApplicationTests.cs (1)
253Assert.Throws<InvalidOperationException>(() => Application.SetDefaultFont(SystemFonts.CaptionFont));
System\Windows\Forms\AutoCompleteStringCollectionTests.cs (12)
277Assert.Throws<InvalidOperationException>(() => enumerator.Current); 280Assert.Throws<InvalidOperationException>(() => enumerator.Current); 284Assert.Throws<InvalidOperationException>(() => enumerator.Current); 299Assert.Throws<InvalidOperationException>(() => enumerator.Current); 305Assert.Throws<InvalidOperationException>(() => enumerator.Current); 309Assert.Throws<InvalidOperationException>(() => enumerator.Current); 324Assert.Throws<InvalidOperationException>(() => enumerator.Current); 327Assert.Throws<InvalidOperationException>(() => enumerator.Current); 331Assert.Throws<InvalidOperationException>(() => enumerator.Current); 347Assert.Throws<InvalidOperationException>(() => enumerator.Current); 353Assert.Throws<InvalidOperationException>(() => enumerator.Current); 357Assert.Throws<InvalidOperationException>(() => enumerator.Current);
System\Windows\Forms\ColumnHeaderTests.cs (2)
500Assert.Throws<InvalidOperationException>(() => header.ImageIndex = 0); 714Assert.Throws<InvalidOperationException>(() => header.ImageKey = "Key");
System\Windows\Forms\Combobox.ObjectCollectionTests.cs (6)
1396Assert.Throws<InvalidOperationException>(() => enumerator.Current); 1399Assert.Throws<InvalidOperationException>(() => enumerator.Current); 1403Assert.Throws<InvalidOperationException>(() => enumerator.Current); 1431Assert.Throws<InvalidOperationException>(() => enumerator.Current); 1437Assert.Throws<InvalidOperationException>(() => enumerator.Current); 1441Assert.Throws<InvalidOperationException>(() => enumerator.Current);
System\Windows\Forms\ControlTests.Methods.cs (3)
774Assert.Throws<InvalidOperationException>(control.CreateHandle); 4134Assert.Throws<InvalidOperationException>(() => control.Invoke(method)); 4135Assert.Throws<InvalidOperationException>(() => control.Invoke(method, Array.Empty<object>()));
System\Windows\Forms\ControlTests.Properties.cs (1)
293Assert.Throws<InvalidOperationException>(() => control.AllowDrop = true);
System\Windows\Forms\CursorConverterTests.cs (2)
150Assert.Throws<InvalidOperationException>(() => converter.ConvertTo(new Cursor(Cursors.AppStarting.Handle), typeof(byte[]))); 157Assert.Throws<InvalidOperationException>(() => converter.ConvertTo(new Cursor(2), typeof(byte[])));
System\Windows\Forms\DataGridViewButtonColumnTests.cs (2)
62action.Should().Throw<InvalidOperationException>(); 105action.Should().Throw<InvalidOperationException>();
System\Windows\Forms\DataGridViewCellPaintingEventArgsTests.cs (6)
111Assert.Throws<InvalidOperationException>(() => e.Paint(new Rectangle(1, 2, 3, 4), DataGridViewPaintParts.None)); 124Assert.Throws<InvalidOperationException>(() => e.Paint(new Rectangle(1, 2, 3, 4), DataGridViewPaintParts.None)); 161Assert.Throws<InvalidOperationException>(() => e.PaintBackground(new Rectangle(1, 2, 3, 4), true)); 174Assert.Throws<InvalidOperationException>(() => e.PaintBackground(new Rectangle(1, 2, 3, 4), true)); 211Assert.Throws<InvalidOperationException>(() => e.PaintContent(new Rectangle(1, 2, 3, 4))); 224Assert.Throws<InvalidOperationException>(() => e.PaintContent(new Rectangle(1, 2, 3, 4)));
System\Windows\Forms\DataGridViewCellTests.cs (26)
698Assert.Throws<InvalidOperationException>(() => cell.ErrorIconBounds); 707Assert.Throws<InvalidOperationException>(() => cell.ErrorIconBounds); 716Assert.Throws<InvalidOperationException>(() => cell.ErrorIconBounds); 1512Assert.Throws<InvalidOperationException>(() => cell.InheritedStyle); 1521Assert.Throws<InvalidOperationException>(() => cell.InheritedStyle); 1530Assert.Throws<InvalidOperationException>(() => cell.InheritedStyle); 1576Assert.Throws<InvalidOperationException>(() => cell.IsInEditMode); 1662Assert.Throws<InvalidOperationException>(() => cell.ReadOnly = true); 1770Assert.Throws<InvalidOperationException>(() => cell.ReadOnly = true); 1773Assert.Throws<InvalidOperationException>(() => cell.ReadOnly = false); 1969Assert.Throws<InvalidOperationException>(() => cell.ReadOnly = value); 2114Assert.Throws<InvalidOperationException>(() => cell.Selected = true); 2128Assert.Throws<InvalidOperationException>(() => cell.Selected = true); 2143Assert.Throws<InvalidOperationException>(() => cell.Selected = value); 2191Assert.Throws<InvalidOperationException>(() => cell.Selected = value); 3469Assert.Throws<InvalidOperationException>(cell.DetachEditingControl); 3483Assert.Throws<InvalidOperationException>(cell.DetachEditingControl); 4701Assert.Throws<InvalidOperationException>(() => cell.GetInheritedStyle(new DataGridViewCellStyle(), -1, true)); 4708Assert.Throws<InvalidOperationException>(() => cell.GetInheritedStyle(new DataGridViewCellStyle(), -1, true)); 4717Assert.Throws<InvalidOperationException>(() => cell.GetInheritedStyle(new DataGridViewCellStyle(), -1, true)); 4726Assert.Throws<InvalidOperationException>(() => cell.GetInheritedStyle(new DataGridViewCellStyle(), -1, true)); 4921Assert.Throws<InvalidOperationException>(() => cell.GetSize(-1)); 4935Assert.Throws<InvalidOperationException>(() => cell.GetSize(-1)); 5212Assert.Throws<InvalidOperationException>(() => cell.InitializeEditingControl(-1, null, null)); 6231Assert.Throws<InvalidOperationException>(() => cell.PositionEditingControl(true, true, new Rectangle(1, 2, 3, 4), new Rectangle(1, 2, 3, 4), new DataGridViewCellStyle(), true, true, true, true)); 6238Assert.Throws<InvalidOperationException>(() => cell.PositionEditingPanel(new Rectangle(1, 2, 3, 4), new Rectangle(1, 2, 3, 4), new DataGridViewCellStyle(), true, true, true, true));
System\Windows\Forms\DataGridViewColumnCollectionTests.cs (15)
344Assert.Throws<InvalidOperationException>(() => collection.Add(null)); 345Assert.Throws<InvalidOperationException>(() => collection.Add(column)); 366Assert.Throws<InvalidOperationException>(() => collection.Add(null)); 367Assert.Throws<InvalidOperationException>(() => collection.Add(column)); 385Assert.Throws<InvalidOperationException>(() => collection.Add(column1)); 386Assert.Throws<InvalidOperationException>(() => collection.Add(column2)); 403Assert.Throws<InvalidOperationException>(() => collection.Add(column)); 425Assert.Throws<InvalidOperationException>(iSupportInitialize.EndInit); 444Assert.Throws<InvalidOperationException>(() => control.Columns.Add(column)); 462Assert.Throws<InvalidOperationException>(() => control.Columns.Add(column)); 475Assert.Throws<InvalidOperationException>(() => control.Columns.Add(column2)); 488Assert.Throws<InvalidOperationException>(() => control.Columns.Add(column2)); 534Assert.Throws<InvalidOperationException>(() => control.Columns.Add(column3)); 542Assert.Throws<InvalidOperationException>(() => control.Columns.Add(column)); 553Assert.Throws<InvalidOperationException>(() => control.Columns.Add(column));
System\Windows\Forms\DataGridViewColumnTests.cs (4)
270Assert.Throws<InvalidOperationException>(() => column.AutoSizeMode = DataGridViewAutoSizeColumnMode.ColumnHeader); 309Assert.Throws<InvalidOperationException>(() => column.AutoSizeMode = DataGridViewAutoSizeColumnMode.NotSet); 325Assert.Throws<InvalidOperationException>(() => column.AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill); 362Assert.Throws<InvalidOperationException>(() => column.AutoSizeMode = DataGridViewAutoSizeColumnMode.NotSet);
System\Windows\Forms\DataGridViewComboBoxCell.ObjectCollectionTests.cs (1)
118action.Should().Throw<InvalidOperationException>();
System\Windows\Forms\DataGridViewHeaderCellTests.cs (23)
256Assert.Throws<InvalidOperationException>(() => cell.Displayed); 435Assert.Throws<InvalidOperationException>(() => cell.Displayed); 542Assert.Throws<InvalidOperationException>(() => cell.Frozen); 723Assert.Throws<InvalidOperationException>(() => cell.ReadOnly = value); 735Assert.Throws<InvalidOperationException>(() => cell.ReadOnly = value); 746Assert.Throws<InvalidOperationException>(() => cell.ReadOnly = value); 757Assert.Throws<InvalidOperationException>(() => cell.ReadOnly = value); 773Assert.Throws<InvalidOperationException>(() => cell.ReadOnly = value); 793Assert.Throws<InvalidOperationException>(() => cell.ReadOnly = value); 812Assert.Throws<InvalidOperationException>(() => cell.ReadOnly = value); 826Assert.Throws<InvalidOperationException>(() => cell.ReadOnly = value); 843Assert.Throws<InvalidOperationException>(() => cell.ReadOnly = value); 1061Assert.Throws<InvalidOperationException>(() => cell.Resizable); 1208Assert.Throws<InvalidOperationException>(() => cell.Selected = value); 1220Assert.Throws<InvalidOperationException>(() => cell.Selected = value); 1232Assert.Throws<InvalidOperationException>(() => cell.Selected = value); 1244Assert.Throws<InvalidOperationException>(() => cell.Selected = value); 1261Assert.Throws<InvalidOperationException>(() => cell.Selected = value); 1281Assert.Throws<InvalidOperationException>(() => cell.Selected = value); 1300Assert.Throws<InvalidOperationException>(() => cell.Selected = value); 1315Assert.Throws<InvalidOperationException>(() => cell.Selected = value); 1333Assert.Throws<InvalidOperationException>(() => cell.Selected = value); 2013Assert.Throws<InvalidOperationException>(() => cell.Visible);
System\Windows\Forms\DataGridViewImageColumnTests.cs (2)
31action.Should().Throw<InvalidOperationException>(); 39action.Should().Throw<InvalidOperationException>();
System\Windows\Forms\DataGridViewLinkCellTests.cs (2)
288((Action)(() => _cell.GetErrorIconBounds(0))).Should().Throw<InvalidOperationException>(); 304((Action)(() => _cell.GetErrorIconBounds(0))).Should().Throw<InvalidOperationException>();
System\Windows\Forms\DataGridViewRowPostPaintEventArgsTests.cs (6)
105Assert.Throws<InvalidOperationException>(() => e.DrawFocus(new Rectangle(1, 2, 3, 4), true)); 129Assert.Throws<InvalidOperationException>(() => e.PaintCells(new Rectangle(1, 2, 3, 4), DataGridViewPaintParts.None)); 153Assert.Throws<InvalidOperationException>(() => e.PaintCellsBackground(new Rectangle(1, 2, 3, 4), true)); 177Assert.Throws<InvalidOperationException>(() => e.PaintCellsContent(new Rectangle(1, 2, 3, 4))); 214Assert.Throws<InvalidOperationException>(() => e.PaintHeader(DataGridViewPaintParts.None)); 215Assert.Throws<InvalidOperationException>(() => e.PaintHeader(true));
System\Windows\Forms\DataGridViewRowPrePaintEventArgsTests.cs (6)
132Assert.Throws<InvalidOperationException>(() => e.DrawFocus(new Rectangle(1, 2, 3, 4), true)); 156Assert.Throws<InvalidOperationException>(() => e.PaintCells(new Rectangle(1, 2, 3, 4), DataGridViewPaintParts.None)); 180Assert.Throws<InvalidOperationException>(() => e.PaintCellsBackground(new Rectangle(1, 2, 3, 4), true)); 204Assert.Throws<InvalidOperationException>(() => e.PaintCellsContent(new Rectangle(1, 2, 3, 4))); 241Assert.Throws<InvalidOperationException>(() => e.PaintHeader(DataGridViewPaintParts.None)); 242Assert.Throws<InvalidOperationException>(() => e.PaintHeader(true));
System\Windows\Forms\DataGridViewRowTests.cs (39)
38Assert.Throws<InvalidOperationException>(() => row.InheritedStyle); 145Assert.Throws<InvalidOperationException>(() => row.ContextMenuStrip); 220Assert.Throws<InvalidOperationException>(() => row.ContextMenuStrip); 225Assert.Throws<InvalidOperationException>(() => row.ContextMenuStrip); 570Assert.Throws<InvalidOperationException>(() => row.DefaultCellStyle = new DataGridViewCellStyle()); 759Assert.Throws<InvalidOperationException>(() => row.Displayed); 888Assert.Throws<InvalidOperationException>(() => row.DividerHeight = -1); 978Assert.Throws<InvalidOperationException>(() => row.ErrorText); 1153Assert.Throws<InvalidOperationException>(() => control.Rows.SharedRow(0).Frozen); 1370Assert.Throws<InvalidOperationException>(() => control.Rows.SharedRow(0).Frozen = value); 2053Assert.Throws<InvalidOperationException>(() => row.Height = -1); 2187Assert.Throws<InvalidOperationException>(() => row.InheritedStyle); 2199Assert.Throws<InvalidOperationException>(() => row.InheritedStyle); 2501Assert.Throws<InvalidOperationException>(() => row.MinimumHeight = -1); 2543Assert.Throws<InvalidOperationException>(() => row.ReadOnly); 2725Assert.Throws<InvalidOperationException>(() => row.ReadOnly = true); 2754Assert.Throws<InvalidOperationException>(() => row.Resizable); 2766Assert.Throws<InvalidOperationException>(() => row.Resizable); 2926Assert.Throws<InvalidOperationException>(() => row.Selected); 2933Assert.Throws<InvalidOperationException>(() => row.Selected = true); 3051Assert.Throws<InvalidOperationException>(() => row.Selected = value); 3075Assert.Throws<InvalidOperationException>(() => row.State); 3241Assert.Throws<InvalidOperationException>(() => row.Visible); 3356Assert.Throws<InvalidOperationException>(() => row.Visible = false); 3372Assert.Throws<InvalidOperationException>(() => row.Visible = true); 3373Assert.Throws<InvalidOperationException>(() => row.Visible = false); 4127Assert.Throws<InvalidOperationException>(() => row.CreateCells(newControl)); 4128Assert.Throws<InvalidOperationException>(() => row.CreateCells(newControl, Array.Empty<object>())); 4138Assert.Throws<InvalidOperationException>(() => row.CreateCells(control)); 4139Assert.Throws<InvalidOperationException>(() => row.CreateCells(control, Array.Empty<object>())); 4217Assert.Throws<InvalidOperationException>(() => row.DrawFocus(graphics, new Rectangle(1, 2, 3, 4), new Rectangle(1, 2, 3, 4), -1, DataGridViewElementStates.None, new DataGridViewCellStyle(), true)); 4383Assert.Throws<InvalidOperationException>(() => row.GetContextMenuStrip(-1)); 4507Assert.Throws<InvalidOperationException>(() => row.GetErrorText(-1)); 4992Assert.Throws<InvalidOperationException>(() => row.Paint(null, Rectangle.Empty, Rectangle.Empty, -1, DataGridViewElementStates.None, true, true)); 5301Assert.Throws<InvalidOperationException>(() => row.PaintCells(null, Rectangle.Empty, Rectangle.Empty, -1, DataGridViewElementStates.None, true, true, DataGridViewPaintParts.All)); 5625Assert.Throws<InvalidOperationException>(() => row.PaintHeader(null, Rectangle.Empty, Rectangle.Empty, -1, DataGridViewElementStates.None, true, true, DataGridViewPaintParts.All)); 5659Assert.Throws<InvalidOperationException>(() => row.PaintHeader(graphics, new Rectangle(1, 2, 100, 100), new Rectangle(1, 2, 100, 100), -1, DataGridViewElementStates.None, true, true, DataGridViewPaintParts.All)); 5740Assert.Throws<InvalidOperationException>(() => row.SetValues(Array.Empty<object>())); 5752Assert.Throws<InvalidOperationException>(() => row.SetValues(Array.Empty<object>()));
System\Windows\Forms\DataGridViewSelectedCellCollectionTests.cs (6)
390Assert.Throws<InvalidOperationException>(() => enumerator.Current); 393Assert.Throws<InvalidOperationException>(() => enumerator.Current); 396Assert.Throws<InvalidOperationException>(() => enumerator.Current); 418Assert.Throws<InvalidOperationException>(() => enumerator.Current); 427Assert.Throws<InvalidOperationException>(() => enumerator.Current); 430Assert.Throws<InvalidOperationException>(() => enumerator.Current);
System\Windows\Forms\DataGridViewSelectedColumnCollectionTests.cs (6)
430Assert.Throws<InvalidOperationException>(() => enumerator.Current); 433Assert.Throws<InvalidOperationException>(() => enumerator.Current); 436Assert.Throws<InvalidOperationException>(() => enumerator.Current); 462Assert.Throws<InvalidOperationException>(() => enumerator.Current); 471Assert.Throws<InvalidOperationException>(() => enumerator.Current); 474Assert.Throws<InvalidOperationException>(() => enumerator.Current);
System\Windows\Forms\DataGridViewSelectedRowCollectionTests.cs (6)
380Assert.Throws<InvalidOperationException>(() => enumerator.Current); 383Assert.Throws<InvalidOperationException>(() => enumerator.Current); 386Assert.Throws<InvalidOperationException>(() => enumerator.Current); 407Assert.Throws<InvalidOperationException>(() => enumerator.Current); 416Assert.Throws<InvalidOperationException>(() => enumerator.Current); 419Assert.Throws<InvalidOperationException>(() => enumerator.Current);
System\Windows\Forms\DataGridViewTextBoxColumnTests.cs (1)
107action.Should().Throw<InvalidOperationException>();
System\Windows\Forms\DataGridViewTextBoxEditingControlTests.cs (3)
265Assert.Throws<InvalidOperationException>(() => control.EditingControlFormattedValue = "text"); 397Assert.Throws<InvalidOperationException>(() => control.Text = "text"); 1433Assert.Throws<InvalidOperationException>(() => control.OnTextChanged(eventArgs));
System\Windows\Forms\DragDropHelperTests.cs (1)
169Assert.Throws<InvalidOperationException>(() => DragDropHelper.SetDragImage(new DataObject(), bitmap, new Point(0, 0), false));
System\Windows\Forms\FormTests.cs (1)
1057Assert.Throws<InvalidOperationException>(
System\Windows\Forms\ImageList.ImageCollectionTests.cs (10)
797Assert.Throws<InvalidOperationException>(() => collection.Add("Key", (Image)null)); 799Assert.Throws<InvalidOperationException>(() => collection.Add("Key", (Icon)null)); 1124Assert.Throws<InvalidOperationException>(() => enumerator.Current); 1127Assert.Throws<InvalidOperationException>(() => enumerator.Current); 1144Assert.Throws<InvalidOperationException>(() => enumerator.Current); 1147Assert.Throws<InvalidOperationException>(() => enumerator.Current); 1169Assert.Throws<InvalidOperationException>(() => enumerator.Current); 1184Assert.Throws<InvalidOperationException>(() => enumerator.Current); 1207Assert.Throws<InvalidOperationException>(() => enumerator.Current); 1222Assert.Throws<InvalidOperationException>(() => enumerator.Current);
System\Windows\Forms\Layout\TableLayoutSettingsTypeConverterTests.cs (1)
244Assert.Throws<InvalidOperationException>(() => converter.ConvertTo(settings, typeof(string)));
System\Windows\Forms\ListBox.IntegerCollectionTests.cs (6)
2244Assert.Throws<InvalidOperationException>(() => enumerator.Current); 2247Assert.Throws<InvalidOperationException>(() => enumerator.Current); 2251Assert.Throws<InvalidOperationException>(() => enumerator.Current); 2270Assert.Throws<InvalidOperationException>(() => enumerator.Current); 2276Assert.Throws<InvalidOperationException>(() => enumerator.Current); 2280Assert.Throws<InvalidOperationException>(() => enumerator.Current);
System\Windows\Forms\ListBox.ObjectCollectionTests.cs (14)
3628Assert.Throws<InvalidOperationException>(() => collection.AddRange(collection)); 3641Assert.Throws<InvalidOperationException>(() => collection.AddRange(collection)); 4035Assert.Throws<InvalidOperationException>(() => enumerator.Current); 4038Assert.Throws<InvalidOperationException>(() => enumerator.Current); 4042Assert.Throws<InvalidOperationException>(() => enumerator.Current); 4061Assert.Throws<InvalidOperationException>(() => enumerator.Current); 4067Assert.Throws<InvalidOperationException>(() => enumerator.Current); 4071Assert.Throws<InvalidOperationException>(() => enumerator.Current); 9357Assert.Throws<InvalidOperationException>(() => enumerator.Current); 9360Assert.Throws<InvalidOperationException>(() => enumerator.Current); 9364Assert.Throws<InvalidOperationException>(() => enumerator.Current); 9383Assert.Throws<InvalidOperationException>(() => enumerator.Current); 9389Assert.Throws<InvalidOperationException>(() => enumerator.Current); 9393Assert.Throws<InvalidOperationException>(() => enumerator.Current);
System\Windows\Forms\ListControlTests.cs (1)
2087Assert.Throws<InvalidOperationException>(() => control.SelectedValue = value);
System\Windows\Forms\ListViewGroupCollectionTests.cs (5)
1066Assert.Throws<InvalidOperationException>(() => listView.Groups.Add(new ListViewGroup())); 1082Assert.Throws<InvalidOperationException>(() => listView.Groups.Add(key: "key", headerText: "text")); 1098Assert.Throws<InvalidOperationException>(() => listView.Groups.AddRange((ListViewGroup[])[new(), new()])); 1117Assert.Throws<InvalidOperationException>(() => listView.Groups.AddRange(sourceGroup)); 1133Assert.Throws<InvalidOperationException>(() => listView.Groups.Insert(0, new ListViewGroup()));
System\Windows\Forms\ListViewGroupTests.cs (1)
132Assert.Throws<InvalidOperationException>(() => group.GetNativeCollapsedState());
System\Windows\Forms\ListViewItemTests.cs (3)
1078Assert.Throws<InvalidOperationException>(() => item.AccessibilityObject); 1102Assert.Throws<InvalidOperationException>(() => item.AccessibilityObject); 1116Assert.Throws<InvalidOperationException>(() => item.AccessibilityObject);
System\Windows\Forms\ListViewSubItemCollectionTests.cs (2)
209Assert.Throws<InvalidOperationException>(() => collection.Add(new ListViewItem.ListViewSubItem())); 643Assert.Throws<InvalidOperationException>(() => collection.Add(new ListViewItem.ListViewSubItem()));
System\Windows\Forms\ListViewTests.cs (2)
145Assert.Throws<InvalidOperationException>(() => control.TopItem); 5298action.Should().Throw<InvalidOperationException>(SR.ListViewVirtualItemRequired);
System\Windows\Forms\MonthCalendar.HitTestInfoTests.cs (1)
51action.Should().Throw<InvalidOperationException>();
System\Windows\Forms\MonthCalendarTests.cs (1)
2492Assert.Throws<InvalidOperationException>(() => control.SingleMonthSize);
System\Windows\Forms\NativeWindowTests.cs (2)
92Assert.Throws<InvalidOperationException>(() => window.AssignHandle(250)); 180Assert.Throws<InvalidOperationException>(() => window.CreateHandle(cp));
System\Windows\Forms\PictureBoxTests.cs (6)
1965Assert.Throws<InvalidOperationException>(() => pictureBox.Load(null)); 1971Assert.Throws<InvalidOperationException>(() => pictureBox.Load(string.Empty)); 2122Assert.Throws<InvalidOperationException>(pictureBox.Load); 2123Assert.Throws<InvalidOperationException>(() => pictureBox.Load(imageLocation)); 2134Assert.Throws<InvalidOperationException>(pictureBox.LoadAsync); 2135Assert.Throws<InvalidOperationException>(() => pictureBox.LoadAsync(imageLocation));
System\Windows\Forms\ProgressBarTests.cs (2)
1899Assert.Throws<InvalidOperationException>(() => control.Increment(value)); 2555Assert.Throws<InvalidOperationException>(control.PerformStep);
System\Windows\Forms\TabControl.TabPageCollectionTests.cs (19)
1668Assert.Throws<InvalidOperationException>(() => enumerator.Current); 1671Assert.Throws<InvalidOperationException>(() => enumerator.Current); 1675Assert.Throws<InvalidOperationException>(() => enumerator.Current); 1698Assert.Throws<InvalidOperationException>(() => enumerator.Current); 1710Assert.Throws<InvalidOperationException>(() => enumerator.Current); 1714Assert.Throws<InvalidOperationException>(() => enumerator.Current); 1730Assert.Throws<InvalidOperationException>(() => enumerator.Current); 1733Assert.Throws<InvalidOperationException>(() => enumerator.Current); 1737Assert.Throws<InvalidOperationException>(() => enumerator.Current); 1760Assert.Throws<InvalidOperationException>(() => enumerator.Current); 1772Assert.Throws<InvalidOperationException>(() => enumerator.Current); 1776Assert.Throws<InvalidOperationException>(() => enumerator.Current); 1794Assert.Throws<InvalidOperationException>(() => enumerator.Current); 1809Assert.Throws<InvalidOperationException>(() => enumerator.Current); 1813Assert.Throws<InvalidOperationException>(() => enumerator.Current); 1816Assert.Throws<InvalidOperationException>(() => enumerator.Current); 1827Assert.Throws<InvalidOperationException>(() => enumerator.Current); 1830Assert.Throws<InvalidOperationException>(() => enumerator.Current); 1834Assert.Throws<InvalidOperationException>(() => enumerator.Current);
System\Windows\Forms\TaskDialogTests.cs (1)
50Assert.Throws<InvalidOperationException>(separateTask.GetAwaiter().GetResult);
System\Windows\Forms\ToolStripDropDownTests.cs (1)
283Assert.Throws<InvalidOperationException>(() => control.AllowItemReorder = true);
System\Windows\Forms\ToolStripItemTests.cs (1)
765Assert.Throws<InvalidOperationException>(() => item.AllowDrop = true);
System\Windows\Forms\ToolStripTests.cs (2)
508Assert.Throws<InvalidOperationException>(() => control.AllowDrop = true); 620Assert.Throws<InvalidOperationException>(() => control.AllowItemReorder = true);
System\Windows\Forms\TreeNodeTests.cs (5)
25Assert.Throws<InvalidOperationException>(() => node.FullPath); 65Assert.Throws<InvalidOperationException>(() => node.FullPath); 113Assert.Throws<InvalidOperationException>(() => node.FullPath); 156Assert.Throws<InvalidOperationException>(() => node.FullPath); 204Assert.Throws<InvalidOperationException>(() => node.FullPath);
System\Windows\Forms\WebBrowserTests.cs (26)
260Assert.Throws<InvalidOperationException>(() => control.AllowWebBrowserDrop); 347Assert.Throws<InvalidOperationException>(() => control.AllowWebBrowserDrop = value); 496Assert.Throws<InvalidOperationException>(() => control.Document); 564Assert.Throws<InvalidOperationException>(() => control.DocumentStream); 613Assert.Throws<InvalidOperationException>(() => control.DocumentStream = null); 681Assert.Throws<InvalidOperationException>(() => control.DocumentText); 849Assert.Throws<InvalidOperationException>(() => control.DocumentText = null); 918Assert.Throws<InvalidOperationException>(() => control.DocumentTitle); 985Assert.Throws<InvalidOperationException>(() => control.DocumentType); 1051Assert.Throws<InvalidOperationException>(() => control.EncryptionLevel); 1160Assert.Throws<InvalidOperationException>(() => control.IsBusy); 1207Assert.Throws<InvalidOperationException>(() => control.IsOffline); 1647Assert.Throws<InvalidOperationException>(() => control.ReadyState); 1694Assert.Throws<InvalidOperationException>(() => control.ScriptErrorsSuppressed); 1779Assert.Throws<InvalidOperationException>(() => control.ScriptErrorsSuppressed = value); 1898Assert.Throws<InvalidOperationException>(() => control.StatusText); 1964Assert.Throws<InvalidOperationException>(() => control.Url); 2114Assert.Throws<InvalidOperationException>(() => control.Url = null); 3137Assert.Throws<InvalidOperationException>(control.GoHome); 3186Assert.Throws<InvalidOperationException>(control.GoSearch); 3492Assert.Throws<InvalidOperationException>(() => control.Navigate("about:blank")); 3493Assert.Throws<InvalidOperationException>(() => control.Navigate(new Uri("http://google.com"))); 3494Assert.Throws<InvalidOperationException>(() => control.Navigate(new Uri("http://google.com"), "targetFrameName")); 3495Assert.Throws<InvalidOperationException>(() => control.Navigate(new Uri("http://google.com"), false)); 3496Assert.Throws<InvalidOperationException>(() => control.Navigate(new Uri("http://google.com"), "targetFrameName", null, null)); 3662Assert.Throws<InvalidOperationException>(() => control.OnDocumentCompleted(null));
System.Windows.Forms.UI.IntegrationTests (2)
Infra\DenyExecutionSynchronizationContext.cs (2)
52catch (InvalidOperationException e) 71catch (InvalidOperationException e)
System.Xaml.Tests (22)
System\Windows\Markup\ArrayExtensionTests.cs (2)
108Assert.Throws<InvalidOperationException>(() => extension.ProvideValue(null)); 116Assert.Throws<InvalidOperationException>(() => extension.ProvideValue(null));
System\Windows\Markup\NameReferenceConverterTests.cs (3)
85Assert.Throws<InvalidOperationException>(() => converter.ConvertFrom(context, null, "name")); 118Assert.Throws<InvalidOperationException>(() => converter.ConvertFrom(context, null, value)); 177Assert.Throws<InvalidOperationException>(() => converter.ConvertTo(context, null, "value", null));
System\Windows\Markup\ReferenceTests.cs (2)
79Assert.Throws<InvalidOperationException>(() => reference.ProvideValue(provider)); 92Assert.Throws<InvalidOperationException>(() => reference.ProvideValue(provider));
System\Windows\Markup\StaticExtensionTests.cs (1)
95Assert.Throws<InvalidOperationException>(() => extension.ProvideValue(null));
System\Windows\Markup\TypeExtensionTests.cs (3)
83Assert.Throws<InvalidOperationException>(() => extension.ProvideValue(null)); 103Assert.Throws<InvalidOperationException>(() => extension.ProvideValue(provider)); 121Assert.Throws<InvalidOperationException>(() => extension.ProvideValue(provider));
System\Xaml\Schema\XamlTypeNameTests.cs (10)
151Assert.Throws<InvalidOperationException>(() => typeName.ToString()); 152Assert.Throws<InvalidOperationException>(() => typeName.ToString(null)); 153Assert.Throws<InvalidOperationException>(() => typeName.ToString(new CustomNamespacePrefixLookup())); 154Assert.Throws<InvalidOperationException>(() => XamlTypeName.ToString(new XamlTypeName[] { typeName }, new CustomNamespacePrefixLookup())); 163Assert.Throws<InvalidOperationException>(() => typeName.ToString()); 164Assert.Throws<InvalidOperationException>(() => typeName.ToString(null)); 165Assert.Throws<InvalidOperationException>(() => typeName.ToString(new CustomNamespacePrefixLookup())); 166Assert.Throws<InvalidOperationException>(() => XamlTypeName.ToString(new XamlTypeName[] { typeName }, new CustomNamespacePrefixLookup())); 191Assert.Throws<InvalidOperationException>(() => typeName.ToString(prefixLookup)); 192Assert.Throws<InvalidOperationException>(() => XamlTypeName.ToString(new XamlTypeName[] { typeName }, prefixLookup));
System\Xaml\XamlBackgroundReaderTests.cs (1)
301Assert.Throws<InvalidOperationException>(() => reader.StartThread());
Test.Utilities (6)
src\Dependencies\Contracts\ExceptionUtilities.cs (2)
17/// Creates an <see cref="InvalidOperationException"/> with information about an unexpected value. 20/// <returns>The <see cref="InvalidOperationException"/>, which should be thrown by the caller.</returns>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\NonReentrantLock.cs (2)
147/// <exception cref="InvalidOperationException">The lock is not currently held by the calling thread.</exception> 171/// <exception cref="InvalidOperationException">The lock is not currently held by the calling thread.</exception>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Diagnostics\DiagnosticSeverityExtensions.cs (1)
18/// <exception cref="InvalidOperationException">
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Diagnostics\ReportDiagnosticExtensions.cs (1)
20/// <exception cref="InvalidOperationException">
Text.Analyzers (6)
src\Dependencies\Contracts\ExceptionUtilities.cs (2)
17/// Creates an <see cref="InvalidOperationException"/> with information about an unexpected value. 20/// <returns>The <see cref="InvalidOperationException"/>, which should be thrown by the caller.</returns>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\NonReentrantLock.cs (2)
147/// <exception cref="InvalidOperationException">The lock is not currently held by the calling thread.</exception> 171/// <exception cref="InvalidOperationException">The lock is not currently held by the calling thread.</exception>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Diagnostics\DiagnosticSeverityExtensions.cs (1)
18/// <exception cref="InvalidOperationException">
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Diagnostics\ReportDiagnosticExtensions.cs (1)
20/// <exception cref="InvalidOperationException">
UIAutomationClient (2)
MS\Internal\Automation\HwndProxyElementProvider.cs (1)
456catch (InvalidOperationException /*err*/)
MS\Internal\Automation\WindowInteractionStateTracker.cs (1)
87catch (InvalidOperationException)
VBCSCompiler.UnitTests (1)
NamedPipeClientConnectionHostTests.cs (1)
45await Assert.ThrowsAsync<InvalidOperationException>(() => _host.GetNextClientConnectionAsync());
WindowsBase.Tests (228)
System\ComponentModel\CurrentChangingEventArgsTests.cs (1)
62Assert.Throws<InvalidOperationException>(() => args.Cancel = true);
System\ComponentModel\SortDescriptionTests.cs (2)
74Assert.Throws<InvalidOperationException>(() => description.Direction = value); 104Assert.Throws<InvalidOperationException>(() => description.PropertyName = value);
System\IO\Packaging\PackageDigitalSignatureManagerTests.cs (3)
219Assert.Throws<InvalidOperationException>(() => manager.Countersign()); 224Assert.Throws<InvalidOperationException>(() => manager.Countersign(c)); 225Assert.Throws<InvalidOperationException>(() => manager.Countersign(c, Array.Empty<Uri>()));
System\Windows\Converters\Int32RectValueSerializerTests.cs (2)
95Assert.Throws<InvalidOperationException>(() => serializer.ConvertFromString(value, null)); 96Assert.Throws<InvalidOperationException>(() => serializer.ConvertFromString(value, new CustomValueSerializerContext()));
System\Windows\Converters\PointValueSerializerTests.cs (2)
95Assert.Throws<InvalidOperationException>(() => serializer.ConvertFromString(value, null)); 96Assert.Throws<InvalidOperationException>(() => serializer.ConvertFromString(value, new CustomValueSerializerContext()));
System\Windows\Converters\RectValueSerializerTests.cs (2)
95Assert.Throws<InvalidOperationException>(() => serializer.ConvertFromString(value, null)); 96Assert.Throws<InvalidOperationException>(() => serializer.ConvertFromString(value, new CustomValueSerializerContext()));
System\Windows\Converters\SizeValueSerializerTests.cs (2)
95Assert.Throws<InvalidOperationException>(() => serializer.ConvertFromString(value, null)); 96Assert.Throws<InvalidOperationException>(() => serializer.ConvertFromString(value, new CustomValueSerializerContext()));
System\Windows\Converters\VectorValueSerializerTests.cs (2)
95Assert.Throws<InvalidOperationException>(() => serializer.ConvertFromString(value, null)); 96Assert.Throws<InvalidOperationException>(() => serializer.ConvertFromString(value, new CustomValueSerializerContext()));
System\Windows\DependencyObjectTests.cs (31)
419Assert.Throws<InvalidOperationException>(() => obj.ClearValue(property)); 429Assert.Throws<InvalidOperationException>(() => obj.ClearValue(property)); 784Assert.Throws<InvalidOperationException>(() => obj.ClearValue(key)); 1240Assert.Throws<InvalidOperationException>(() => obj.CoerceValue(property)); 1268Assert.Throws<InvalidOperationException>(() => enumerator.Current); 1269Assert.Throws<InvalidOperationException>(() => ((IEnumerator)enumerator).Current); 1273Assert.Throws<InvalidOperationException>(() => enumerator.Current); 1274Assert.Throws<InvalidOperationException>(() => ((IEnumerator)enumerator).Current); 1278Assert.Throws<InvalidOperationException>(() => enumerator.Current); 1279Assert.Throws<InvalidOperationException>(() => ((IEnumerator)enumerator).Current); 1283Assert.Throws<InvalidOperationException>(() => enumerator.Current); 1284Assert.Throws<InvalidOperationException>(() => ((IEnumerator)enumerator).Current); 1301Assert.Throws<InvalidOperationException>(() => enumerator.Current); 1302Assert.Throws<InvalidOperationException>(() => ((IEnumerator)enumerator).Current); 1316Assert.Throws<InvalidOperationException>(() => enumerator.Current); 1317Assert.Throws<InvalidOperationException>(() => ((IEnumerator)enumerator).Current); 1321Assert.Throws<InvalidOperationException>(() => enumerator.Current); 1322Assert.Throws<InvalidOperationException>(() => ((IEnumerator)enumerator).Current); 1344Assert.Throws<InvalidOperationException>(() => enumerator.Current); 1345Assert.Throws<InvalidOperationException>(() => ((IEnumerator)enumerator).Current); 1359Assert.Throws<InvalidOperationException>(() => enumerator.Current); 1360Assert.Throws<InvalidOperationException>(() => ((IEnumerator)enumerator).Current); 1364Assert.Throws<InvalidOperationException>(() => enumerator.Current); 1365Assert.Throws<InvalidOperationException>(() => ((IEnumerator)enumerator).Current); 1378Assert.Throws<InvalidOperationException>(() => obj.GetLocalValueEnumerator()); 1613Assert.Throws<InvalidOperationException>(() => obj.GetValue(property)); 1721Assert.Throws<InvalidOperationException>(() => obj.InvalidateProperty(property)); 2024Assert.Throws<InvalidOperationException>(() => obj.ReadLocalValue(property)); 2394Assert.Throws<InvalidOperationException>(() => obj.SetValue(property, "value")); 2443Assert.Throws<InvalidOperationException>(() => obj.SetValue(property, "value")); 2866Assert.Throws<InvalidOperationException>(() => obj.SetValue(key, "value"));
System\Windows\FreezableTests.cs (83)
58Assert.Throws<InvalidOperationException>(() => freezable.Changed += handler); 59Assert.Throws<InvalidOperationException>(() => freezable.Changed += null); 60Assert.Throws<InvalidOperationException>(() => freezable.Changed -= handler); 61Assert.Throws<InvalidOperationException>(() => freezable.Changed -= null); 74Assert.Throws<InvalidOperationException>(() => freezable.Changed += handler); 75Assert.Throws<InvalidOperationException>(() => freezable.Changed += null); 76Assert.Throws<InvalidOperationException>(() => freezable.Changed -= handler); 77Assert.Throws<InvalidOperationException>(() => freezable.Changed -= null); 91Assert.Throws<InvalidOperationException>(() => freezable.Changed += handler); 92Assert.Throws<InvalidOperationException>(() => freezable.Changed += null); 93Assert.Throws<InvalidOperationException>(() => freezable.Changed -= handler); 94Assert.Throws<InvalidOperationException>(() => freezable.Changed -= null); 357Assert.Throws<InvalidOperationException>(() => freezable.IsFrozen); 815Assert.Throws<InvalidOperationException>(() => obj.ClearValue(property)); 825Assert.Throws<InvalidOperationException>(() => obj.ClearValue(property)); 835Assert.Throws<InvalidOperationException>(() => obj.ClearValue(property)); 848Assert.Throws<InvalidOperationException>(() => obj.ClearValue(property)); 1290Assert.Throws<InvalidOperationException>(() => obj.ClearValue(key)); 1301Assert.Throws<InvalidOperationException>(() => obj.ClearValue(key)); 1314Assert.Throws<InvalidOperationException>(() => obj.ClearValue(key)); 1627Assert.Throws<InvalidOperationException>(() => freezable.Clone()); 1911Assert.Throws<InvalidOperationException>(() => freezable.CloneCore(sourceFreezable)); 1995Assert.Throws<InvalidOperationException>(() => freezable.CloneCore(sourceFreezable)); 2085Assert.Throws<InvalidOperationException>(() => freezable.CloneCore(sourceFreezable)); 2175Assert.Throws<InvalidOperationException>(() => freezable.CloneCore(sourceFreezable)); 2510Assert.Throws<InvalidOperationException>(() => freezable.CloneCurrentValue()); 2794Assert.Throws<InvalidOperationException>(() => freezable.CloneCurrentValueCore(sourceFreezable)); 2879Assert.Throws<InvalidOperationException>(() => freezable.CloneCurrentValueCore(sourceFreezable)); 2970Assert.Throws<InvalidOperationException>(() => freezable.CloneCurrentValueCore(sourceFreezable)); 3061Assert.Throws<InvalidOperationException>(() => freezable.CloneCurrentValueCore(sourceFreezable)); 3659Assert.Throws<InvalidOperationException>(() => obj.CoerceValue(property)); 3819Assert.Throws<InvalidOperationException>(() => freezable.Freeze()); 3843Assert.Throws<InvalidOperationException>(() => freezable.Freeze()); 4017Assert.Throws<InvalidOperationException>(() => freezable.Freeze()); 4063Assert.Throws<InvalidOperationException>(() => freezable.Freeze()); 4626Assert.Throws<InvalidOperationException>(() => freezable.GetAsFrozen()); 4635Assert.Throws<InvalidOperationException>(() => freezable.GetAsFrozen()); 4907Assert.Throws<InvalidOperationException>(() => freezable.GetAsFrozenCore(sourceFreezable)); 4992Assert.Throws<InvalidOperationException>(() => freezable.GetAsFrozenCore(sourceFreezable)); 5083Assert.Throws<InvalidOperationException>(() => freezable.GetAsFrozenCore(sourceFreezable)); 5174Assert.Throws<InvalidOperationException>(() => freezable.GetAsFrozenCore(sourceFreezable)); 5479Assert.Throws<InvalidOperationException>(() => freezable.GetCurrentValueAsFrozen()); 5488Assert.Throws<InvalidOperationException>(() => freezable.GetCurrentValueAsFrozen()); 5760Assert.Throws<InvalidOperationException>(() => freezable.GetCurrentValueAsFrozenCore(sourceFreezable)); 5845Assert.Throws<InvalidOperationException>(() => freezable.GetCurrentValueAsFrozenCore(sourceFreezable)); 5936Assert.Throws<InvalidOperationException>(() => freezable.GetCurrentValueAsFrozenCore(sourceFreezable)); 6026Assert.Throws<InvalidOperationException>(() => freezable.GetCurrentValueAsFrozenCore(sourceFreezable)); 6174Assert.Throws<InvalidOperationException>(() => obj.GetValue(property)); 6235Assert.Throws<InvalidOperationException>(() => freezable.ReadPreamble()); 6364Assert.Throws<InvalidOperationException>(() => freezable.OnFreezablePropertyChanged(null!, value1)); 6365Assert.Throws<InvalidOperationException>(() => freezable.OnFreezablePropertyChanged(null!, value3)); 6368Assert.Throws<InvalidOperationException>(() => freezable.OnFreezablePropertyChanged(value1, value3)); 6370Assert.Throws<InvalidOperationException>(() => freezable.OnFreezablePropertyChanged(value2, value1)); 6371Assert.Throws<InvalidOperationException>(() => freezable.OnFreezablePropertyChanged(value2, value3)); 6373Assert.Throws<InvalidOperationException>(() => freezable.OnFreezablePropertyChanged(value3, value1)); 6419Assert.Throws<InvalidOperationException>(() => freezable.OnFreezablePropertyChanged(null!, value1)); 6420Assert.Throws<InvalidOperationException>(() => freezable.OnFreezablePropertyChanged(null!, value3)); 6423Assert.Throws<InvalidOperationException>(() => freezable.OnFreezablePropertyChanged(value1, value3)); 6425Assert.Throws<InvalidOperationException>(() => freezable.OnFreezablePropertyChanged(value2, value1)); 6426Assert.Throws<InvalidOperationException>(() => freezable.OnFreezablePropertyChanged(value2, value3)); 6428Assert.Throws<InvalidOperationException>(() => freezable.OnFreezablePropertyChanged(value3, value1)); 6540Assert.Throws<InvalidOperationException>(() => freezable.OnFreezablePropertyChanged(null!, value1, property)); 6541Assert.Throws<InvalidOperationException>(() => freezable.OnFreezablePropertyChanged(null!, value3, property)); 6544Assert.Throws<InvalidOperationException>(() => freezable.OnFreezablePropertyChanged(value1, value3, property)); 6546Assert.Throws<InvalidOperationException>(() => freezable.OnFreezablePropertyChanged(value2, value1, property)); 6547Assert.Throws<InvalidOperationException>(() => freezable.OnFreezablePropertyChanged(value2, value3, property)); 6549Assert.Throws<InvalidOperationException>(() => freezable.OnFreezablePropertyChanged(value3, value1, property)); 6597Assert.Throws<InvalidOperationException>(() => freezable.OnFreezablePropertyChanged(null!, value1, property)); 6598Assert.Throws<InvalidOperationException>(() => freezable.OnFreezablePropertyChanged(null!, value3, property)); 6601Assert.Throws<InvalidOperationException>(() => freezable.OnFreezablePropertyChanged(value1, value3, property)); 6603Assert.Throws<InvalidOperationException>(() => freezable.OnFreezablePropertyChanged(value2, value1, property)); 6604Assert.Throws<InvalidOperationException>(() => freezable.OnFreezablePropertyChanged(value2, value3, property)); 6606Assert.Throws<InvalidOperationException>(() => freezable.OnFreezablePropertyChanged(value3, value1, property)); 6807Assert.Throws<InvalidOperationException>(() => obj.SetValue(property, "value")); 6858Assert.Throws<InvalidOperationException>(() => freezable.SetValue(property, true)); 6862Assert.Throws<InvalidOperationException>(() => freezable.SetValue(property, true)); 6866Assert.Throws<InvalidOperationException>(() => freezable.SetValue(property, false)); 6879Assert.Throws<InvalidOperationException>(() => freezable.SetValue(property, value)); 6894Assert.Throws<InvalidOperationException>(() => freezable.SetValue(property, value)); 7244Assert.Throws<InvalidOperationException>(() => freezable.WritePreamble()); 7247Assert.Throws<InvalidOperationException>(() => freezable.WritePreamble()); 7256Assert.Throws<InvalidOperationException>(() => freezable.WritePreamble()); 7268Assert.Throws<InvalidOperationException>(() => freezable.WritePreamble());
System\Windows\Int32RectConverterTests.cs (3)
142Assert.Throws<InvalidOperationException>(() => converter.ConvertFrom(value)); 143Assert.Throws<InvalidOperationException>(() => converter.ConvertFrom(null, null, value)); 144Assert.Throws<InvalidOperationException>(() => converter.ConvertFrom(new CustomTypeDescriptorContext(), CultureInfo.InvariantCulture, value));
System\Windows\Int32RectTests.cs (2)
308Assert.Throws<InvalidOperationException>(() => Int32Rect.Parse(null)); 334Assert.Throws<InvalidOperationException>(() => Int32Rect.Parse(source));
System\Windows\LocalValueEnumeratorTests.cs (17)
16Assert.Throws<InvalidOperationException>(() => enumerator.Current); 23Assert.Throws<InvalidOperationException>(() => enumerator.Current); 32Assert.Throws<InvalidOperationException>(() => enumerator.Current); 41Assert.Throws<InvalidOperationException>(() => enumerator.Current); 52Assert.Throws<InvalidOperationException>(() => enumerator.Current); 65Assert.Throws<InvalidOperationException>(() => enumerator.Current); 77Assert.Throws<InvalidOperationException>(() => enumerator.Current); 84Assert.Throws<InvalidOperationException>(() => ((IEnumerator)enumerator).Current); 93Assert.Throws<InvalidOperationException>(() => ((IEnumerator)enumerator).Current); 102Assert.Throws<InvalidOperationException>(() => ((IEnumerator)enumerator).Current); 113Assert.Throws<InvalidOperationException>(() => ((IEnumerator)enumerator).Current); 126Assert.Throws<InvalidOperationException>(() => ((IEnumerator)enumerator).Current); 138Assert.Throws<InvalidOperationException>(() => ((IEnumerator)enumerator).Current); 279Assert.Throws<InvalidOperationException>(() => enumerator.Current); 283Assert.Throws<InvalidOperationException>(() => enumerator.Current); 295Assert.Throws<InvalidOperationException>(() => enumerator.Current); 299Assert.Throws<InvalidOperationException>(() => enumerator.Current);
System\Windows\Markup\Primitives\MarkupPropertyTests.cs (4)
452Assert.Throws<InvalidOperationException>(() => XamlWriter.Save(instance)); 466Assert.Throws<InvalidOperationException>(() => XamlWriter.Save(instance)); 514Assert.Throws<InvalidOperationException>(() => XamlWriter.Save(instance)); 532Assert.Throws<InvalidOperationException>(() => XamlWriter.Save(instance));
System\Windows\Media\Converters\MatrixValueSerializerTests.cs (2)
95Assert.Throws<InvalidOperationException>(() => serializer.ConvertFromString(value, null)); 96Assert.Throws<InvalidOperationException>(() => serializer.ConvertFromString(value, new CustomValueSerializerContext()));
System\Windows\Media\MatrixConverterTests.cs (3)
142Assert.Throws<InvalidOperationException>(() => converter.ConvertFrom(value)); 143Assert.Throws<InvalidOperationException>(() => converter.ConvertFrom(null, null, value)); 144Assert.Throws<InvalidOperationException>(() => converter.ConvertFrom(new CustomTypeDescriptorContext(), CultureInfo.InvariantCulture, value));
System\Windows\Media\MatrixTests.cs (3)
1231Assert.Throws<InvalidOperationException>(() => matrix.Invert()); 1261Assert.Throws<InvalidOperationException>(() => Matrix.Parse(null)); 1287Assert.Throws<InvalidOperationException>(() => Matrix.Parse(source));
System\Windows\NameScopeTests.cs (6)
735Assert.Throws<InvalidOperationException>(() => enumerator.Current); 744Assert.Throws<InvalidOperationException>(() => enumerator.Current); 748Assert.Throws<InvalidOperationException>(() => enumerator.Current); 791Assert.Throws<InvalidOperationException>(() => enumerator.Current); 800Assert.Throws<InvalidOperationException>(() => enumerator.Current); 804Assert.Throws<InvalidOperationException>(() => enumerator.Current);
System\Windows\PointConverterTests.cs (3)
142Assert.Throws<InvalidOperationException>(() => converter.ConvertFrom(value)); 143Assert.Throws<InvalidOperationException>(() => converter.ConvertFrom(null, null, value)); 144Assert.Throws<InvalidOperationException>(() => converter.ConvertFrom(new CustomTypeDescriptorContext(), CultureInfo.InvariantCulture, value));
System\Windows\PointTests.cs (2)
378Assert.Throws<InvalidOperationException>(() => Point.Parse(null)); 399Assert.Throws<InvalidOperationException>(() => Point.Parse(source));
System\Windows\PropertyMetadataTests.cs (4)
154Assert.Throws<InvalidOperationException>(() => metadata.CoerceValueCallback = (d, v) => v); 208Assert.Throws<InvalidOperationException>(() => metadata.DefaultValue = new object()); 247Assert.Throws<InvalidOperationException>(() => metadata.PropertyChangedCallback = (d, e) => { }); 507Assert.Throws<InvalidOperationException>(() => metadata.Merge(new PropertyMetadata(), null!));
System\Windows\RectConverterTests.cs (3)
142Assert.Throws<InvalidOperationException>(() => converter.ConvertFrom(value)); 143Assert.Throws<InvalidOperationException>(() => converter.ConvertFrom(null, null, value)); 144Assert.Throws<InvalidOperationException>(() => converter.ConvertFrom(new CustomTypeDescriptorContext(), CultureInfo.InvariantCulture, value));
System\Windows\RectTests.cs (23)
450Assert.Throws<InvalidOperationException>(() => rect.Location = rect.Location); 451Assert.Throws<InvalidOperationException>(() => rect.Location = new Point(1, 2)); 551Assert.Throws<InvalidOperationException>(() => rect.Size = new Size(1, 2)); 645Assert.Throws<InvalidOperationException>(() => rect.X = rect.X); 646Assert.Throws<InvalidOperationException>(() => rect.X = 1); 718Assert.Throws<InvalidOperationException>(() => rect.Y = rect.Y); 719Assert.Throws<InvalidOperationException>(() => rect.Y = 1); 788Assert.Throws<InvalidOperationException>(() => rect.Width = rect.Width); 789Assert.Throws<InvalidOperationException>(() => rect.Width = 1); 790Assert.Throws<InvalidOperationException>(() => rect.Width = -1); 870Assert.Throws<InvalidOperationException>(() => rect.Height = rect.Height); 871Assert.Throws<InvalidOperationException>(() => rect.Height = 1); 872Assert.Throws<InvalidOperationException>(() => rect.Height = -1); 1807Assert.Throws<InvalidOperationException>(() => Rect.Empty.Inflate(0, 0)); 1808Assert.Throws<InvalidOperationException>(() => Rect.Empty.Inflate(new Size(0, 0))); 1809Assert.Throws<InvalidOperationException>(() => Rect.Inflate(Rect.Empty, 0, 0)); 1810Assert.Throws<InvalidOperationException>(() => Rect.Inflate(Rect.Empty, new Size(0, 0))); 2752Assert.Throws<InvalidOperationException>(() => Rect.Empty.Offset(0, 0)); 2753Assert.Throws<InvalidOperationException>(() => Rect.Empty.Offset(new Vector(0, 0))); 2754Assert.Throws<InvalidOperationException>(() => Rect.Offset(Rect.Empty, 0, 0)); 2755Assert.Throws<InvalidOperationException>(() => Rect.Offset(Rect.Empty, new Vector(0, 0))); 2783Assert.Throws<InvalidOperationException>(() => Rect.Parse(null)); 2809Assert.Throws<InvalidOperationException>(() => Rect.Parse(source));
System\Windows\SizeConverterTests.cs (3)
142Assert.Throws<InvalidOperationException>(() => converter.ConvertFrom(value)); 143Assert.Throws<InvalidOperationException>(() => converter.ConvertFrom(null, null, value)); 144Assert.Throws<InvalidOperationException>(() => converter.ConvertFrom(new CustomTypeDescriptorContext(), CultureInfo.InvariantCulture, value));
System\Windows\SizeTests.cs (4)
110Assert.Throws<InvalidOperationException>(() => size.Width = value); 152Assert.Throws<InvalidOperationException>(() => size.Height = value); 336Assert.Throws<InvalidOperationException>(() => Size.Parse(null)); 357Assert.Throws<InvalidOperationException>(() => Size.Parse(source));
System\Windows\Threading\DispatcherObjectTests.cs (1)
79catch (InvalidOperationException)
System\Windows\Threading\DispatcherPriorityAwaitableTests..cs (1)
27catch (InvalidOperationException)
System\Windows\Threading\DispatcherPriorityAwaiterTests.cs (7)
34catch (InvalidOperationException) 93catch (InvalidOperationException) 124catch (InvalidOperationException) 139Assert.Throws<InvalidOperationException>(() => awaiter.OnCompleted(null)); 140Assert.Throws<InvalidOperationException>(() => awaiter.OnCompleted(() => { })); 147Assert.Throws<InvalidOperationException>(() => awaiter.OnCompleted(null)); 148Assert.Throws<InvalidOperationException>(() => awaiter.OnCompleted(() => { }));
System\Windows\Threading\DispatcherTests.cs (2)
105catch (InvalidOperationException) 190catch (InvalidOperationException)
System\Windows\VectorConverterTests.cs (3)
142Assert.Throws<InvalidOperationException>(() => converter.ConvertFrom(value)); 143Assert.Throws<InvalidOperationException>(() => converter.ConvertFrom(null, null, value)); 144Assert.Throws<InvalidOperationException>(() => converter.ConvertFrom(new CustomTypeDescriptorContext(), CultureInfo.InvariantCulture, value));
System\Windows\VectorTests.cs (2)
650Assert.Throws<InvalidOperationException>(() => Vector.Parse(null)); 671Assert.Throws<InvalidOperationException>(() => Vector.Parse(source));
WindowsFormsIntegration (1)
System\Windows\Integration\WindowsFormsHost.cs (1)
216InvalidOperationException exception = new InvalidOperationException(SR.Host_CannotRotateWindowsFormsHost);
XmlFormattersWebSite (2)
Controllers\SerializableErrorController.cs (2)
14InvalidOperationException exception = null; 20catch (InvalidOperationException invalidOperationEx)
xunit.assert (2)
Assert.cs (1)
83 catch (InvalidOperationException)
Sdk\Exceptions\DoesNotMatchException.cs (1)
38 /// <exception cref="InvalidOperationException"></exception>