21 types derived from InvalidOperationException
aspire (3)
NuGet\PackageMetadataPrefetchingValidationException.cs (1)
6internal sealed class PackageMetadataPrefetchingValidationException(string message) : InvalidOperationException(message);
Projects\AppHostServerSession.cs (1)
455private sealed class SessionNotStartedException() : InvalidOperationException(
Projects\YarnClassicNotSupportedException.cs (1)
6internal sealed class YarnClassicNotSupportedException(string message) : InvalidOperationException(message)
dotnet-svcutil-lib (1)
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\WsdlImporter.cs (1)
1914private class AlreadyFaultedException : 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
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.Maui.Essentials (1)
Types\Shared\Exceptions.shared.cs (1)
81 public class FeatureNotEnabledException : InvalidOperationException
Mono.Cecil (1)
Mono.Cecil.Cil\Symbols.cs (1)
887 public sealed class SymbolsNotMatchingException : InvalidOperationException {
NuGet.PackageManagement (1)
BuildIntegration\PackageReferenceRollbackException.cs (1)
18public class PackageReferenceRollbackException : 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\runtime\src\libraries\System.Private.CoreLib\src\System\ObjectDisposedException.cs (1)
17public class ObjectDisposedException : InvalidOperationException
src\runtime\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.netstandard21.cs (1)
13public partial class ChannelClosedException : InvalidOperationException
UIAutomationTypes (1)
System\Windows\Automation\ElementNotEnabledException.cs (1)
20public class ElementNotEnabledException : InvalidOperationException
14194 instantiations of InvalidOperationException
aspire (200)
Acquisition\IdentityResolver.cs (3)
234throw new InvalidOperationException(BuildInvalidOverrideMessage(source, VersionEnvVar, "version", value, 251throw new InvalidOperationException(BuildInvalidOverrideMessage(source, CommitEnvVar, "commit", value, 264throw new InvalidOperationException(BuildInvalidOverrideMessage(source, NuGetServiceIndexEnvVar, "nugetServiceIndexOverride", value,
Acquisition\InstallSidecarWriter.cs (1)
118throw new InvalidOperationException("The prepared sidecar update has already been committed or disposed.");
Agents\AspireSkills\AspireSkillsBundle.cs (1)
38throw new InvalidOperationException(string.Format(CultureInfo.InvariantCulture, "Aspire skills bundle does not contain skill '{0}'.", skill.Name));
Agents\AspireSkills\AspireSkillsBundleProvider.cs (37)
92?? throw new InvalidOperationException("The Aspire skills bundle staging directory must have a parent directory."); 122throw new InvalidOperationException(string.Format(CultureInfo.InvariantCulture, "Aspire skills bundle manifest was not found at '{0}'.", manifestPath)); 136throw new InvalidOperationException("Aspire skills bundle manifest is invalid.", ex); 141throw new InvalidOperationException("Aspire skills bundle manifest is empty or invalid."); 158throw new InvalidOperationException("Aspire skills bundle manifest must specify a version."); 174throw new InvalidOperationException("Aspire skills bundle manifest must contain at least one skill."); 183throw new InvalidOperationException("Aspire skills bundle manifest contains an empty skill entry."); 189throw new InvalidOperationException("Aspire skills bundle manifest contains a skill without a name."); 195throw new InvalidOperationException(string.Format(CultureInfo.InvariantCulture, "Aspire skills bundle manifest contains duplicate skill '{0}'.", skillName)); 200throw new InvalidOperationException(string.Format(CultureInfo.InvariantCulture, "Aspire skills bundle skill '{0}' must specify a description.", skillName)); 206throw new InvalidOperationException(string.Format(CultureInfo.InvariantCulture, "Aspire skills bundle skill '{0}' does not contain any files.", skillName)); 214throw new InvalidOperationException(string.Format(CultureInfo.InvariantCulture, "Aspire skills bundle skill '{0}' cannot exclude SKILL.md from installation.", skillName)); 230throw new InvalidOperationException(string.Format(CultureInfo.InvariantCulture, "Aspire skills bundle skill '{0}' contains an empty file entry.", skillName)); 236throw new InvalidOperationException(string.Format( 249throw new InvalidOperationException(string.Format(CultureInfo.InvariantCulture, "Aspire skills bundle skill '{0}' must contain SKILL.md.", skillName)); 268throw new InvalidOperationException(string.Format( 282throw new InvalidOperationException(string.Format(CultureInfo.InvariantCulture, "Aspire skills bundle file '{0}' in skill '{1}' was not found.", relativePath, skillName)); 308throw new InvalidOperationException(string.Format(CultureInfo.InvariantCulture, "Aspire skills bundle file '{0}' in skill '{1}' does not specify a SHA-512 or SHA-256 hash.", relativePath, skillName)); 313throw new InvalidOperationException(string.Format(CultureInfo.InvariantCulture, "Aspire skills bundle file '{0}' in skill '{1}' failed {2} verification.", relativePath, skillName, algorithmName)); 332throw new InvalidOperationException(string.Format(CultureInfo.InvariantCulture, "Aspire skills bundle skill '{0}' must define a frontmatter name in SKILL.md.", skillName)); 337throw new InvalidOperationException(string.Format( 347throw new InvalidOperationException(string.Format(CultureInfo.InvariantCulture, "Aspire skills bundle skill '{0}' must define a frontmatter description in SKILL.md.", skillName)); 352throw new InvalidOperationException(string.Format( 405throw new InvalidOperationException("Aspire skills bundle contains an empty relative path."); 414throw new InvalidOperationException(string.Format(CultureInfo.InvariantCulture, "Aspire skills bundle path '{0}' must be relative.", relativePath)); 420throw new InvalidOperationException(string.Format(CultureInfo.InvariantCulture, "Aspire skills bundle path '{0}' is not safe.", relativePath)); 460throw new InvalidOperationException(string.Format( 602throw new InvalidOperationException("Downloaded Aspire skills package contains multiple skill-manifest.json files."); 605throw new InvalidOperationException("Downloaded Aspire skills package does not contain skill-manifest.json."); 630throw new InvalidOperationException("Aspire skills bundle manifest must specify supported Aspire versions."); 635throw new InvalidOperationException("Aspire skills bundle manifest must specify supports.aspireCli."); 640throw new InvalidOperationException(string.Format( 650throw new InvalidOperationException(string.Format( 664throw new InvalidOperationException("Aspire skills bundle contains an empty version range."); 696_ => throw new InvalidOperationException(string.Format(CultureInfo.InvariantCulture, "Unsupported Aspire skills bundle version comparator '{0}'.", op)) 709throw new InvalidOperationException(string.Format(CultureInfo.InvariantCulture, "Aspire skills bundle contains an invalid version comparator '{0}'.", comparator)); 723throw new InvalidOperationException(string.Format(CultureInfo.InvariantCulture, "Aspire skills bundle contains an invalid version value '{0}'.", version));
Agents\AspireSkills\AspireSkillsInstaller.cs (2)
811throw new InvalidOperationException(string.Format(CultureInfo.InvariantCulture, "Could not replace Aspire skills cache directory '{0}'.", targetDir)); 924throw new InvalidOperationException(string.Format(
Agents\AspireSkills\EmbeddedAspireSkillsBundleProvider.cs (1)
71?? throw new InvalidOperationException("The Aspire skills bundle staging directory must have a parent directory.");
Agents\Hooks\TelemetryHookInstaller.cs (1)
66?? throw new InvalidOperationException($"Embedded telemetry hook script '{resourceName}' was not found in the CLI assembly.");
Agents\McpConfigFileHelper.cs (1)
88throw new InvalidOperationException(
Backchannel\AppHostAuxiliaryBackchannel.cs (1)
117throw new InvalidOperationException("Not connected to auxiliary backchannel.");
Backchannel\AppHostCliBackchannel.cs (3)
313throw new InvalidOperationException(ErrorStrings.AlreadyConnectedToBackchannel); 448throw new InvalidOperationException("Cannot reconnect: no previous connection."); 572throw new InvalidOperationException(
Backchannel\ExtensionBackchannel.cs (2)
82?? throw new InvalidOperationException(ErrorStrings.ExtensionTokenMustBeSet); 243throw new InvalidOperationException($"Already connected to {Name} backchannel.");
Backchannel\ResourceSnapshotWatcher.cs (1)
82throw new InvalidOperationException("Initial resource snapshot load has not completed. Call WaitForInitialLoadAsync first.");
Bundles\BundleService.cs (5)
95throw new InvalidOperationException( 121throw new InvalidOperationException( 861using var payloadStream = payloadProvider.OpenPayload() ?? throw new InvalidOperationException("No bundle payload available."); 898throw new InvalidOperationException($"Tar entry '{entry.Name}' would extract outside the destination directory."); 932throw new InvalidOperationException($"Symlink '{entry.Name}' targets '{entry.LinkName}' which resolves outside the destination directory.");
Certificates\CertificateGeneration\CertificateManager.cs (5)
445throw new InvalidOperationException($"The directory '{exportDir}' does not exist. Choose permissions carefully when creating it."); 713throw new InvalidOperationException("Unknown format."); 912throw new InvalidOperationException($"'{nameof(RemoveLocations.Undefined)}' is not a valid location."); 924throw new InvalidOperationException("Invalid location."); 980throw new InvalidOperationException($"Failed to create a key with a size of {minimumKeySize} bits");
Certificates\CertificateGeneration\CertificateProcessRunner.cs (1)
18using var process = Process.Start(startInfo) ?? throw new InvalidOperationException($"Failed to start process '{startInfo.FileName}'.");
Certificates\CertificateGeneration\MacOSCertificateManager.cs (4)
120throw new InvalidOperationException("There was an error trusting the certificate."); 275throw new InvalidOperationException($@"There was an error removing the certificate with thumbprint '{certificate.Thumbprint}'. 291throw new InvalidOperationException($"Can't determine the subject for the certificate with subject '{certificate.Subject}'."); 370throw new InvalidOperationException("Failed to add the certificate to the keychain. Are you running in a non-interactive session perhaps?");
Certificates\CertificateGeneration\UnixCertificateManager.cs (1)
558throw new InvalidOperationException($@"There was an error removing the certificate with thumbprint '{certificate.Thumbprint}'.");
CliExecutionContext.cs (1)
63?? throw new InvalidOperationException(ErrorStrings.UnableToRetrieveAssemblyVersion);
Commands\AddCommand.cs (1)
484_ => throw new InvalidOperationException(AddCommandStrings.UnexpectedNumberOfPackagesFound)
Commands\AgentInitCommand.cs (3)
542bundle = result.Bundle ?? throw new InvalidOperationException("Aspire skills installer returned an installed result without a bundle."); 807throw new InvalidOperationException($"Aspire skills bundle was not resolved for skill '{skill.Name}'."); 813throw new InvalidOperationException($"Skill '{skill.Name}' does not define installable files.");
Commands\AppHostLauncher.cs (1)
525throw new InvalidOperationException("Failed to create child CLI process execution.");
Commands\PipelineCommandBase.cs (7)
322throw new InvalidOperationException("Run completed without returning a backchannel.", innerException); 913throw new InvalidOperationException($"Step '{stepId}' not found for task '{activity.Data.Id}'"); 1075throw new InvalidOperationException("Prompt provided without input data."); 1128throw new InvalidOperationException($"Unsupported input type: {input.InputType}"); 1163_ => throw new InvalidOperationException($"Unsupported input type: {input.InputType}"), 1227throw new InvalidOperationException("File prompt input is missing a name."); 1328throw new InvalidOperationException($"Prompt ID '{interactionId}' is not a valid interaction ID.");
Commands\RenderCommand.cs (2)
551_ => throw new InvalidOperationException($"Unknown publish summary scenario '{scenarioKey}'.") 834?? throw new InvalidOperationException("MarkdownShowcase.txt embedded resource not found.");
Commands\UpdateCommand.cs (3)
755throw new InvalidOperationException("Unable to determine current CLI location."); 761throw new InvalidOperationException($"Unable to determine installation directory from: {currentExePath}"); 828throw new InvalidOperationException("New CLI executable failed verification test.");
Configuration\ConfigurationService.cs (1)
478throw new InvalidOperationException(
DotNet\DotNetCliRunner.cs (2)
903var ex = new InvalidOperationException(ErrorStrings.CantUseBothWatchAndNoBuild); 1134throw new InvalidOperationException(ErrorStrings.FailedToParseTemplateVersionFromStdout);
DotNet\ProcessExecution.cs (4)
90?? throw new InvalidOperationException($"{nameof(ProcessExecution)} has not been started. Call {nameof(StartAsync)} first."); 102: new InvalidOperationException($"{nameof(ProcessExecution)} has already been started."); 160throw new InvalidOperationException("Detached Unix process launch requires Aspire layout services."); 171throw new InvalidOperationException("Could not find DCP executable in the Aspire layout.");
Interaction\ConsoleInteractionService.cs (4)
242throw new InvalidOperationException(InteractionServiceStrings.InteractiveInputNotSupported); 313throw new InvalidOperationException(InteractionServiceStrings.InteractiveInputNotSupported); 385throw new InvalidOperationException(InteractionServiceStrings.InteractiveInputNotSupported); 678throw new InvalidOperationException(InteractionServiceStrings.InteractiveInputNotSupported);
Interaction\ExtensionInteractionService.cs (1)
252throw new InvalidOperationException(errorMessage);
Layout\LayoutProcessRunner.cs (2)
55throw new InvalidOperationException($"Failed to start process: {toolPath}"); 97throw new InvalidOperationException($"Failed to start process: {toolPath}");
NuGet\BundleNuGetPackageCache.cs (2)
144throw new InvalidOperationException("Bundle layout not found. Cannot perform NuGet search in bundle mode."); 150throw new InvalidOperationException("aspire-managed not found in layout.");
NuGet\BundleNuGetService.cs (4)
86throw new InvalidOperationException("Bundle layout not found. Cannot perform NuGet restore in bundle mode."); 92throw new InvalidOperationException("aspire-managed not found in layout."); 208throw new InvalidOperationException($"Package restore failed: {error}"); 257throw new InvalidOperationException($"Manifest creation failed: {error}");
Packaging\NuGetConfigMerger.cs (2)
935throw new InvalidOperationException($"Multiple NuGet.config files found in '{directory.FullName}' differing only by case."); 950var configuration = doc.Root ?? throw new InvalidOperationException("Invalid NuGet config structure");
Packaging\PackagingService.cs (2)
683throw new InvalidOperationException(string.Format( 718throw new InvalidOperationException(string.Format(
Processes\IsolatedProcess.cs (8)
140public Process Process => _process ?? throw new InvalidOperationException($"{nameof(IsolatedProcess)} has not been started."); 146public int Id => _id ?? throw new InvalidOperationException($"{nameof(IsolatedProcess)} has not been started."); 197throw new InvalidOperationException($"{nameof(BeginOutputReadLine)} has already been called."); 216throw new InvalidOperationException($"{nameof(BeginErrorReadLine)} has already been called."); 231?? throw new InvalidOperationException($"{nameof(IsolatedProcess)} has not been started."), 233_ => throw new InvalidOperationException($"{nameof(IsolatedProcess)} has not been started.") 316: new InvalidOperationException($"{nameof(IsolatedProcess)} has already been started."); 396?? throw new InvalidOperationException($"Failed to start child process: {startInfo.FileName}");
Processes\IsolatedProcess.Unix.cs (4)
17throw new InvalidOperationException("Unix detached process launch requires a DCP executable path."); 48?? throw new InvalidOperationException("Failed to start DCP fork-process."); 62throw new InvalidOperationException($"DCP fork-process did not return a child process ID. DCP fork-process exited with code {dcpProcess.ExitCode}. stderr: '{stderr.Trim()}'"); 70throw new InvalidOperationException($"DCP fork-process did not return a valid child process ID. stdout: '{trimmedStdout}'");
Processes\IsolatedProcess.Windows.cs (5)
137var capturedProcessHandle = processHandle ?? throw new InvalidOperationException("Windows process handle was not initialized."); 236var capturedProcessHandle = processHandle ?? throw new InvalidOperationException("Windows process handle was not initialized."); 276_ => throw new InvalidOperationException($"Unexpected WaitForSingleObject result: 0x{waitResult:X8}"), 289throw new InvalidOperationException("Process has not exited; cannot read ExitCode."); 315throw new InvalidOperationException($"Cannot read {memberName} after the IsolatedProcess has been disposed.");
Profiling\ProfileCaptureService.cs (3)
79throw new InvalidOperationException(DashboardCommandStrings.ManagedBinaryNotFound); 120throw new InvalidOperationException(string.Format(CultureInfo.CurrentCulture, DashboardCommandStrings.DashboardFailedToStart, ex.Message), ex); 281throw new InvalidOperationException(string.Format(CultureInfo.CurrentCulture, DashboardCommandStrings.DashboardExitedWithError, exitCode));
Program.cs (1)
791throw new InvalidOperationException($"Unexpected result: {result}");
Projects\AppHostRpcClient.cs (3)
68throw new InvalidOperationException("Failed to authenticate to the AppHost server."); 209throw new InvalidOperationException($"Failed to connect to RPC server at {socketPath}"); 237throw new InvalidOperationException($"Failed to connect to RPC server at {socketPath}");
Projects\AppHostServerClosureSnapshots.cs (2)
120throw new InvalidOperationException($"Manifest source file '{normalizedSourcePath}' does not exist."); 246throw new InvalidOperationException($"Manifest entry '{entry.RelativePath}' does not contain enough information to compute a fingerprint.");
Projects\AppHostServerProject.cs (1)
68throw new InvalidOperationException(
Projects\AppHostServerSession.cs (2)
173throw new InvalidOperationException("AppHostServerSession has already been started."); 331throw new InvalidOperationException(
Projects\DotNetAppHostProject.cs (1)
2401new InvalidOperationException("The app host build failed."));
Projects\DotNetBasedAppHostServerProject.cs (1)
205throw new InvalidOperationException($"Integration '{integration.Name}' is neither a project reference nor a package reference (both Version and ProjectPath are null).");
Projects\FallbackProjectParser.cs (1)
79throw new InvalidOperationException($"Invalid project file format: {projectFile.FullName}");
Projects\GuestAppHostProject.cs (8)
601new InvalidOperationException($"Failed to install {DisplayName} dependencies.")); 733var error = new InvalidOperationException($"The {DisplayName} apphost failed."); 1071new InvalidOperationException("The app host preparation failed.")); 1145new InvalidOperationException("The app host server exited unexpectedly.")); 1175new InvalidOperationException($"Failed to install {DisplayName} dependencies.")); 1226var error = new InvalidOperationException($"The {DisplayName} apphost failed."); 2214throw new InvalidOperationException("The certificate bundle environment variable name cannot be empty."); 2220throw new InvalidOperationException("The certificate bundle cache file prefix contains invalid characters.");
Projects\JavaAppHostToolchainResolver.cs (3)
307throw new InvalidOperationException( 478throw new InvalidOperationException( 646?? throw new InvalidOperationException("The Java runtime spec has no compile step to adapt for a build tool.");
Projects\PrebuiltAppHostServer.cs (8)
137throw new InvalidOperationException("aspire-managed not found in layout."); 182throw new InvalidOperationException( 823throw new InvalidOperationException( 912throw new InvalidOperationException($"Package reference '{p.Name}' is missing a version."); 997throw new InvalidOperationException(reason); 1552throw new InvalidOperationException($"Integration closure manifest file '{filePath}' was not found after build."); 1566throw new InvalidOperationException($"Integration closure metadata line '{line}' is invalid."); 1585throw new InvalidOperationException($"Integration assets file '{assetsFilePath}' was not found after build.");
Projects\ProcessGuestLauncher.cs (1)
65var resolvedCommandPath = resolvedCommand ?? throw new InvalidOperationException("Command resolution succeeded without a resolved command path.");
Projects\ProjectUpdater.cs (1)
117_ => throw new InvalidOperationException(UpdateCommandStrings.UnexpectedCodePath)
src\Shared\BackchannelConstants.cs (1)
562throw new InvalidOperationException(
src\Shared\CircularBuffer.cs (1)
179throw 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\ConsoleLogs\SharedAIHelpers.cs (2)
93var logEntry = logRecords.FirstOrDefault() ?? throw new InvalidOperationException("No log entry found in OTLP data."); 142var trace = traces.FirstOrDefault() ?? throw new InvalidOperationException("No trace found in OTLP data.");
src\Shared\IConfigurationExtensions.cs (4)
135throw new InvalidOperationException($"Error parsing URIs from configuration value '{key}'.", ex); 172throw new InvalidOperationException($"Error parsing URIs from configuration value '{key}'.", ex); 202throw new InvalidOperationException($"Unknown {typeof(T).Name} value \"{value}\". Valid values are {string.Join(", ", Enum.GetNames(typeof(T)))}."); 222throw new InvalidOperationException($"Missing required configuration for {key}. Valid values are {string.Join(", ", Enum.GetNames(typeof(T)))}.");
src\Shared\IntegrationPackageProbeManifest.cs (6)
112throw new InvalidOperationException($"Integration package probe manifest '{normalizedManifestPath}' does not exist."); 333throw new InvalidOperationException($"Integration package probe manifest path '{normalizedPath}' does not exist."); 352throw new InvalidOperationException(invalidPathMessage, ex); 367throw new InvalidOperationException($"Integration package probe manifest entry is missing required property '{propertyName}'."); 423throw new InvalidOperationException($"Integration package probe manifest entry is missing required property '{propertyName}'."); 431throw new InvalidOperationException($"Integration package probe manifest property '{propertyName}' must be a string.");
src\Shared\Mcp\McpIconHelper.cs (1)
32throw new InvalidOperationException($"Could not find embedded resource '{resourceName}' in assembly '{assembly.FullName}'.");
src\Shared\TimeProviderExtensions.cs (1)
29throw new InvalidOperationException("Unable to convert unspecified DateTime to local time.");
src\Shared\UserSecrets\UserSecretsPathHelper.cs (1)
45throw new InvalidOperationException($"Missing user secrets location {userSecretsFallbackDir}");
Telemetry\LinuxMachineInformationProvider.cs (1)
35throw new InvalidOperationException("linux: Unable to get UserProfile or $HOME folder.");
Telemetry\MacOSXMachineInformationProvider.cs (1)
40throw new InvalidOperationException("macOS: Unable to get UserProfile or $HOME folder.");
Templating\CliTemplateFactory.cs (2)
317throw new InvalidOperationException($"No embedded template resources found for '{templateRoot}'."); 333?? throw new InvalidOperationException($"Embedded template resource not found: {resourceName}");
Templating\ConditionalBlockProcessor.cs (1)
74throw new InvalidOperationException(
Utils\ArchiveHelper.cs (3)
52throw new InvalidOperationException($"Zip entry '{entry.FullName}' would extract outside the destination directory."); 92throw new InvalidOperationException($"Tar entry '{entry.Name}' would extract outside the destination directory."); 126throw new InvalidOperationException($"Symlink '{entry.Name}' targets '{entry.LinkName}' which resolves outside the destination directory.");
Utils\CliDownloader.cs (2)
45throw new InvalidOperationException($"Channel '{channelName}' does not support CLI downloads."); 217throw new InvalidOperationException($"Checksum validation failed. Expected: {expectedChecksum}, Actual: {actualChecksum}");
Utils\ConfigurationHelper.cs (1)
277throw new InvalidOperationException(
Utils\ConsoleActivityLogger.cs (1)
788throw new InvalidOperationException(
Utils\EnvironmentChecker\DcpConnectionChecker.cs (2)
275throw new InvalidOperationException(DoctorCommandStrings.DcpStartFailedMessage); 387throw new InvalidOperationException(
Utils\EnvironmentChecker\DcpKubeconfig.cs (1)
75throw new InvalidOperationException(DoctorCommandStrings.DcpKubeconfigMissingServerDetails);
Utils\ReparsePoint.cs (1)
67throw new InvalidOperationException(
Utils\VersionHelper.cs (1)
73return PackageUpdateHelpers.GetCurrentAssemblyVersion() ?? throw new InvalidOperationException(ErrorStrings.UnableToRetrieveAssemblyVersion);
aspire-managed (9)
NuGet\Commands\NuGetPackageAssetResolver.cs (2)
57throw new InvalidOperationException("Failed to parse project.assets.json"); 66throw new InvalidOperationException(
NuGet\Commands\RestoreCommand.cs (1)
341?? throw new InvalidOperationException($"Embedded runtime identifier graph resource '{RuntimeIdentifierGraphResourceName}' was not found.");
src\Shared\IntegrationPackageProbeManifest.cs (6)
112throw new InvalidOperationException($"Integration package probe manifest '{normalizedManifestPath}' does not exist."); 333throw new InvalidOperationException($"Integration package probe manifest path '{normalizedPath}' does not exist."); 352throw new InvalidOperationException(invalidPathMessage, ex); 367throw new InvalidOperationException($"Integration package probe manifest entry is missing required property '{propertyName}'."); 423throw new InvalidOperationException($"Integration package probe manifest entry is missing required property '{propertyName}'."); 431throw new InvalidOperationException($"Integration package probe manifest property '{propertyName}' must be a string.");
Aspire.Acquisition.Tests (10)
Scripts\Common\RealGitHubPRFixture.cs (2)
69?? throw new InvalidOperationException("Failed to parse PR list JSON"); 81throw new InvalidOperationException(
Scripts\Common\ScriptFunctionCommand.cs (1)
61?? throw new InvalidOperationException("Could not find repository root");
Scripts\Common\ScriptHostFixture.cs (2)
36?? throw new InvalidOperationException("Could not find repository root"); 82throw new InvalidOperationException($"Script host failed to start: HTTP {response.StatusCode}");
Scripts\Common\ScriptToolCommand.cs (1)
65?? throw new InvalidOperationException("Could not find repository root");
Scripts\LocalHiveScriptFunctionTests.cs (1)
108?? throw new InvalidOperationException("Could not find repository root");
Scripts\PipedInstallTests.cs (2)
126?? throw new InvalidOperationException("Could not find repository root"); 148?? throw new InvalidOperationException("Could not find repository root");
Scripts\PRScriptInstallerModeTests.cs (1)
224throw new InvalidOperationException("Mock winget is Windows-only (winget itself is Windows-only).");
Aspire.Azure.AI.Inference (2)
AspireAzureAIInferenceExtensions.cs (2)
148throw 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."); 401throw new InvalidOperationException($"A EmbeddingsClient 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)
101throw 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)
107throw 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)
24throw 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.Files.DataLake (3)
AspireDataLakeExtensions.DataLakeComponent.cs (1)
32throw new InvalidOperationException(
AspireDataLakeExtensions.DataLakeFileSystemComponent.cs (2)
31throw new InvalidOperationException( 38throw new InvalidOperationException(
Aspire.Azure.Storage.Queues (3)
AspireQueueStorageExtensions.cs (3)
192throw 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."); 240throw new InvalidOperationException($"The connection string '{connectionName}' does not exist or is missing the queue name."); 246throw new InvalidOperationException($"A QueueClient 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.EndToEnd.Tests (145)
BannerTests.cs (1)
113throw new InvalidOperationException(
CentralPackageManagementTests.cs (5)
98throw new InvalidOperationException($"File {directoryPackagesPropsPath} unexpectedly contains: Aspire.Hosting.AppHost"); 209throw new InvalidOperationException( 247throw new InvalidOperationException( 334throw new InvalidOperationException($"File {appHostCsprojPath} unexpectedly contains a version-pinned PackageReference for Aspire.Hosting.Redis"); 338throw new InvalidOperationException($"File {directoryPackagesPropsPath} unexpectedly does not contain the central PackageVersion for Aspire.Hosting.Redis");
ChannelUpdateWorkflowTests.cs (6)
511throw new InvalidOperationException($"aspire.config.json has no 'appHost' object. Path: {aspireConfigPath}"); 517throw new InvalidOperationException($"aspire.config.json#appHost does not contain a string 'path' entry. Path: {aspireConfigPath}"); 521?? throw new InvalidOperationException($"aspire.config.json#appHost.path was null. Path: {aspireConfigPath}"); 535throw new InvalidOperationException( 542throw new InvalidOperationException( 547?? throw new InvalidOperationException(
ConfigDiscoveryTests.cs (3)
105throw new InvalidOperationException( 111throw new InvalidOperationException( 186throw new InvalidOperationException("Multiple apphosts incorrectly detected");
ConfigHealingTests.cs (3)
78throw new InvalidOperationException( 88throw new InvalidOperationException( 95throw new InvalidOperationException(
ConfigMigrationTests.cs (4)
65throw new InvalidOperationException($"Expected file does not exist: {filePath}"); 73throw new InvalidOperationException( 95throw new InvalidOperationException( 399throw new InvalidOperationException(
DocsCommandE2ETests.cs (2)
72throw new InvalidOperationException("Interactive docs rendering fell back to plain-text link output."); 77throw new InvalidOperationException("Interactive docs rendering showed raw markdown syntax.");
DoctorCommandTests.cs (1)
95throw new InvalidOperationException(
DotnetToolSmokeTests.cs (2)
93throw new InvalidOperationException( 150throw new InvalidOperationException(
EmulatedLocalReleaseBuildTests.cs (4)
322: throw new InvalidOperationException($"Could not find an Aspire.AppHost.Sdk reference in {csprojPath}."); 346: throw new InvalidOperationException($"Could not find an Aspire.* Redis PackageReference in {csprojPath}."); 366throw new InvalidOperationException($"Could not find sdk.version in {configPath}."); 395throw new InvalidOperationException($"Could not find an Aspire.* Redis entry in packages of {configPath}.");
EmulatedReleasedBuildTests.cs (2)
235: throw new InvalidOperationException($"Could not find an Aspire.AppHost.Sdk reference in {csprojPath}."); 255throw new InvalidOperationException($"Could not find sdk.version in {configPath}.");
EmulatedStagingBuildTests.cs (3)
299: throw new InvalidOperationException($"Could not find an Aspire.AppHost.Sdk reference in {csprojPath}."); 323throw new InvalidOperationException($"Could not find sdk.version in {configPath}."); 350throw new InvalidOperationException($"Could not find packages.{packageId} in {configPath}.");
Helpers\CliE2EAutomatorHelpers.cs (13)
132throw new InvalidOperationException("Preinstalled CLI mode is only supported for non-Docker test environments."); 183throw new InvalidOperationException($"Unable to derive a waitable suffix from {nameof(StopCommandStrings.AppHostStoppedSuccessfully)}."); 335throw new InvalidOperationException($"aspire new failed while creating {languageDisplayName} empty AppHost project '{projectName}'."); 338throw new InvalidOperationException($"Unexpected aspire new result while creating {languageDisplayName} empty AppHost project '{projectName}': {result}."); 362throw new InvalidOperationException($"Unexpected AppHost language prompt selection: {languagePromptSelection}."); 415var archivePath = strategy.ArchivePath ?? throw new InvalidOperationException("LocalHive strategy is missing the archive path."); 432var archiveDir = strategy.ArchiveDir ?? throw new InvalidOperationException("LocalArchive strategy is missing the archive directory."); 451throw new InvalidOperationException( 661: throw new InvalidOperationException($"Could not determine Aspire version marker from '{versionsPropsPath}'."); 816throw new InvalidOperationException( 880throw new InvalidOperationException( 911throw new InvalidOperationException( 997throw new InvalidOperationException(
Helpers\CliE2ETestHelpers.cs (18)
74throw new InvalidOperationException("GITHUB_PR_HEAD_SHA must be set when running CLI E2E tests in pull request context."); 79throw new InvalidOperationException($"GITHUB_PR_HEAD_SHA must be a 40-character commit SHA, got: '{commitSha}'."); 276throw new InvalidOperationException("A prebuilt CLI E2E image was selected, but Dockerfile configuration was also set. Prebuilt-image runs must not fall back to Dockerfile builds."); 294throw new InvalidOperationException($"{DotNetImageEnvironmentVariableName} must be set when the prebuilt CLI E2E .NET image is required."); 299throw new InvalidOperationException($"{PolyglotImageEnvironmentVariableName} must be set when the prebuilt CLI E2E polyglot image is required."); 304throw new InvalidOperationException($"{PolyglotJavaImageEnvironmentVariableName} must be set when the prebuilt CLI E2E Java image is required."); 456using var process = Process.Start(startInfo) ?? throw new InvalidOperationException("Failed to start docker build process."); 463throw new InvalidOperationException( 506using var process = Process.Start(startInfo) ?? throw new InvalidOperationException("Failed to start docker build process."); 513throw new InvalidOperationException( 615throw new InvalidOperationException( 936?? throw new InvalidOperationException("MajorVersion not found in eng/Versions.props"); 938?? throw new InvalidOperationException("MinorVersion not found in eng/Versions.props"); 940?? throw new InvalidOperationException("PatchVersion not found in eng/Versions.props"); 1016throw new InvalidOperationException("Local source-built E2E tests require packed Aspire packages. Run './build.sh --bundle --pack' first."); 1032throw new InvalidOperationException("Local source-built E2E tests could not determine the Aspire SDK version from packed packages."); 1041throw new InvalidOperationException("Local source-built E2E tests require packed Aspire.Hosting packages. Run './build.sh --bundle --pack' first."); 1050throw new InvalidOperationException($"Local source-built E2E tests require packed {prefix.TrimEnd('.')} packages. Run './build.sh --bundle --pack' first.");
Helpers\TypeScriptAppHostToolchainTestHelpers.cs (1)
38?? throw new InvalidOperationException($"Failed to parse package.json at '{packageJsonPath}'.");
JavaCodegenValidationTests.cs (7)
55throw new InvalidOperationException($".aspire/modules directory was not created at {modulesDir}"); 69throw new InvalidOperationException("Baseline SDK already exposes addSqlServer; test cannot verify refresh behavior after adding Aspire.Hosting.SqlServer."); 99throw new InvalidOperationException($"Expected generated file not found: {filePath}"); 105throw new InvalidOperationException($"Generated file is empty: {filePath}"); 112throw new InvalidOperationException("IDistributedApplicationBuilder.java does not contain addRedis from Aspire.Hosting.Redis"); 116throw new InvalidOperationException("IDistributedApplicationBuilder.java does not contain addSqlServer from Aspire.Hosting.SqlServer; restore did not refresh an already-populated .aspire/modules"); 122throw new InvalidOperationException(".aspire/modules/.codegen-hash did not change after adding Aspire.Hosting.SqlServer and running aspire restore.");
JsReactTemplateTests.cs (1)
44throw new InvalidOperationException(
McpDocsE2ETests.cs (1)
34throw new InvalidOperationException($"Could not find CLI project at: {cliProjectPath}");
NewWithAgentInitTests.cs (1)
120throw new InvalidOperationException(
ProjectReferenceTests.cs (1)
117?? throw new InvalidOperationException("Expected aspire.config.json to contain a JSON object.");
SelfUpdateChannelPersistenceTests.cs (1)
93?? throw new InvalidOperationException($"Unable to read {path}.");
SmokeTests.cs (10)
55throw new InvalidOperationException( 99throw new InvalidOperationException("Polyglot AppHost failed to start with a *.dev.localhost resource service endpoint."); 135throw new InvalidOperationException($"Expected stable Aspire.AppHost.Sdk version, got '{appHostSdkVersion}' in {appHostPath}."); 193: throw new InvalidOperationException($"Could not find Aspire.AppHost.Sdk directive in {appHostPath}."); 213throw new InvalidOperationException($"Expected stable Aspire SDK version, got '{sdkVersion}' in {configPath}."); 220throw new InvalidOperationException($"Expected JSON property 'path' in {configPath} to be 'apphost.mts' or 'apphost.ts', got '{appHostPath}'."); 233throw new InvalidOperationException($"Expected JSON object property '{propertyName}' in {configPath}."); 244throw new InvalidOperationException($"Expected JSON property '{propertyName}' in {configPath} to be '{expectedValue}', got '{actualValue}'."); 253throw new InvalidOperationException($"Expected JSON string property '{propertyName}' in {configPath}."); 257?? throw new InvalidOperationException($"Expected JSON string property '{propertyName}' in {configPath} to be non-null.");
TerminalCommandTests.cs (1)
45throw new InvalidOperationException($"Could not find '{oldFrontendLine}' in {appHostPath}.");
tests\Shared\CliInstallStrategy.cs (5)
140throw new InvalidOperationException($"GITHUB_SHA contains an unexpected value: '{sha}'. Expected a hex commit SHA or 'main'."); 344throw new InvalidOperationException("PullRequest strategy requires GITHUB_PR_NUMBER and GITHUB_PR_HEAD_SHA to be set."); 541throw new InvalidOperationException("Preinstalled CLI mode is only supported for non-Docker test environments."); 557throw new InvalidOperationException("LocalArchive mode requires ArchiveDir to be set."); 575throw new InvalidOperationException($"Unknown install mode: {Mode}");
tests\Shared\CliPackageDiscovery.cs (3)
25?? throw new InvalidOperationException( 44throw new InvalidOperationException( 77throw new InvalidOperationException(
tests\Shared\Hex1bAutomatorTestHelpers.cs (3)
256throw new InvalidOperationException( 452throw new InvalidOperationException($"Command failed with error prompt [{counter.Value} ERR:*] while waiting for the agent init prompt or success prompt."); 772throw new InvalidOperationException($"Pipeline failed unexpectedly. Terminal output:{Environment.NewLine}{terminalOutput}");
tests\Shared\TemporaryWorkspace.cs (1)
51throw new InvalidOperationException($"Failed to initialize git repository: {error}");
TypeScriptCodegenValidationTests.cs (15)
84throw new InvalidOperationException( 96throw new InvalidOperationException($".aspire/modules directory was not created at {modulesDir}"); 105throw new InvalidOperationException($"Expected generated file not found: {filePath}"); 111throw new InvalidOperationException($"Generated file is empty: {filePath}"); 118throw new InvalidOperationException("aspire.mts does not contain addRedis from Aspire.Hosting.Redis"); 123throw new InvalidOperationException("aspire.mts does not contain addSqlServer from Aspire.Hosting.SqlServer"); 167throw new InvalidOperationException($".aspire/modules directory was not created at {modulesDir}"); 173throw new InvalidOperationException($"Expected generated file not found: {aspireModulePath}"); 179throw new InvalidOperationException("aspire.mts did not contain the expected base exports before adding a new integration."); 184throw new InvalidOperationException("Baseline SDK already exposes an addRedis API; test cannot verify refresh behavior after adding Redis."); 209throw new InvalidOperationException($"Expected generated file not found: {filePath}"); 215throw new InvalidOperationException($"Generated file is empty: {filePath}"); 222throw new InvalidOperationException("aspire.mts no longer contains the original base exports after restore."); 229throw new InvalidOperationException("aspire.config.json did not record Aspire.Hosting.Redis after aspire add."); 235throw new InvalidOperationException(".aspire/modules/.codegen-hash did not change after adding Aspire.Hosting.Redis and running aspire restore.");
TypeScriptEmptyAppHostTemplateTests.cs (2)
179?? throw new InvalidOperationException($"Unable to read {configPath}."); 192?? throw new InvalidOperationException("Expected aspire.config.json to contain sdk.version.");
TypeScriptLegacyAppHostTests.cs (7)
175throw new InvalidOperationException( 184throw new InvalidOperationException( 194throw new InvalidOperationException($"Expected generated file not found: {filePath}"); 200throw new InvalidOperationException($"Generated file is empty: {filePath}"); 208throw new InvalidOperationException( 221throw new InvalidOperationException( 233throw new InvalidOperationException(
TypeScriptMigrateAppHostTests.cs (8)
160throw new InvalidOperationException( 168throw new InvalidOperationException( 175throw new InvalidOperationException( 184throw new InvalidOperationException( 192throw new InvalidOperationException( 201throw new InvalidOperationException($"Expected regenerated file not found: {filePath}"); 209throw new InvalidOperationException( 220throw new InvalidOperationException(
TypeScriptPolyglotTests.cs (2)
144throw new InvalidOperationException( 456throw new InvalidOperationException(
TypeScriptReusablePackageTests.cs (1)
96?? throw new InvalidOperationException("Expected aspire.config.json to contain sdk.version.");
TypeScriptStarterSmokeTests.cs (5)
56throw new InvalidOperationException($".aspire/modules directory was not created at {modulesDir}"); 62throw new InvalidOperationException($"Expected generated file not found: {aspireModulePath}"); 113throw new InvalidOperationException($"aspire.config.json is missing 'sdk.version': {configPath}"); 139throw new InvalidOperationException( 147throw new InvalidOperationException(
TypeScriptStarterTemplateTests.cs (2)
43throw new InvalidOperationException($".aspire/modules directory was not created at {modulesDir}"); 49throw new InvalidOperationException($"Expected generated file not found: {aspireModulePath}");
Aspire.Cli.Tests (222)
Agents\AspireSkillsInstallerTests.cs (4)
40var handler = new MockHttpMessageHandler(_ => throw new InvalidOperationException("HTTP must not be called when remote fetch is disabled.")); 521var handler = new MockHttpMessageHandler(_ => throw new InvalidOperationException("HTTP must not be called when remote fetch is disabled.")); 563var handler = new MockHttpMessageHandler(_ => throw new InvalidOperationException("HTTP must not be called when remote fetch is disabled.")); 1388var handler = new MockHttpMessageHandler(_ => throw new InvalidOperationException("HTTP must not be called when remote fetch is disabled."));
Agents\CommonAgentApplicatorsTests.cs (1)
165throw new InvalidOperationException($"Skill '{skill.Name}' does not define installable files.");
Agents\TelemetryHookConfiguratorTests.cs (1)
274throw new InvalidOperationException("No Aspire hook entry was found.");
Backchannel\AppHostConnectionResolverTests.cs (1)
380throw new InvalidOperationException("AppHosts in another worktree must not be offered when selection is restricted.")
Backchannel\ExtensionBackchannelTests.cs (1)
31var setupException = new InvalidOperationException("Simulated setup failure.");
Backchannel\OrphanedAppHostCollectorTests.cs (2)
293ThrowSelector = info => info?.ProcessId == 1 ? new InvalidOperationException("boom") : null, 336ScanAsyncCallback = _ => throw new InvalidOperationException("scan boom")
Commands\AddCommandTests.cs (30)
67runner.SearchPackagesAsyncCallback = (_, _, _, _, _, _, _, _, _, _) => throw new InvalidOperationException("Should not search packages for the removed --json alias."); 98runner.SearchPackagesAsyncCallback = (_, _, _, _, _, _, _, _, _, _) => throw new InvalidOperationException("Should not search packages when the required search query is missing."); 147throw new InvalidOperationException("Should not prompt for integration when listing integrations."); 152throw new InvalidOperationException("Should not prompt for version when listing integrations."); 242runner.SearchPackagesAsyncCallback = (_, _, _, _, _, _, _, _, _, _) => throw new InvalidOperationException("Search failed."); 273UseOrFindAppHostProjectFileWithBehaviorAsyncCallback = (_, _, _, _) => throw new InvalidOperationException("Should not locate an AppHost when searching integrations.") 966UseOrFindAppHostProjectFileWithBehaviorAsyncCallback = (_, _, _, _) => throw new InvalidOperationException("Should not locate an AppHost when searching integrations.") 1084throw new InvalidOperationException("Should not have been prompted for integration packages."); 1161throw new InvalidOperationException("Should not have been prompted for integration packages."); 1167throw new InvalidOperationException("Should not have been prompted for integration version."); 1245throw new InvalidOperationException("Should not have been prompted for integration packages."); 1251throw new InvalidOperationException("Should not have been prompted for integration version."); 1324throw new InvalidOperationException("Should not have been prompted for integration version."); 1404throw new InvalidOperationException("Should not have been prompted for integration selection."); 1409throw new InvalidOperationException("Should not have been prompted for integration version."); 1492throw new InvalidOperationException("Should not have been prompted for integration selection."); 1558throw new InvalidOperationException("Should not have been prompted for integration version."); 1632throw new InvalidOperationException("Should not have been prompted for integration version."); 1708throw new InvalidOperationException("Should not have been prompted for integration version."); 1778throw new InvalidOperationException("Should not have been prompted for integration version."); 1850throw new InvalidOperationException("Should not have been prompted for integration selection."); 1855throw new InvalidOperationException("Should not have been prompted for integration version."); 2549throw new InvalidOperationException("The channel matrix must resolve deterministically without prompting."); 2904throw new InvalidOperationException("Should not prompt when the current CLI version is available in the local package override."); 2967throw new InvalidOperationException(promptFailureMessage); 3118GetPackagesAsyncCallback = (_, _, _, _, _, _, _) => throw new InvalidOperationException("Polyglot filtering must be skipped when --all is passed.") 4126throw new InvalidOperationException("Should not have been prompted for integration version."); 4210throw new InvalidOperationException("Should not have been prompted for integration version."); 4298throw new InvalidOperationException("Should not have been prompted for integration version."); 4386throw new InvalidOperationException("Should not have been prompted for integration version.");
Commands\AgentInitCommandTests.cs (1)
981=> throw new InvalidOperationException(message);
Commands\AppHostLauncherTests.cs (12)
642}) ?? throw new InvalidOperationException("Failed to start test child process."); 652}) ?? throw new InvalidOperationException("Failed to start test DCP monitor process."); 716throw new InvalidOperationException("Expected the cancelled token to stop launch."); 746throw new InvalidOperationException("start failed"); 787var startedProcess = harness.ProcessFactory.StartedProcess ?? throw new InvalidOperationException("Expected child process to start."); 1228var hash = AppHostHelper.ExtractHashFromSocketPath(socketPrefix) ?? throw new InvalidOperationException("Expected socket hash."); 1293CreatedExecution?.EnvironmentVariables ?? throw new InvalidOperationException("Expected a detached process execution."); 1349StartedProcess = Process.Start(CreateProcessStartInfo(workingDirectory)) ?? throw new InvalidOperationException("Failed to start test child process."); 1383_ => throw new InvalidOperationException($"Unexpected child process mode: {Mode}") 1391_ => throw new InvalidOperationException($"Unexpected child process mode: {Mode}") 1408throw new InvalidOperationException("Expected child arguments to include --log-file."); 1443_inner ?? throw new InvalidOperationException("Test detached process has not been started.");
Commands\BaseCommandTests.cs (1)
392ScanAsyncCallback = _ => throw new InvalidOperationException("Something went wrong")
Commands\DoCommandTests.cs (2)
411_ => throw new InvalidOperationException() 693new FailedToConnectBackchannelConnection("The AppHost process exited unexpectedly with exit code 1", new InvalidOperationException()));
Commands\DoctorCommandTests.cs (1)
362throw new InvalidOperationException("invalid aspire.config.json")
Commands\ExtensionInternalCommandTests.cs (4)
419throw new InvalidOperationException("Something went wrong"); 424throw new InvalidOperationException("Something went wrong"); 433throw new InvalidOperationException("Something went wrong"); 441throw new InvalidOperationException("Something went wrong");
Commands\InitCommandTests.cs (6)
84throw new InvalidOperationException("GetSolutionProjectsAsync should not be called by init."); 130throw new InvalidOperationException("GetSolutionProjectsAsync should not be called by init."); 905throw new InvalidOperationException("InstallTemplateAsync should not run when channel search fails."); 1478throw new InvalidOperationException( 1488throw new InvalidOperationException( 2161var root = XDocument.Load(nugetConfigPath).Root ?? throw new InvalidOperationException("Empty NuGet.config.");
Commands\LogsCommandTests.cs (4)
1251throw new InvalidOperationException("The line-based console logs RPC should not be used when batched logs are available."); 1288connection.GetConsoleLogsHandler = static (_, _) => throw new InvalidOperationException("Old AppHosts should use the legacy console log RPC."); 1327throw new InvalidOperationException("All-resource logs should use the legacy logs RPC."); 1376throw new InvalidOperationException("All-resource logs should use the legacy logs RPC.");
Commands\NewCommandChannelResolutionTests.cs (2)
48throw new InvalidOperationException( 58throw new InvalidOperationException(
Commands\NewCommandTemplateConfigPersistenceTests.cs (1)
339throw new InvalidOperationException($"Unknown template contract: {testCase.Contract}");
Commands\NewCommandTests.cs (9)
274throw new InvalidOperationException("This should not be called"); 306throw new InvalidOperationException("This should not be called"); 340throw new InvalidOperationException("Should not prompt for version when --channel is specified"); 421throw new InvalidOperationException("Should not prompt for version when --channel is specified"); 499throw new InvalidOperationException("Should not prompt for version when a PR channel contains the current CLI version."); 577throw new InvalidOperationException("This should not be called"); 609throw new InvalidOperationException("This should not be called"); 1316GetTemplatePackagesAsyncCallback = (_, _, _, _) => throw new InvalidOperationException("Local package sources should be enumerated directly.") 3554throw new InvalidOperationException("InstallTemplateAsync should not run when channel search fails.");
Commands\PublishCommandTests.cs (1)
144backchannelCompletionSource?.SetException(new InvalidOperationException("AppHost process has exited unexpectedly. Use --debug to see more details."));
Commands\ResourceCommandTests.cs (5)
88PromptForSelectionCallback = (_, _, _, _) => throw new InvalidOperationException("Help should not prompt for an AppHost.") 109ScanAsyncCallback = _ => throw new InvalidOperationException("Scan failed.") 136GetResourceSnapshotsHandler = _ => throw new InvalidOperationException("Snapshot failed.") 163throw new InvalidOperationException("Help should not prompt for an AppHost."); 206throw new InvalidOperationException("Help should not prompt for an AppHost.");
Commands\RunCommandTests.cs (2)
1499throw new InvalidOperationException("RunAsync failed before returning an exit code."); 4308throw new InvalidOperationException("Extension handoff failed.");
Commands\StopCommandTests.cs (5)
286throw new InvalidOperationException("Explicit file stop should not require project validation.") 319throw new InvalidOperationException("AppHosts in another worktree must not be offered by aspire stop without --apphost or --all."); 482throw new InvalidOperationException("Explicit file force stop should not require project validation.") 600throw new InvalidOperationException("Explicit file force stop should not require project validation.") 996EnsureExtractedException = new InvalidOperationException("Bundle extraction failed.")
Commands\UpdateCommandTests.cs (2)
1280_ => throw new InvalidOperationException($"Unexpected entry point: {entryPoint}") 1358throw new InvalidOperationException($"Unexpected entry point: {entryPoint}");
DotNet\DotNetCliRunnerTests.cs (1)
2178using var process = Process.Start(processStartInfo) ?? throw new InvalidOperationException("Failed to start dotnet msbuild.");
DotNet\ProcessExecutionTests.cs (1)
253throw new InvalidOperationException("simulated DCP failure"));
Mcp\Docs\DocsFetcherTests.cs (1)
305new InvalidOperationException("Invalid state")
Mcp\Docs\DocsIndexServiceTests.cs (2)
796var fetcher = new ThrowingDocsFetcher(new InvalidOperationException("Fetch failed")); 836var fetcher = new ThrowingDocsFetcher(new InvalidOperationException("Critical error"));
Mcp\Docs\DocsSearchServiceTests.cs (1)
357var fetcher = new ThrowingDocsFetcher(new InvalidOperationException("Index failed"));
Mcp\E2E\McpDocsE2ETests.cs (2)
296throw new InvalidOperationException( 303throw new InvalidOperationException($"Could not find CLI project at: {cliProjectPath}");
Npm\AspireJsLauncherTests.cs (2)
218throw new InvalidOperationException($"Unsupported RID shape in pack script: {rid}"); 412return current ?? throw new InvalidOperationException("Could not find repository root");
NuGet\NuGetPackagePrefetcherTests.cs (1)
188var ex = new InvalidOperationException("Something went wrong");
Packaging\PackageChannelTests.cs (8)
187GetTemplatePackagesAsyncCallback = (_, _, _, _) => throw new InvalidOperationException("Local package sources should be enumerated directly.") 274GetTemplatePackagesAsyncCallback = (_, _, _, _) => throw new InvalidOperationException("Local package sources should be enumerated directly.") 309GetTemplatePackagesAsyncCallback = (_, _, _, _) => throw new InvalidOperationException("Local package sources should be enumerated directly.") 361GetIntegrationPackagesAsyncCallback = (_, _, _, _) => throw new InvalidOperationException("Local package sources should be enumerated directly.") 409GetPackagesAsyncCallback = (_, _, _, _, _, _, _) => throw new InvalidOperationException("Local package sources should be enumerated directly.") 466GetIntegrationPackagesAsyncCallback = (_, _, _, _) => throw new InvalidOperationException("Local package sources should be enumerated directly."), 467GetPackagesAsyncCallback = (_, _, _, _, _, _, _) => throw new InvalidOperationException("Local package sources should be enumerated directly.") 998GetIntegrationPackagesAsyncCallback = (_, _, _, _) => throw new InvalidOperationException("Local package sources should be enumerated directly.")
Packaging\PackagingServiceTests.cs (1)
405_ => throw new InvalidOperationException($"Unexpected expectation: {expected}"),
Processes\IsolatedProcessTests.cs (1)
98throw new InvalidOperationException("intentional callback failure");
Processes\ParentProcessLivenessMonitorTests.cs (1)
128throw new InvalidOperationException("Callback failure should not fault monitor disposal.");
ProfileCaptureServiceTests.cs (1)
139CreateExecutionWithFileNameCallback = (_, _, _, _, _) => throw new InvalidOperationException("boom")
Projects\AppHostInfoResolverTests.cs (1)
21GetProjectItemsAndPropertiesAsyncCallback = (_, _, _, _, _) => throw new InvalidOperationException("MSBuild should not run on disk cache hit."),
Projects\AppHostServerSessionTests.cs (2)
317throw new InvalidOperationException("simulated DCP failure")); 702throw new InvalidOperationException("simulated launch failure");
Projects\DotNetAppHostProjectTests.cs (20)
1031RunAsyncCallback = (_, _, _, _, _, _, _, _, _) => throw new InvalidOperationException("dotnet run should not be used when the built target is known.") 1111RunAsyncCallback = (_, _, _, _, _, _, _, _, _) => throw new InvalidOperationException("dotnet run should not be used for a selected Project launch profile.") 1182RunAppHostCommandAsyncCallback = (_, _, _, _, _, _, _, _) => throw new InvalidOperationException("direct launch should not substitute the default profile.") 1221RunAppHostCommandAsyncCallback = (_, _, _, _, _, _, _, _) => throw new InvalidOperationException("direct launch should not ignore an explicit launch profile.") 1264RunAppHostCommandAsyncCallback = (_, _, _, _, _, _, _, _) => throw new InvalidOperationException("direct launch should not choose between ambiguous profile names.") 1305RunAppHostCommandAsyncCallback = (_, _, _, _, _, _, _, _) => throw new InvalidOperationException("direct launch should not accept an SDK-invalid command name.") 1353RunAppHostCommandAsyncCallback = (_, _, _, _, _, _, _, _) => throw new InvalidOperationException("direct launch should not accept a profile that the SDK cannot deserialize.") 1397RunAppHostCommandAsyncCallback = (_, _, _, _, _, _, _, _) => throw new InvalidOperationException("direct launch should not collapse duplicate profile properties.") 1448RunAsyncCallback = (_, _, _, _, _, _, _, _, _) => throw new InvalidOperationException("dotnet run should not be used when the built target is known.") 1506RunAppHostCommandAsyncCallback = (_, _, _, _, _, _, _, _) => throw new InvalidOperationException("direct AppHost launch should not be used when disabled.") 1662RunAsyncCallback = (_, _, _, _, _, _, _, _, _) => throw new InvalidOperationException("dotnet run should not be used when the built target is known.") 1718RunAsyncCallback = (_, _, _, _, _, _, _, _, _) => throw new InvalidOperationException("dotnet run should not be used when the built target is known.") 1773RunAsyncCallback = (_, _, _, _, _, _, _, _, _) => throw new InvalidOperationException("dotnet run should not be used when the built target is known.") 1835RunAsyncCallback = (_, _, _, _, _, _, _, _, _) => throw new InvalidOperationException("dotnet run should not be used when the built target is known.") 1898RunAsyncCallback = (_, _, _, _, _, _, _, _, _) => throw new InvalidOperationException("dotnet run should not be used when the built target is known.") 1959RunAppHostCommandAsyncCallback = (_, _, _, _, _, _, _, _) => throw new InvalidOperationException("direct AppHost launch should not be used for executable launch profiles.") 2019RunAppHostCommandAsyncCallback = (_, _, _, _, _, _, _, _) => throw new InvalidOperationException("direct AppHost launch should not be used when launch settings do not contain a usable profile.") 2085RunAsyncCallback = (_, _, _, _, _, _, _, _, _) => throw new InvalidOperationException("dotnet run should not be used when a later launch profile is usable.") 2588RunAppHostCommandAsyncCallback = (_, _, _, _, _, _, _, _) => throw new InvalidOperationException("direct AppHost launch should not be used when the run metadata is not directly launchable.") 4316throw new InvalidOperationException("GetAppHostInfoAsync should not be called in this test.");
Projects\GuestAppHostProjectTests.cs (2)
1152new InvalidOperationException("Stop after the server launch environment has been captured.")) 1192new InvalidOperationException("Stop after the server launch environment has been captured."))
Projects\PrebuiltAppHostServerTests.cs (2)
1043GetChannelsAsyncCallback = _ => throw new InvalidOperationException("Channel lookup failed.") 1785new InvalidOperationException("simulated packaging service failure"))
Projects\ProcessGuestLauncherTests.cs (1)
280throw new InvalidOperationException("simulated DCP failure"));
Projects\ProjectLocatorTests.cs (1)
2149=> throw new InvalidOperationException("Recursive AppHost discovery should not run when a valid configured AppHost path exists.");
Projects\ProjectUpdaterTests.cs (50)
64_ => throw new InvalidOperationException("Unexpected package query."), 92throw new InvalidOperationException("Unexpected project file."); 107throw new InvalidOperationException("Should not prompt when no work required."); 189_ => throw new InvalidOperationException("Unexpected package query."), 217throw new InvalidOperationException("Unexpected project file."); 343_ => throw new InvalidOperationException("Unexpected package query."), 372throw new InvalidOperationException("Unexpected project file."); 458_ => throw new InvalidOperationException("Unexpected package query."), 492throw new InvalidOperationException("Unexpected project file."); 611_ => throw new InvalidOperationException($"Unexpected package query: {query}."), 635throw new InvalidOperationException("Unexpected project file."); 736_ => throw new InvalidOperationException($"Unexpected package query: {query}"), 775throw new InvalidOperationException($"Unexpected project file: {projectFile.FullName}"); 898_ => throw new InvalidOperationException($"Unexpected package query: {query}"), 919throw new InvalidOperationException("Unexpected project file."); 1016_ => throw new InvalidOperationException($"Unexpected package query: {query}"), 1118_ => throw new InvalidOperationException($"Unexpected package query: {query}"), 1142throw new InvalidOperationException("Should not prompt when no work required."); 1243_ => throw new InvalidOperationException($"Unexpected package query: {query}"), 1262throw new InvalidOperationException("Unexpected project file."); 1337_ => throw new InvalidOperationException($"Unexpected package query: {query}"), 1411_ => throw new InvalidOperationException($"Unexpected package query: {query}"), 1507_ => throw new InvalidOperationException($"Unexpected package query: {query}"), 1670_ => throw new InvalidOperationException("Unexpected package query."), 1819_ => throw new InvalidOperationException($"Unexpected package query: {query}"), 1936_ => throw new InvalidOperationException($"Unexpected package query: {query}"), 2056_ => throw new InvalidOperationException($"Unexpected package query: {query}"), 2169_ => throw new InvalidOperationException($"Unexpected package query: {query}"), 2266_ => throw new InvalidOperationException($"Unexpected package query: {query}"), 2281throw new InvalidOperationException("Unexpected project file."); 2374_ => throw new InvalidOperationException($"Unexpected package query: {query}"), 2389throw new InvalidOperationException("Unexpected project file."); 2458_ => throw new InvalidOperationException($"Unexpected package query: {query}"), 2473throw new InvalidOperationException("Unexpected project file."); 2534_ => throw new InvalidOperationException("Unexpected package query."), 2551throw new InvalidOperationException("Unexpected project file."); 2618_ => throw new InvalidOperationException($"Unexpected package query: {query}"), 2714_ => throw new InvalidOperationException($"Unexpected package query: {query}"), 2805_ => throw new InvalidOperationException($"Unexpected package query: {query}"), 2881_ => throw new InvalidOperationException($"Unexpected package query: {query}"), 2962_ => throw new InvalidOperationException($"Unexpected package query: {query}"), 3051_ => throw new InvalidOperationException($"Unexpected package query: {query}"), 3130_ => throw new InvalidOperationException($"Unexpected package query: {query}"), 3210_ => throw new InvalidOperationException($"Unexpected package query: {query}"), 3354_ => throw new InvalidOperationException($"Unexpected package query: {query}"), 3739_ => throw new InvalidOperationException($"Unexpected package query: {query}"), 3764throw new InvalidOperationException($"Unexpected project file: {projectFile.FullName}"); 3847_ => throw new InvalidOperationException($"Unexpected package query: {query}"), 3924_ => throw new InvalidOperationException($"Unexpected package query: {query}"), 4014_ => throw new InvalidOperationException($"Unexpected package query: {query}"),
Telemetry\AspireCliTelemetryTests.cs (5)
101var exception = new InvalidOperationException("Test exception"); 115var exception = new InvalidOperationException("Test exception"); 147var exception = new InvalidOperationException("Test exception"); 170var exception = new InvalidOperationException("Test exception"); 197var exception = new InvalidOperationException("Test exception");
Telemetry\InternalMicrosoftDetectorTests.cs (1)
629=> throw new InvalidOperationException("The process should not wait after start cancellation.");
Templating\TemplateNuGetConfigServiceTests.cs (3)
158GetChannelsAsyncCallback = _ => throw new InvalidOperationException("Channel lookup should not run without a source override.") 1052GetTemplatePackagesAsyncCallback = (_, _, _, _) => throw new InvalidOperationException("Local package sources should be enumerated directly.") 1299throw new InvalidOperationException(
tests\Shared\AsyncTestHelpers.cs (1)
238throw new InvalidOperationException($"Assert failed after {retries} retries: {message}");
tests\Shared\TemporaryWorkspace.cs (1)
51throw new InvalidOperationException($"Failed to initialize git repository: {error}");
tests\Shared\TestProcesses.cs (1)
45var process = Process.Start(psi) ?? throw new InvalidOperationException("Failed to start long-running test process.");
TestServices\TestExtensionBackchannel.cs (2)
169throw new InvalidOperationException($"No items available for selection: {promptText}"); 181throw new InvalidOperationException($"No items available for selection: {promptText}");
TestServices\TestLanguageService.cs (2)
44throw new InvalidOperationException("No default project set and no callback provided"); 59throw new InvalidOperationException("No default project set and no callback provided");
TestServices\TestMigration.cs (1)
32throw new InvalidOperationException("Detection failed");
TestServices\TestProcessExecutionFactory.cs (2)
179throw new InvalidOperationException("Process has not been started."); 232throw new InvalidOperationException("Process has not been started.");
Utils\DcpConnectionHealthCheckTests.cs (1)
27TestConnectionAsyncCallback = (_, _, _) => throw new InvalidOperationException("Should not be called.")
Utils\DevCertsCheckTests.cs (1)
527StartException = new InvalidOperationException("openssl failed to start")
Utils\GitTestHelper.cs (1)
47throw new InvalidOperationException($"git {string.Join(' ', arguments)} failed with exit code {process.ExitCode}. stdout: {stdout}, stderr: {stderr}");
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 (59)
Components\Controls\Chart\ChartDataCalculator.cs (2)
228throw new InvalidOperationException("Histogram values changed size"); 347throw new InvalidOperationException("Unexpected metric type: " + metric.GetType());
Components\Pages\Resources.razor.cs (1)
185throw new InvalidOperationException("Unable to display the resources page because the dashboard client is not enabled.");
Configuration\DashboardOptions.cs (1)
37internal byte[] GetApiKeyBytes() => _apiKeyBytes ?? throw new InvalidOperationException($"{nameof(ApiKey)} is not available.");
DashboardWebApplication.cs (5)
81throw new InvalidOperationException("WebApplication not started yet."); 94throw new InvalidOperationException("WebApplication not started yet."); 98throw new InvalidOperationException("Multiple frontend endpoints."); 107get => _otlpServiceGrpcEndPointAccessor ?? throw new InvalidOperationException("WebApplication not started yet."); 112get => _otlpServiceHttpEndPointAccessor ?? throw new InvalidOperationException("WebApplication not started yet.");
Model\ConsoleLogsFetcher.cs (1)
60throw new InvalidOperationException("Can't fetch console logs when the dashboard client is not enabled.");
Model\ConsoleLogsManager.cs (1)
37throw new InvalidOperationException($"{nameof(ConsoleLogsManager)} not initialized.");
Model\DashboardCommandExecutor.cs (2)
312return progressNotificationId ?? throw new InvalidOperationException("The progress notification has not been created."); 331_ => throw new InvalidOperationException()
Model\GenAI\GenAIItemViewModel.cs (1)
70_ => throw new InvalidOperationException("Unexpected type: " + Type)
Model\GenAI\GenAIMessages.cs (1)
237var wrappedEx = new InvalidOperationException($"Error reading message part '{type ?? "(missing)"}': {ex.Message}", ex);
Model\GenAI\GenAIVisualizerDialogViewModel.cs (2)
530throw new InvalidOperationException($"Unexpected type: {type}"); 572throw new InvalidOperationException(
Model\ResourceGraph\ResourceGraphMapper.cs (2)
96.Select(e => e.Attribute("d")?.Value ?? throw new InvalidOperationException($"Icon '{icon.Name}' contains an element without path data.")) 101throw new InvalidOperationException($"Icon '{icon.Name}' doesn't contain path data.");
Model\ResourceIconHelpers.cs (1)
42throw new InvalidOperationException($"Couldn't resolve resource icon for {resource.Name}.");
Model\ResourceTypeDetails.cs (1)
28throw new InvalidOperationException($"Can't get ResourceKey from resource type details '{ToString()}' because {nameof(ReplicaSetName)} is null.");
Model\TelemetryImportService.cs (1)
54throw new InvalidOperationException("Import is disabled.");
Model\ThemeManager.cs (1)
95throw new InvalidOperationException("Theme manager not initialized.");
Otlp\Model\MetricValues\DimensionScope.cs (2)
87throw new InvalidOperationException("Histogram data point has bucket counts without any explicit bounds."); 95throw new InvalidOperationException("Histogram data point bucket count length changed.");
Otlp\Model\OtlpHelpers.cs (2)
130_ => throw new InvalidOperationException($"Unexpected AnyValue type: {value.ValueCase}"), 476throw new InvalidOperationException($"Scope limit of {TelemetryRepository.MaxScopeCount} reached for {telemetryType}. Scope '{name}' will not be added.");
Otlp\Model\OtlpInstrument.cs (1)
69throw new InvalidOperationException($"Dimension limit of {TelemetryRepository.MaxDimensionCount} reached for instrument '{Summary.Name}'.");
Otlp\Model\OtlpResource.cs (3)
85throw new InvalidOperationException("Instrument name is required."); 116throw new InvalidOperationException($"Instrument limit of {TelemetryRepository.MaxInstrumentCount} reached. Instrument '{metric.Name}' will not be added."); 309throw new InvalidOperationException($"Resource view limit of {TelemetryRepository.MaxResourceViewCount} reached.");
Otlp\Model\OtlpTrace.cs (3)
44throw new InvalidOperationException($"Duplicate span id '{span.SpanId}' detected."); 65throw new InvalidOperationException($"Circular loop detected for span '{span.SpanId}' with parent '{span.ParentSpanId}'."); 135throw new InvalidOperationException($"Trace {TraceId} spans not in order at index {i}.");
Otlp\Storage\TelemetryRepository.cs (5)
160throw new InvalidOperationException($"{nameof(ResourceKey)} must have an instance ID."); 258throw new InvalidOperationException($"Resource limit of {_otlpContext.Options.MaxResourceCount} reached. Resource '{key}' will not be added."); 1975throw new InvalidOperationException($"Traces not in order at index {i}."); 1998throw new InvalidOperationException($"Couldn't find expected link from span {span.SpanId} to span {link.SpanId}."); 2014throw new InvalidOperationException(sb.ToString());
ServiceClient\DashboardClient.cs (4)
153_ => throw new InvalidOperationException("Unable to load ResourceServiceClient client certificate.") 224throw new InvalidOperationException($"Unable to load client certificate with subject \"{subject}\" from key store."); 317throw new InvalidOperationException($"{nameof(DashboardClient)} is disabled. Check the {nameof(IsEnabled)} property before calling this."); 1061throw new InvalidOperationException($"File '{fileName}' exceeded the expected size of {expectedSize} bytes.");
ServiceClient\Partials.cs (6)
53throw new InvalidOperationException($@"Error converting resource ""{Name}"" to {nameof(ResourceViewModel)}.", ex); 75_ => throw new InvalidOperationException("Unknown health status: " + healthStatus), 132_ => throw new InvalidOperationException("Unknown state: " + state), 142_ => throw new InvalidOperationException("Unknown icon variant: " + iconVariant), 153_ => throw new InvalidOperationException("Unknown icon variant: " + iconVariant), 255throw new InvalidOperationException($"Message field '{expression}' on resource with name '{Name}' cannot be null.");
src\Shared\CircularBuffer.cs (1)
179throw 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)
135throw new InvalidOperationException($"Error parsing URIs from configuration value '{key}'.", ex); 172throw new InvalidOperationException($"Error parsing URIs from configuration value '{key}'.", ex); 202throw new InvalidOperationException($"Unknown {typeof(T).Name} value \"{value}\". Valid values are {string.Join(", ", Enum.GetNames(typeof(T)))}."); 222throw new InvalidOperationException($"Missing required configuration for {key}. Valid values are {string.Join(", ", Enum.GetNames(typeof(T)))}.");
src\Shared\TimeProviderExtensions.cs (1)
29throw new InvalidOperationException("Unable to convert unspecified DateTime to local time.");
Telemetry\DashboardTelemetryService.cs (1)
362throw 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 (19)
Controls\TextVisualizerDialogTests.cs (1)
98var formatOptions = formatSelect.Instance.Items ?? throw new InvalidOperationException("Expected format options.");
Layout\MainLayoutTests.cs (5)
54throw new InvalidOperationException("Unexpected key."); 68throw new InvalidOperationException("Unexpected key."); 117throw new InvalidOperationException("Unexpected key."); 168throw new InvalidOperationException("Unexpected key."); 209_ => throw new InvalidOperationException("Unexpected key.")
Pages\ConsoleLogsTests.cs (2)
487consoleLogsChannel.Writer.Complete(new InvalidOperationException("Error!")); 538consoleLogsChannel.Writer.Complete(new InvalidOperationException("Error!"));
Pages\MetricsTests.cs (1)
119throw new InvalidOperationException("Unexpected key: " + key);
Shared\TestMessageService.cs (1)
80return _onShowMessage?.Invoke(messageOptions) ?? throw new InvalidOperationException("No dialog callback specified.");
tests\Shared\AsyncTestHelpers.cs (1)
238throw new InvalidOperationException($"Assert failed after {retries} retries: {message}");
tests\Shared\TestDashboardClient.cs (6)
72throw new InvalidOperationException("No resource command channel set."); 87throw new InvalidOperationException("No channel provider set."); 102throw new InvalidOperationException("No channel provider set."); 117throw new InvalidOperationException("No channel provider set."); 137throw new InvalidOperationException("No channel provider set."); 157throw new InvalidOperationException("No resource command channel set.");
tests\Shared\TestDialogService.cs (2)
49throw new InvalidOperationException("No dialog callback specified."); 71throw new InvalidOperationException("No dialog callback specified.");
Aspire.Dashboard.Tests (20)
CircularBufferTests.cs (1)
49throw new InvalidOperationException($"Traces not in order at index {i}. {value} shouldn't be smaller than {current}.");
Integration\Playwright\AccessibilityTests.cs (1)
458_ => throw new InvalidOperationException($"No accessibility readiness signal is configured for '{relativeUrl}'.")
Integration\ServerRetryHelper.cs (2)
67throw new InvalidOperationException($"Generated ports list contains duplicate numbers: {string.Join(", ", ports)}"); 147throw new InvalidOperationException($"Exhausted all available ports. Couldn't find a free port after {nextPortAttempt}.");
Model\DashboardClientTests.cs (1)
605throw new InvalidOperationException("The command should only complete when the call is canceled.");
Model\ResourceStateViewModelTests.cs (1)
236public void CopyTo(ResourceViewModel[] array, int arrayIndex) => throw new InvalidOperationException("The resources collection should not be copied.");
Telemetry\DashboardTelemetrySenderTests.cs (2)
85return Task.FromException<HttpResponseMessage>(new InvalidOperationException()); 93return Task.FromException<HttpResponseMessage>(new InvalidOperationException());
Telemetry\TelemetryLoggerProviderTests.cs (1)
45circuitHostLogger.Log(LogLevel.Error, TelemetryLoggerProvider.CircuitUnhandledExceptionEventId, new InvalidOperationException("Exception message"), "Test message");
TelemetryRepositoryTests\TraceTests.cs (1)
910throw new InvalidOperationException($"Error adding trace number {i}.", ex);
tests\Shared\AsyncTestHelpers.cs (1)
238throw new InvalidOperationException($"Assert failed after {retries} retries: {message}");
tests\Shared\TestCertificateLoader.cs (1)
31throw new InvalidOperationException("Cannot acquire the global certificate mutex.");
tests\Shared\TestDashboardClient.cs (6)
72throw new InvalidOperationException("No resource command channel set."); 87throw new InvalidOperationException("No channel provider set."); 102throw new InvalidOperationException("No channel provider set."); 117throw new InvalidOperationException("No channel provider set."); 137throw new InvalidOperationException("No channel provider set."); 157throw new InvalidOperationException("No resource command channel set.");
tests\Shared\TestDialogService.cs (2)
49throw new InvalidOperationException("No dialog callback specified."); 71throw new InvalidOperationException("No dialog callback specified.");
Aspire.Deployment.EndToEnd.Tests (25)
AksPersistentVolumeDeploymentTests.cs (1)
442throw new InvalidOperationException(
AppServiceReactDeploymentTests.cs (2)
138throw new InvalidOperationException($"Could not find '{buildRunPattern}' in the generated AppHost."); 180throw new InvalidOperationException("Could not add regional VNet integration to the generated AppHost.");
AppServiceStoragePrivateEndpointDeploymentTests.cs (4)
126throw new InvalidOperationException($"Could not find '{builderCreation}' in the generated AppHost."); 138throw new InvalidOperationException($"Could not find '{healthCheck}' in the generated AppHost."); 155throw new InvalidOperationException($"Could not find '{serviceDefaults}' in the generated Server project."); 193throw new InvalidOperationException($"Could not find '{defaultEndpoints}' in the generated Server project.");
AzureResourceScopeDeploymentTests.cs (1)
191throw new InvalidOperationException("Expected apphost.cs to contain an Aspire.AppHost.Sdk directive.");
Helpers\AzureAuthenticationHelpers.cs (1)
71throw new InvalidOperationException(
Helpers\DeploymentE2EAutomatorHelpers.cs (4)
37var archivePath = strategy.ArchivePath ?? throw new InvalidOperationException("LocalHive strategy is missing the archive path."); 51throw new InvalidOperationException("PullRequest strategy requires a positive GITHUB_PR_NUMBER."); 73var archiveDir = strategy.ArchiveDir ?? throw new InvalidOperationException("LocalArchive strategy is missing the archive directory."); 90throw new InvalidOperationException(
tests\Shared\CliInstallStrategy.cs (5)
140throw new InvalidOperationException($"GITHUB_SHA contains an unexpected value: '{sha}'. Expected a hex commit SHA or 'main'."); 344throw new InvalidOperationException("PullRequest strategy requires GITHUB_PR_NUMBER and GITHUB_PR_HEAD_SHA to be set."); 541throw new InvalidOperationException("Preinstalled CLI mode is only supported for non-Docker test environments."); 557throw new InvalidOperationException("LocalArchive mode requires ArchiveDir to be set."); 575throw new InvalidOperationException($"Unknown install mode: {Mode}");
tests\Shared\CliPackageDiscovery.cs (3)
25?? throw new InvalidOperationException( 44throw new InvalidOperationException( 77throw new InvalidOperationException(
tests\Shared\Hex1bAutomatorTestHelpers.cs (3)
256throw new InvalidOperationException( 452throw new InvalidOperationException($"Command failed with error prompt [{counter.Value} ERR:*] while waiting for the agent init prompt or success prompt."); 772throw new InvalidOperationException($"Pipeline failed unexpectedly. Terminal output:{Environment.NewLine}{terminalOutput}");
tests\Shared\TemporaryWorkspace.cs (1)
51throw new InvalidOperationException($"Failed to initialize git repository: {error}");
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`"); 126throw 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)
167throw new InvalidOperationException("Project is already running"); 319throw new InvalidOperationException(exceptionMessage); 364throw new InvalidOperationException("Dashboard URL is not available"); 403throw new InvalidOperationException("Dashboard URL is not available"); 422throw new InvalidOperationException("Tried to stop the app host process but it is not running."); 499throw new InvalidOperationException("The app host process is not running.");
tests\Shared\TemplatesTesting\BuildEnvironment.cs (1)
279throw 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 (194)
ApplicationModel\CommandLineArgsCallbackAnnotation.cs (1)
149public IResource Resource => _resource ?? throw new InvalidOperationException($"{nameof(Resource)} is not set. This callback context is not associated with a resource.");
ApplicationModel\ContainerFileSystemCallbackAnnotation.cs (2)
123_ => throw new InvalidOperationException($"Unknown file system item type: {node.Value.GetType().Name}"), 228throw new InvalidOperationException($"The specified path '{fullPath}' does not exist.");
ApplicationModel\ContainerImagePushOptions.cs (1)
79throw new InvalidOperationException("RemoteImageName must be set.");
ApplicationModel\DebugSupportExtensions.cs (1)
182throw new InvalidOperationException(
ApplicationModel\EndpointAnnotation.cs (2)
367AllocatedEndpointSnapshot.SetException(new InvalidOperationException($"The endpoint `{Name}` is not allocated")); 373throw new InvalidOperationException($"The default AllocatedEndpoint's network ID must match the EndpointAnnotation network ID ('{_networkId}'). The attempted AllocatedEndpoint belongs to '{value.NetworkID}'.");
ApplicationModel\EndpointReference.cs (5)
24public EndpointAnnotation EndpointAnnotation => GetEndpointAnnotation() ?? throw new InvalidOperationException(ErrorMessage ?? BuildMissingEndpointMessage()); 148_ => throw new InvalidOperationException($"The property '{property}' is not supported for the endpoint '{EndpointName}'.") 222?? throw new InvalidOperationException($"The endpoint `{EndpointName}` is not allocated for the resource `{Resource.Name}`."); 384_ => throw new InvalidOperationException($"The property '{Property}' is not supported for the endpoint '{Endpoint.EndpointName}'.") 395?? throw new InvalidOperationException("The endpoint does not have an associated TargetPortExpression from the orchestrator.");
ApplicationModel\EnvironmentCallbackContext.cs (1)
69public IResource Resource => _resource ?? throw new InvalidOperationException($"{nameof(Resource)} is not set. This callback context is not associated with a resource.");
ApplicationModel\ExecutableLaunchRecipe.cs (1)
438throw new InvalidOperationException($"Project resource '{resource.Name}' is missing required metadata.");
ApplicationModel\ExecutableResource.cs (1)
49?? throw new InvalidOperationException("Unable to find ExecutableAnnotation on resource.");
ApplicationModel\IComputeEnvironmentResource.cs (2)
64_ => throw new InvalidOperationException($"The property '{property}' is not supported for the endpoint '{endpoint.Name}'.") 80throw new InvalidOperationException($"Endpoint '{endpoint.Name}' must specify a port for scheme '{scheme}'.");
ApplicationModel\ProjectLaunchConfigurationFactory.cs (1)
17throw new InvalidOperationException(
ApplicationModel\ProjectLaunchDefaultsAnnotation.cs (1)
58throw new InvalidOperationException(
ApplicationModel\ProjectResourceExtensions.cs (2)
51throw new InvalidOperationException($"Resource '{projectResource.Name}' does not carry an {nameof(IProjectMetadata)} annotation."); 65_ => throw new InvalidOperationException(
ApplicationModel\ReferenceExpression.cs (3)
389throw new InvalidOperationException("ReferenceExpression instances can't be used in interpolated string with a custom format. Duplicate the inner expression in-place."); 563throw new InvalidOperationException("ReferenceExpression instances can't be used in interpolated string with a custom format. Duplicate the inner expression in-place."); 672throw new InvalidOperationException("ReferenceExpression instances can't be used in interpolated string with a custom format. Duplicate the inner expression in-place.");
ApplicationModel\RequiredCommandValidator.cs (1)
58throw new InvalidOperationException($"Required command on resource '{resource.Name}' cannot be null or empty.");
ApplicationModel\ResourceExtensions.cs (12)
1082throw new InvalidOperationException($"Resource '{resource.Name}' has multiple compute environments - '{computeEnvironmentNames}'. Please specify a single compute environment using 'WithComputeEnvironment'."); 1117throw new InvalidOperationException($"A circular lifetime reference was detected for resource '{resource.Name}'."); 1128: throw new InvalidOperationException($"Resource '{resource.Name}' has a resource persistence mode but no source resource."), 1130_ => throw new InvalidOperationException($"Unknown persistence mode '{Enum.GetName(typeof(PersistenceMode), persistenceAnnotation.Mode)}'.") 1140_ => throw new InvalidOperationException($"Unknown container lifetime '{Enum.GetName(typeof(ContainerLifetime), containerLifetimeAnnotation.Lifetime)}'.") 1178throw new InvalidOperationException($"A circular lifetime reference was detected for resource '{resource.Name}'."); 1190throw new InvalidOperationException($"Resource '{resource.Name}' has a parent process persistence mode but no parent process identity."); 1194: throw new InvalidOperationException($"Resource '{resource.Name}' has a resource persistence mode but no source resource."); 1257throw new InvalidOperationException($"Resource '{resource.Name}' has no resolved names."); 1261throw new InvalidOperationException($"Resource '{resource.Name}' has multiple resolved names: {string.Join(", ", names)}."); 1386throw new InvalidOperationException( 1391throw new InvalidOperationException($"Resource '{resource.Name}' does not have a container registry reference.");
ApplicationModel\ResourceLoggerService.cs (1)
899throw new InvalidOperationException($"Getting all logs requires the {nameof(ResourceLoggerService)} instance created by DI.");
ApplicationModel\ResourceNotificationService.cs (1)
833throw new InvalidOperationException($"Resource instance doesn't match resource previously registered with specified resource id '{resourceId}'.");
ApplicationModel\TerminalAnnotation.cs (1)
70throw new InvalidOperationException("TerminalAnnotation has already been initialized.");
Ats\CollectionExports.cs (1)
202=> key as string ?? throw new InvalidOperationException($"Aspire.Hosting/Dict.toObject only supports string-key dictionaries, but found key type '{key?.GetType().FullName ?? "null"}'.");
Ats\UserSecretsExports.cs (1)
44?? throw new InvalidOperationException("The JSON payload must be a JSON object.");
Backchannel\AppHostRpcTarget.cs (5)
258throw new InvalidOperationException($"File '{request.FileName}' exceeds the maximum upload size of {maxUploadSize} bytes."); 263throw new InvalidOperationException("An interaction ID is required when uploading a file."); 267throw new InvalidOperationException("An input name is required when uploading a file."); 298?? throw new InvalidOperationException("Pipeline is not a DistributedApplicationPipeline."); 318throw new InvalidOperationException(
Backchannel\AuxiliaryBackchannelRpcTarget.cs (7)
348_ => throw new InvalidOperationException("Resource command arguments must be a JSON object or array.") 413_ => throw new InvalidOperationException($"Resource command argument '{name}' must be a string, number, boolean, or null.") 863throw new InvalidOperationException("AppHost path not found in configuration."); 1784throw new InvalidOperationException($"Resource '{resourceName}' not found."); 1789throw new InvalidOperationException($"Resource '{resourceName}' does not have an MCP endpoint annotation."); 1795throw new InvalidOperationException($"MCP endpoint for resource '{resourceName}' is not available."); 1804?? throw new InvalidOperationException("Failed to create MCP client.");
ContainerResourceBuilderExtensions.cs (6)
423throw new InvalidOperationException("Ambiguous tags - a tag was provided on both the 'tag' and 'image' parameters"); 621throw new InvalidOperationException($"The resource '{builder.Resource.Name}' does not have a container image specified. Use WithImage to specify the container image and tag."); 1156throw new InvalidOperationException($"The resource '{builder.Resource.Name}' does not have a Dockerfile build annotation. Call WithDockerfile before calling WithBuildArg."); 1206throw new InvalidOperationException($"Cannot add secret parameter '{value.Resource.Name}' as build argument '{name}' while configuring resource '{builder.Resource.Name}'. Use WithBuildSecret instead."); 1287throw new InvalidOperationException($"The resource '{builder.Resource.Name}' does not have a Dockerfile build annotation. Call WithDockerfile before calling WithBuildSecret."); 1503throw new InvalidOperationException($"The source path '{sourceFullPath}' does not exist. Ensure the path is correct and accessible.");
Dashboard\DashboardEventHandlers.cs (1)
697throw new InvalidOperationException($"Unexpected DEBUG_SESSION_PORT value. Expected localhost:port, got '{sessionPort}'.");
Dashboard\DashboardService.cs (2)
271_ => throw new InvalidOperationException($"Unexpected input type: {inputType}"), 285_ => throw new InvalidOperationException($"Unexpected input type: {inputType}"),
Dashboard\DashboardServiceHost.cs (1)
269_resourceServiceUri.SetException(new InvalidOperationException("Could not obtain IServerAddressesFeature. Resource service URI is not available."));
Dashboard\InteractionFileUploadStore.cs (5)
47throw new InvalidOperationException($"Interaction '{interactionId}' is not accepting file uploads."); 54throw new InvalidOperationException($"Interaction '{interactionId}' is not accepting file uploads."); 59throw new InvalidOperationException($"Interaction '{interactionId}' is not accepting file uploads for input '{inputName}'."); 69throw new InvalidOperationException($"File input '{inputName}' accepts at most {maxFileCount} {fileLabel}."); 325return new InvalidOperationException($"Submitted files for input '{inputName}' do not match the completed uploads.", innerException);
Dashboard\proto\Partials.cs (2)
154_ => throw new InvalidOperationException("Unknown health status: " + healthStatus), 166_ => throw new InvalidOperationException("Unexpected icon variant: " + iconVariant)
Dashboard\ResourceServiceOptions.cs (1)
38return _apiKeyBytes ?? throw new InvalidOperationException($"AppHost:ResourceService:ApiKey is not specified in configuration.");
Dcp\AppResource.cs (2)
89get { throw new InvalidOperationException("Service resources do not produce any services"); } 93get { throw new InvalidOperationException("Service resources do not consume any services"); }
Dcp\ContainerCreator.cs (5)
145throw new InvalidOperationException(); 169_ => throw new InvalidOperationException($"Unknown pull policy '{Enum.GetName(typeof(ImagePullPolicy), pullPolicy)}' for container '{container.Name}'") 181throw new InvalidOperationException("Custom container networks are not supported yet."); 410throw new InvalidOperationException($"Expected an {nameof(ContainerExec)} resource, but got {er.DcpResourceKind} instead"); 959_ => throw new InvalidOperationException("Build secret can only be a parameter or a file.")
Dcp\DcpExecutor.cs (5)
382_ => throw new InvalidOperationException($"Unknown resource type {resource.GetType().Name}") 1119throw new InvalidOperationException($"Resource '{resourceName}' not found."); 1174throw new InvalidOperationException($"Unexpected resource type: {appResource.DcpResourceKind}"); 1190throw new InvalidOperationException($"Failed to stop resource '{resourceReference.DcpResourceName}'."); 1251throw new InvalidOperationException($"Unexpected resource type: {appResource.DcpResourceKind}");
Dcp\DcpExecutorEvents.cs (1)
26throw new InvalidOperationException($"Failed to add subscription for event type {typeof(T)} because a subscription already exists.");
Dcp\DcpModelUtilities.cs (6)
39throw new InvalidOperationException($"The endpoint '{endpoint.Name}' for container resource '{modelResourceName}' must specify the {nameof(EndpointAnnotation.TargetPort)} value"); 44throw new InvalidOperationException($"The endpoint '{endpoint.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."); 71throw new InvalidOperationException($"Resource '{modelResourceName}' uses multiple replicas and a proxy-less endpoint '{ea.Name}'. These features do not work together."); 80throw new InvalidOperationException( 86throw new InvalidOperationException( 191throw new InvalidOperationException($"Service '{svc.Metadata.Name}' needs to specify a port for endpoint '{sp.EndpointAnnotation.Name}' since it isn't using a proxy.");
Dcp\DcpNameGenerator.cs (1)
81throw new InvalidOperationException($"Resource '{resource.Name}' uses multiple replicas and a persistent lifetime. These features do not work together.");
Dcp\DcpOptions.cs (2)
322throw new InvalidOperationException($"Invalid value \"{dcpPublisherConfiguration[nameof(options.DependencyCheckTimeout)]}\" for \"--dcp-dependency-check-timeout\". Expected an integer value."); 384throw new InvalidOperationException(
Dcp\DcpProcessMonitor.cs (2)
21throw new InvalidOperationException($"Could not determine the identity timestamp for monitor process {monitorProcessId}."); 61throw new InvalidOperationException($"Could not read a valid start time for monitor process {processId} from '{procRoot}'.");
Dcp\ExecutableCreator.cs (5)
129throw new InvalidOperationException( 146throw new InvalidOperationException( 152throw new InvalidOperationException( 176_ => throw new InvalidOperationException($"Unknown executable launch mechanism '{plan.Mechanism}'.") 210throw new InvalidOperationException($"Project resource '{project.Name}' is missing required metadata.");
Dcp\KubernetesService.cs (1)
446throw new InvalidOperationException($"Unknown custom resource type: {typeof(T).Name}");
Dcp\Process\ProcessUtil.cs (1)
163processLifetimeTcs.TrySetException(new InvalidOperationException(message));
Dcp\ProxylessEndpointPortAllocator.cs (1)
195return new InvalidOperationException($"No available ports were found in the configured proxyless endpoint port range {_rangeStart}-{_rangeEnd}.");
DeveloperCertificateService.cs (2)
337throw new InvalidOperationException("The certificate does not have an associated RSA or ECDSA private key."); 365_ => throw new InvalidOperationException($"Unsupported private key type: {privateKey.GetType().FullName}.")
DistributedApplication.cs (1)
674throw new InvalidOperationException($"The registered {nameof(IDistributedApplicationPipeline)} implementation '{pipeline.GetType().FullName}' does not support executing the '{WellKnownPipelineSteps.BeforeStart}' step during startup.");
DistributedApplicationBuilder.cs (1)
407throw 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)
70throw new InvalidOperationException($"Resource '{name}' was not found."); 75throw new InvalidOperationException($"Resource '{name}' of type '{resource.GetType()}' is not assignable to requested type '{typeof(T).Name}'.");
DistributedApplicationExecutionContext.cs (2)
89throw new InvalidOperationException("IServiceProvider is not available because execution context was not constructed with DistributedApplicationExecutionContextOptions."); 94throw new InvalidOperationException("IServiceProvider is not available because the container has not yet been built.");
DistributedApplicationOptions.cs (1)
231throw new InvalidOperationException($"Failed to load AppHost assembly '{AssemblyName}' specified in {nameof(DistributedApplicationOptions)}.", ex);
ExecutableResourceBuilderExtensions.cs (1)
223throw new InvalidOperationException($"The resource '{builder.Resource.Name}' is missing the ExecutableAnnotation");
ExternalServiceBuilderExtensions.cs (1)
300throw new InvalidOperationException("External services do not support endpointName for HTTP health checks.");
IInteractionService.cs (2)
625throw new InvalidOperationException($"Duplicate input name '{input.Name}' found. Input names must be unique."); 771throw new InvalidOperationException($"Input '{name}' does not have a value.");
InteractionService.cs (4)
178throw new InvalidOperationException($"The input '{input.Name}' has {nameof(InteractionInput.DynamicLoading)} that depends on an input named '{dependsOnInputName}', but no such input exists."); 182throw new InvalidOperationException($"The input '{input.Name}' has {nameof(InteractionInput.DynamicLoading)} that depends on an input named '{dependsOnInputName}', but that input is not defined before it. Inputs must be defined in order so that dependencies are always to earlier inputs."); 442throw new InvalidOperationException($"An interaction with ID {interactionUpdate.InteractionId} already exists. Interaction IDs must be unique."); 689throw new InvalidOperationException($"{nameof(InteractionService)} is not available because the dashboard is not enabled or because this command is running in non-interactive CLI mode.");
Lifecycle\TerminalHostEventingSubscriber.cs (1)
209throw new InvalidOperationException(
Orchestrator\RelationshipEvaluator.cs (1)
77throw new InvalidOperationException($"Circular dependency detected: {string.Join(" -> ", visited)} -> {parent}");
Pipelines\DistributedApplicationPipeline.cs (16)
255throw new InvalidOperationException( 283throw new InvalidOperationException( 291throw new InvalidOperationException( 334var stepsToAnalyze = _lastResolvedSteps ?? throw new InvalidOperationException( 409throw new InvalidOperationException( 465throw new InvalidOperationException( 534throw new InvalidOperationException( 610throw new InvalidOperationException( 665throw new InvalidOperationException( 695throw new InvalidOperationException( 815throw new InvalidOperationException( 826throw new InvalidOperationException( 835throw new InvalidOperationException( 889var wrappedException = new InvalidOperationException(message, ex); 1097throw new InvalidOperationException( 1148throw new InvalidOperationException(
Pipelines\Internal\DeploymentStateManagerBase.cs (2)
240throw new InvalidOperationException("State has not been loaded."); 250throw new InvalidOperationException(
Pipelines\PipelineActivityReporter.cs (6)
86throw new InvalidOperationException($"Step with ID '{step.Id}' does not exist."); 93throw new InvalidOperationException($"Cannot create task for step '{step.Id}' because the step is already complete."); 146throw new InvalidOperationException($"Parent step with ID '{task.StepId}' does not exist."); 153throw new InvalidOperationException($"Cannot update task '{task.Id}' because its parent step '{task.StepId}' is already complete."); 212throw new InvalidOperationException($"Parent step with ID '{task.StepId}' does not exist."); 225throw new InvalidOperationException($"Cannot complete task '{task.Id}' because its parent step '{task.StepId}' is already complete.");
Pipelines\PipelineStepHelpers.cs (3)
78throw new InvalidOperationException($"Failed to get target tag for {resource.Name}"); 109?? throw new InvalidOperationException("Failed to retrieve container registry information."); 124throw new InvalidOperationException($"Failed to get target tag for {resource.Name}");
Pipelines\ReportingStep.cs (4)
110throw new InvalidOperationException("Cannot create task: Reporter is not set."); 123throw new InvalidOperationException("Cannot create task: Reporter is not set."); 171throw new InvalidOperationException("Cannot complete step: Reporter is not set."); 184throw new InvalidOperationException("Cannot complete step: Reporter is not set.");
ProjectResourceBuilderExtensions.cs (2)
500throw new InvalidOperationException( 998var projectDirectoryPath = Path.GetDirectoryName(projectFilePath) ?? throw new InvalidOperationException($"Unable to get directory name for {projectFilePath}");
Publishing\ResourceContainerImageManager.cs (3)
224throw new InvalidOperationException($"Container runtime '{containerRuntime.Name}' is not running or is unhealthy."); 256throw new InvalidOperationException($"Container runtime '{containerRuntime.Name}' is not running or is unhealthy."); 276throw new InvalidOperationException($"The container image name for resource '{resource.Name}' could not be determined.");
ResourceBuilderExtensions.cs (22)
135throw new InvalidOperationException($"Resource '{builder.Resource.Name}' does not support lifetime configuration."); 207throw new InvalidOperationException($"Resource '{builder.Resource.Name}' does not support lifetime configuration."); 926EndpointReference => throw new InvalidOperationException("Endpoint references do not support connectionName, optional, or name options."), 928Uri => throw new InvalidOperationException("URI references require the name option and do not support connectionName or optional."), 930string => throw new InvalidOperationException("URI references require the name option and do not support connectionName or optional."), 972throw new InvalidOperationException("Reference names are not supported for external services."); 977throw new InvalidOperationException("Named service references are only supported for resources with service discovery."); 982throw new InvalidOperationException("Specify either connectionName or name for service discovery references, but not both."); 987throw new InvalidOperationException("Optional references are only supported for connection string resources."); 1018throw new InvalidOperationException($"The resource '{source.Resource.Name}' can't be used with withReference because it doesn't provide a connection string, service discovery, or a custom withReference implementation."); 1025throw new InvalidOperationException($"The URI '{uriString}' is invalid."); 1265throw new InvalidOperationException($"The URI for service reference '{name}' is invalid while configuring target resource '{builder.Resource.Name}': it must be absolute."); 1270throw new InvalidOperationException($"The URI for service reference '{name}' is invalid while configuring target resource '{builder.Resource.Name}': it cannot contain a fragment."); 1275throw new InvalidOperationException($"The URI for service reference '{name}' is invalid while configuring target resource '{builder.Resource.Name}': it cannot contain a query string."); 3200?? throw new InvalidOperationException("The process command specification factory returned null."); 3240?? throw new InvalidOperationException("The process command specification factory returned null."); 3276?? throw new InvalidOperationException("The process command specification factory returned null."); 3499throw new InvalidOperationException("Process command success exit codes must contain at least one value."); 3838throw new InvalidOperationException("The HTTP command prepare-request callback returned null."); 3854throw new InvalidOperationException("HTTP command request content type cannot be specified without request content."); 3867throw new InvalidOperationException($"HTTP command request header '{name}' could not be applied."); 3912throw new InvalidOperationException($"Unsupported {nameof(HttpCommandResultMode)} value '{resultMode}'.");
src\Shared\BackchannelConstants.cs (1)
562throw new InvalidOperationException(
src\Shared\CircularBuffer.cs (1)
179throw 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)
135throw new InvalidOperationException($"Error parsing URIs from configuration value '{key}'.", ex); 172throw new InvalidOperationException($"Error parsing URIs from configuration value '{key}'.", ex); 202throw new InvalidOperationException($"Unknown {typeof(T).Name} value \"{value}\". Valid values are {string.Join(", ", Enum.GetNames(typeof(T)))}."); 222throw new InvalidOperationException($"Missing required configuration for {key}. Valid values are {string.Join(", ", Enum.GetNames(typeof(T)))}.");
src\Shared\OtlpEndpointResolver.cs (2)
37throw new InvalidOperationException("OtlpExporter is configured to require http/protobuf, but no endpoint was configured for ASPIRE_DASHBOARD_OTLP_HTTP_ENDPOINT_URL"); 45throw new InvalidOperationException("OtlpExporter is configured to require http/json, but no endpoint was configured for ASPIRE_DASHBOARD_OTLP_HTTP_ENDPOINT_URL");
src\Shared\UserSecrets\UserSecretsPathHelper.cs (1)
45throw new InvalidOperationException($"Missing user secrets location {userSecretsFallbackDir}");
SupportsDebuggingAnnotation.cs (1)
66throw new InvalidOperationException(
TerminalResourceBuilderExtensions.cs (2)
76throw new InvalidOperationException( 177throw new InvalidOperationException(
Aspire.Hosting.Analyzers (1)
Infrastructure\WellKnownTypes.cs (1)
95?? throw new InvalidOperationException($"Failed to resolve well-known type '{WellKnownTypeData.WellKnownTypeNames[index]}'.");
Aspire.Hosting.Azure (38)
AcrLoginService.cs (1)
186throw new InvalidOperationException($"Response missing refresh_token.");
AzureBicepResource.cs (7)
161throw new InvalidOperationException("Multiple template sources are specified."); 185?? throw new InvalidOperationException($"Could not find resource {TemplateResourceName} in assembly {GetType().Assembly}"); 213?? throw new InvalidOperationException($"Could not find resource {TemplateResourceName} in assembly {GetType().Assembly}"); 221throw new InvalidOperationException("No template source specified."); 340throw new InvalidOperationException("AzureEnvironmentResource must be present in the application model."); 560throw new InvalidOperationException($"No secret output for {Name}"); 618throw new InvalidOperationException($"No output for {Name} on resource {Resource.Name}");
AzureBicepResourceScope.cs (1)
83public object ResourceGroup => _resourceGroup ?? throw new InvalidOperationException("The Azure Bicep resource scope does not target a resource group.");
AzureEnvironmentResource.cs (1)
251throw new InvalidOperationException(
AzureProvisioningController.cs (10)
1137? new InvalidOperationException(message) 1138: new InvalidOperationException(message, failureException); 1243throw new InvalidOperationException($"Azure resource '{resourceName}' was not found or cannot be reprovisioned."); 1343throw new InvalidOperationException(AzureProvisioningStrings.ChangeResourceLocationKeyVaultUnsupported); 2118throw new InvalidOperationException($"No cached Azure resource IDs were found for resource '{intent.ResourceName}'. Use '{ForgetStateCommandName}' to clear local state only."); 2319throw new InvalidOperationException(FormatUserString( 2330throw new InvalidOperationException(FormatUserString( 2828throw new InvalidOperationException($"No active cached Azure deployment was found for resource '{resourceName}'."); 3458throw new InvalidOperationException(FormatUserString( 4012FailProvisioning(resource.AzureResource, new InvalidOperationException($"Unable to provision {resource.AzureResource.Name}.", ex));
AzureProvisioningResource.cs (1)
256throw new InvalidOperationException("The Azure Bicep resource scope must specify a resource group, subscription, or tenant scope.");
AzurePublishingContext.cs (1)
294throw new InvalidOperationException("The Azure Bicep resource scope must specify a resource group, subscription, or tenant scope.");
AzureResourcePreparer.cs (2)
171throw new InvalidOperationException("The application model does not support role assignments. Ensure you are using an environment that supports role assignments, for example AddAzureContainerAppEnvironment."); 176throw 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 (2)
74throw new InvalidOperationException( 85throw new InvalidOperationException(
Provisioning\Internal\DefaultArmClientProvider.cs (2)
79throw new InvalidOperationException($"Could not find tenant id {subscriptionResource.TenantId} for subscription {subscriptionResource.DisplayName}."); 248throw new InvalidOperationException($"Unable to purge deleted Azure Key Vault '{vaultResourceId}' because the subscription ID is missing or invalid.");
Provisioning\Internal\DefaultAzurePrincipalProvider.cs (2)
39throw new InvalidOperationException( 79throw new InvalidOperationException(
Provisioning\JsonExtensions.cs (1)
29throw new InvalidOperationException($"Failed to get or create property '{key}'");
Provisioning\Provisioners\BicepProvisioner.cs (6)
424throw new InvalidOperationException($"Azure deployment for {resource.Name} was canceled."); 433throw new InvalidOperationException($"Azure deployment for {resource.Name} failed."); 786throw new InvalidOperationException($"Deployment of {resource.Name} to {deploymentTargetName} failed with {provisioningState}"); 1288IValueProvider valueProvider => await valueProvider.GetValueAsync(cancellationToken).ConfigureAwait(false) ?? throw new InvalidOperationException("The Azure resource scope value cannot be null."), 1361var vaultUri = resource.Outputs[kvr.VaultUriOutputReference.Name] as string ?? throw new InvalidOperationException($"{kvr.VaultUriOutputReference.Name} not found in outputs."); 1385throw new InvalidOperationException("An Azure principal parameter was not supplied a value. Ensure you are using an environment that supports role assignments, for example AddAzureContainerAppEnvironment.");
src\Aspire.Hosting\Dcp\Process\ProcessUtil.cs (1)
163processLifetimeTcs.TrySetException(new InvalidOperationException(message));
Aspire.Hosting.Azure.AppContainers (14)
AzureContainerAppEnvironmentResource.cs (2)
331throw new InvalidOperationException( 387_ => throw new InvalidOperationException($"The property '{property}' is not supported for the endpoint '{endpoint.Name}'.")
AzureContainerAppExtensions.cs (6)
87throw 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(AddAzureContainerAppEnvironment)}'."); 349throw new InvalidOperationException($"No container registry associated with environment '{appEnvResource.Name}'. This should have been added automatically."); 764throw new InvalidOperationException( 773throw new InvalidOperationException( 782throw new InvalidOperationException( 837throw new InvalidOperationException($"No container registry associated with environment '{appEnvResource.Name}'. This should have been added automatically.");
BaseContainerAppContext.cs (1)
43public AzureResourceInfrastructure Infra => _infrastructure ?? throw new InvalidOperationException("Infra is not set");
ContainerAppEnvironmentContext.cs (2)
66throw new InvalidOperationException($"Container app context not found for resource {resource.Name}."); 104throw new InvalidOperationException($"Resource '{resource.Name}' cannot have both AzureContainerAppCustomizationAnnotation and AzureContainerAppJobCustomizationAnnotation.");
ContainerAppUrls.cs (3)
18?? throw new InvalidOperationException($"Missing container app environment id output for '{containerAppEnv.Name}'."); 28var subscriptionId = environmentId.SubscriptionId ?? throw new InvalidOperationException($"Container app environment id '{containerAppEnvironmentId}' does not contain a subscription id."); 29var resourceGroupName = environmentId.ResourceGroupName ?? throw new InvalidOperationException($"Container app environment id '{containerAppEnvironmentId}' does not contain a resource group name.");
Aspire.Hosting.Azure.AppService (10)
AppSvcUrls.cs (3)
19?? throw new InvalidOperationException($"Missing app service plan id output for '{computerEnv.Name}'."); 34var subscriptionId = planId.SubscriptionId ?? throw new InvalidOperationException($"App Service plan id '{appServicePlanId}' does not contain a subscription id."); 35var resourceGroupName = planId.ResourceGroupName ?? throw new InvalidOperationException($"App Service plan id '{appServicePlanId}' does not contain a resource group name.");
AzureAppServiceComputeResourceExtensions.cs (1)
93throw new InvalidOperationException($"{nameof(SkipEnvironmentVariableNameChecks)} can only be used after PublishAsAzureAppServiceWebsite.");
AzureAppServiceEnvironmentContext.cs (1)
66throw new InvalidOperationException($"App Service context not found for resource {resource.Name}.");
AzureAppServiceEnvironmentExtensions.cs (2)
60throw 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(AddAzureAppServiceEnvironment)}'."); 148throw new InvalidOperationException($"No container registry associated with environment '{resource.Name}'. This should have been added automatically.");
AzureAppServiceEnvironmentResource.cs (2)
493throw new InvalidOperationException( 539_ => throw new InvalidOperationException($"The property '{property}' is not supported for the endpoint '{endpoint.Name}'.")
AzureAppServiceWebsiteContext.cs (1)
35public AzureResourceInfrastructure Infra => _infrastructure ?? throw new InvalidOperationException("Infra is not set");
Aspire.Hosting.Azure.ContainerRegistry (6)
AzureContainerRegistryExtensions.cs (2)
118var containerRegistry = builder.Resource.ContainerRegistry ?? throw new InvalidOperationException($"The resource '{builder.Resource.Name}' does not have an associated Azure Container Registry."); 119var registry = containerRegistry as AzureContainerRegistryResource ?? throw new InvalidOperationException($"The Container Registry associated with resource '{builder.Resource.Name}' is not an Azure Container Registry.");
AzureContainerRegistryHelpers.cs (4)
27throw new InvalidOperationException("AzureEnvironmentResource must be present in the application model."); 29throw new InvalidOperationException("Failed to retrieve container registry information."); 32throw new InvalidOperationException("Failed to retrieve container registry endpoint."); 44?? throw new InvalidOperationException("Tenant ID is required for ACR authentication but was not available in provisioning context.");
Aspire.Hosting.Azure.CosmosDB (2)
AzureCosmosDBExtensions.cs (2)
135throw new InvalidOperationException("CosmosClient is not initialized."); 218sp => cosmosClient ?? throw new InvalidOperationException("CosmosClient is not initialized."),
Aspire.Hosting.Azure.EventHubs (2)
AzureEventHubsExtensions.cs (2)
258throw new InvalidOperationException("The Azure Event Hubs resource is already configured to run as an emulator."); 334throw new InvalidOperationException("The configuration file mount could not be parsed.");
Aspire.Hosting.Azure.FrontDoor (3)
AzureFrontDoorExtensions.cs (3)
194throw new InvalidOperationException( 209throw new InvalidOperationException( 225throw new InvalidOperationException(
Aspire.Hosting.Azure.Functions (6)
AzureFunctionsProjectResourceExtensions.cs (2)
371throw new InvalidOperationException("Optional references are not supported for Azure Functions resources."); 376throw new InvalidOperationException("Named service references are not supported for Azure Functions resources.");
DurableTask\DurableTaskHubResource.cs (1)
52_ => throw new InvalidOperationException($"Unexpected Task Hub name type: {taskHubNameAnnotation.HubName.GetType().Name}")
DurableTask\DurableTaskSchedulerResource.cs (3)
45_ => throw new InvalidOperationException($"Unexpected connection string type: {connectionStringAnnotation.ConnectionString.GetType().Name}"), 49throw new InvalidOperationException($"Unable to resolve the Durable Task Scheduler connection string. Configure the scheduler using {nameof(DurableTaskResourceExtensions.RunAsEmulator)}() or {nameof(DurableTaskResourceExtensions.RunAsExisting)}(connectionString) before accessing {nameof(ConnectionStringExpression)}."); 61throw new InvalidOperationException("Dashboard endpoint is only available when running as an emulator.");
Aspire.Hosting.Azure.KeyVault (1)
AzureKeyVaultSecretReference.cs (1)
39throw new InvalidOperationException($"Secret '{secretName}' not found in Key Vault '{azureKeyVaultResource.Name}'.");
Aspire.Hosting.Azure.Kubernetes (20)
AksPreviewIngressProfileInjector.cs (6)
95?? throw new InvalidOperationException("ProvisionableConstruct.DefineProperty<T> not found via reflection. The Azure.Provisioning surface may have changed; review AksPreviewIngressProfileInjector."); 165?? throw new InvalidOperationException("ContainerServiceManagedCluster.Properties not found via reflection. The Azure.Provisioning surface may have changed; review AksPreviewIngressProfileInjector."); 167?? throw new InvalidOperationException("ContainerServiceManagedCluster.Properties returned null."); 172?? throw new InvalidOperationException("ManagedClusterProperties.IngressProfile not found via reflection. The Azure.Provisioning surface may have changed; review AksPreviewIngressProfileInjector."); 174?? throw new InvalidOperationException("ManagedClusterProperties.IngressProfile was null even after assigning IngressWebAppRouting; the Azure.Provisioning lazy-initialization behavior may have changed."); 178throw new InvalidOperationException($"Expected IngressProfile to be a {IngressProfileTypeFullName} but found {ipInstance.GetType().FullName}.");
AzureKubernetesEnvironmentExtensions.cs (1)
748?? throw new InvalidOperationException($"AzureKubernetesLoadBalancerResource '{lb.Name}' is missing its subnet binding.");
AzureKubernetesEnvironmentResource.AksPipeline.cs (12)
374throw new InvalidOperationException( 379?? throw new InvalidOperationException( 468throw new InvalidOperationException( 546throw new InvalidOperationException( 566throw new InvalidOperationException( 638string or IValueProvider => throw new InvalidOperationException( 680throw new InvalidOperationException( 740throw new InvalidOperationException( 755throw new InvalidOperationException( 762throw new InvalidOperationException( 791throw new InvalidOperationException( 853throw new InvalidOperationException(
src\Aspire.Hosting\Dcp\Process\ProcessUtil.cs (1)
163processLifetimeTcs.TrySetException(new InvalidOperationException(message));
Aspire.Hosting.Azure.Kusto (2)
AzureKustoClusterResource.cs (2)
168_ => throw new InvalidOperationException($"Unsupported principal type: {principalType}") 172throw new InvalidOperationException($"Unsupported principal type kind: {kind}");
Aspire.Hosting.Azure.Kusto.Tests (2)
KustoResiliencePipelinesTests.cs (1)
37throw new InvalidOperationException();
tests\Shared\AsyncTestHelpers.cs (1)
238throw new InvalidOperationException($"Assert failed after {retries} retries: {message}");
Aspire.Hosting.Azure.Network (4)
AzureVirtualNetworkExtensions.cs (4)
322throw new InvalidOperationException( 338throw new InvalidOperationException( 471throw new InvalidOperationException( 673throw new InvalidOperationException($"Could not generate a unique name for security rule '{baseName}'");
Aspire.Hosting.Azure.PostgreSQL (1)
AzurePostgresExtensions.cs (1)
255throw new InvalidOperationException($"Could not find a {nameof(AzurePostgresFlexibleServerDatabaseResource)} with name {database.Key}.");
Aspire.Hosting.Azure.ServiceBus (2)
AzureServiceBusExtensions.cs (2)
402throw new InvalidOperationException("The Azure Service Bus resource is already configured to run as an emulator."); 484throw new InvalidOperationException("The configuration file mount could not be parsed.");
Aspire.Hosting.Azure.Sql (6)
AzureSqlExtensions.cs (2)
206throw new InvalidOperationException($"Could not find a {nameof(AzureSqlDatabaseResource)} with name {database.Key}."); 469?? throw new InvalidOperationException("Could not find a StorageAccount resource in the infrastructure. Ensure that the provided storage builder creates a StorageAccount resource.");
AzureSqlServerResource.cs (1)
628?? throw new InvalidOperationException("Could not find a StorageAccount resource in the infrastructure.");
SubnetAddressAllocator.cs (3)
32?? throw new InvalidOperationException( 41throw new InvalidOperationException( 78throw new InvalidOperationException(
Aspire.Hosting.Azure.Storage (15)
AzureDataLakeStorageResource.cs (3)
41throw new InvalidOperationException("Emulator currently does not support data lake."); 64throw new InvalidOperationException("Emulator currently does not support data lake."); 77throw new InvalidOperationException("Emulator currently does not support data lake.");
AzureStorageExtensions.cs (9)
187throw new InvalidOperationException("Emulator currently does not support data lake."); 229_ = blobServiceClient ?? throw new InvalidOperationException($"{nameof(BlobServiceClient)} is not initialized."); 230_ = queueServiceClient ?? throw new InvalidOperationException($"{nameof(QueueServiceClient)} is not initialized."); 250return blobServiceClient ?? throw new InvalidOperationException("BlobServiceClient is not initialized."); 502sp => blobServiceClient ??= CreateBlobServiceClient(connectionString ?? throw new InvalidOperationException("Connection string is not initialized.")), 572sp => blobServiceClient ??= CreateBlobServiceClient(connectionString ?? throw new InvalidOperationException("Connection string is not initialized.")), 666sp => queueServiceClient ??= CreateQueueServiceClient(connectionString ?? throw new InvalidOperationException("Connection string is not initialized.")), 809return blobServiceClient ??= CreateBlobServiceClient(connectionString ?? throw new InvalidOperationException("Connection string is not initialized.")); 851return queueServiceClient ??= CreateQueueServiceClient(connectionString ?? throw new InvalidOperationException("Connection string is not initialized."));
AzureStorageResource.cs (3)
104? throw new InvalidOperationException("Emulator currently does not support data lake.") 133: throw new InvalidOperationException("The Azure Storage resource is not running in the local emulator."); 148? throw new InvalidOperationException("Emulator currently does not support data lake.")
Aspire.Hosting.Azure.Tests (22)
AzureBicepProvisionerTests.cs (4)
172var sentinel = new InvalidOperationException("stop-after-populate-well-known-parameters"); 1728: throw new InvalidOperationException($"Expected current state for resource '{resourceName}'."); 1964public override ArmDeploymentResource Value => throw new InvalidOperationException("The deployment did not complete successfully."); 2064public override ArmDeploymentResource Value => throw new InvalidOperationException("The deployment did not complete successfully.");
AzureDeployerTests.cs (1)
1480_ => throw new InvalidOperationException($"Resource id '{resourceId}' does not contain both subscription and resource group segments.")
AzureEnvironmentResourceExtensionsTests.cs (5)
5404throw new InvalidOperationException($"Concurrency conflict detected in section '{section.SectionName}'. Expected version 1, but current version is 2."); 5658throw new InvalidOperationException("boom"); 5664private readonly Exception _exception = exception ?? new InvalidOperationException("boom"); 5699throw new InvalidOperationException("Deployment operation completed as canceled."); 5733return Task.FromException(new AzureProvisioningFailureException(failure, new InvalidOperationException("Key Vault is soft-deleted.")));
AzureEventHubsExtensionsTests.cs (1)
520_ => throw new InvalidOperationException($"Unknown resource lifetime '{Enum.GetName(typeof(Lifetime), lifetime)}'.")
AzureServiceBusExtensionsTests.cs (1)
617_ => throw new InvalidOperationException($"Unknown resource lifetime '{Enum.GetName(typeof(Lifetime), lifetime)}'.")
DefaultArmClientProviderTests.cs (2)
490_ => throw new InvalidOperationException($"Unexpected ARM request: {uri}") 796throw new InvalidOperationException($"No active timer exists for '{dueTime}'.");
ProvisioningTestHelpers.cs (1)
437_ => throw new InvalidOperationException($"Unexpected deployment probe result type '{result.GetType()}'.")
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()
SqlServerContainerFixture.cs (1)
18throw new InvalidOperationException("The test container was not initialized.");
Aspire.Hosting.Blazor (6)
BlazorGatewayExtensions.cs (2)
333?? throw new InvalidOperationException($"The gateway '{gateway.Resource.Name}' must define an HTTP or HTTPS endpoint."); 706throw new InvalidOperationException("GatewayAppsAnnotation not found on resource.");
BlazorHostedExtensions.cs (1)
139?? throw new InvalidOperationException($"The host '{host.Resource.Name}' must define an HTTP or HTTPS endpoint.");
BrowserDebuggerHelper.cs (1)
110throw new InvalidOperationException(
GatewayConfigurationBuilder.cs (1)
272?? throw new InvalidOperationException("At least one gateway endpoint (HTTP or HTTPS) must be provided.");
Manifests\EndpointsManifestTransformer.cs (1)
25?? throw new InvalidOperationException($"Failed to deserialize endpoints manifest from '{manifestPath}'.");
Aspire.Hosting.Blazor.Tests (1)
tests\Shared\AsyncTestHelpers.cs (1)
238throw new InvalidOperationException($"Assert failed after {retries} retries: {message}");
Aspire.Hosting.Browsers (63)
BrowserConfiguration.cs (4)
57throw new InvalidOperationException(BrowserMessageStrings.BrowserLogsEmptyBrowserConfiguration); 62throw new InvalidOperationException(BrowserMessageStrings.BrowserLogsEmptyProfileConfiguration); 67throw new InvalidOperationException( 128throw new InvalidOperationException(
BrowserEndpointDiscovery.cs (1)
139throw new InvalidOperationException(
BrowserHost.cs (1)
42var debugEndpoint = DebugEndpoint ?? throw new InvalidOperationException("Tracked browser host does not expose a WebSocket debug endpoint.");
BrowserHostRegistry.cs (2)
57?? throw new InvalidOperationException(string.Format(CultureInfo.CurrentCulture, BrowserMessageStrings.BrowserLogsUnableToLocateBrowser, configuration.Browser)); 365throw new InvalidOperationException(
BrowserLogsBuilderExtensions.cs (2)
330throw new InvalidOperationException(string.Format(CultureInfo.CurrentCulture, BrowserMessageStrings.BrowserLogsResourceMissingHttpEndpoint, resource.Name)); 336throw new InvalidOperationException(string.Format(CultureInfo.CurrentCulture, BrowserMessageStrings.BrowserLogsEndpointNotAllocated, endpointAnnotation.Name, resource.Name));
BrowserLogsCdpConnection.cs (6)
291terminalException = new InvalidOperationException( 307terminalException ??= new InvalidOperationException("Browser debug connection closed."); 319throw terminalException ?? new InvalidOperationException("Browser debug connection closed."); 505return new InvalidOperationException($"Browser debug connection closed by the remote endpoint with status '{closeStatus}' ({(int)closeStatus}): {result.CloseStatusDescription}"); 508return new InvalidOperationException($"Browser debug connection closed by the remote endpoint with status '{closeStatus}' ({(int)closeStatus})."); 511return new InvalidOperationException("Browser debug connection closed by the remote endpoint without a close status.");
BrowserLogsCdpConnectionMultiplexer.cs (3)
99var connectionException = new InvalidOperationException("Tracked browser CDP event handler failed.", ex); 122throw new InvalidOperationException("Tracked browser CDP pipe is no longer active."); 206throw new InvalidOperationException("Tracked browser CDP connection subscription is no longer active.");
BrowserLogsCdpProtocol.cs (13)
67throw new InvalidOperationException("Tracked browser protocol frame was not a JSON object."); 83throw new InvalidOperationException("Tracked browser protocol frame was malformed."); 89throw new InvalidOperationException("Tracked browser protocol frame ended unexpectedly."); 97throw new InvalidOperationException("Tracked browser protocol response id was not an integer."); 105: throw new InvalidOperationException("Tracked browser protocol event method was not a string."); 170return envelope.Result ?? throw new InvalidOperationException("Tracked browser target creation did not return a result payload."); 178return envelope.Result ?? throw new InvalidOperationException("Tracked browser target attachment did not return a result payload."); 186return envelope.Result ?? throw new InvalidOperationException("Tracked browser target discovery did not return a result payload."); 202var result = envelope.Result ?? throw new InvalidOperationException("Tracked browser screenshot capture did not return a result payload."); 205throw new InvalidOperationException("Tracked browser screenshot capture did not return image data."); 303?? throw new InvalidOperationException("Tracked browser protocol frame was empty."); 319throw new InvalidOperationException($"{message} (CDP error {code})."); 322throw new InvalidOperationException(message);
BrowserLogsConfigurationManager.cs (2)
400throw new InvalidOperationException( 412throw new InvalidOperationException(
BrowserLogsRunningSession.cs (8)
131public string BrowserExecutable => _browserExecutable ?? throw new InvalidOperationException("Browser executable is not available before the session starts."); 135public BrowserHostOwnership BrowserHostOwnership => _browserHostOwnership ?? throw new InvalidOperationException("Browser host ownership is not available before the session starts."); 141public string TargetId => _targetId ?? throw new InvalidOperationException("Browser target id is not available before the session starts."); 143private Task<BrowserSessionResult> Completion => _completion ?? throw new InvalidOperationException("Session has not been started."); 178var pageSession = _pageSession ?? throw new InvalidOperationException("Browser page session is not available."); 181var data = result.Data ?? throw new InvalidOperationException("Tracked browser screenshot capture returned no image data."); 189throw new InvalidOperationException("Tracked browser screenshot capture returned invalid image data.", ex); 279var pageSession = _pageSession ?? throw new InvalidOperationException("Browser page session is not available.");
BrowserLogsSessionManager.cs (1)
206throw new InvalidOperationException("No active tracked browser session is available to capture.");
BrowserPageSession.cs (13)
71public string TargetId => _targetId ?? throw new InvalidOperationException("Browser target id is not available before the target session starts."); 73public string TargetSessionId => _targetSessionId ?? throw new InvalidOperationException("Browser target session id is not available before the target session starts."); 75public Task<BrowserPageSessionResult> Completion => _monitorTask ?? throw new InvalidOperationException("Browser page session has not started."); 85var connection = _connection ?? throw new InvalidOperationException("Tracked browser debug connection is not available."); 86var targetSessionId = _targetSessionId ?? throw new InvalidOperationException("Browser target session id is not available before the target session starts."); 109new InvalidOperationException($"Tracked browser page crashed with status '{targetCrashed.Parameters.Status}' and error code '{targetCrashed.Parameters.ErrorCode}'.")), 121new InvalidOperationException($"Tracked browser inspector detached: {inspectorDetached.Reason ?? "unknown reason"}.")), 256throw new InvalidOperationException("Tracked browser target id is not available."); 263?? throw new InvalidOperationException("Browser target attachment did not return a session id."); 295?? throw new InvalidOperationException("Browser target creation did not return a target id."); 345var error = new InvalidOperationException($"Tracked browser host '{_host.Identity}' ended before the page session completed."); 366connectionError ??= new InvalidOperationException("The tracked browser debug connection closed without reporting a reason."); 460var connection = _connection ?? throw new InvalidOperationException("Tracked browser debug connection is not available.");
BrowserUserDataPathResolver.cs (1)
105throw new InvalidOperationException(
ChromiumBrowserResolver.cs (6)
59throw new InvalidOperationException(string.Format(CultureInfo.CurrentCulture, BrowserMessageStrings.BrowserLogsUserDataDirectoryNotFound, userDataDirectory)); 94throw new InvalidOperationException( 100throw new InvalidOperationException( 106throw new InvalidOperationException( 112throw new InvalidOperationException( 146throw new InvalidOperationException(
Aspire.Hosting.Browsers.Tests (84)
BrowserConnectionDiagnosticsLoggerTests.cs (4)
23new InvalidOperationException("Connecting to the tracked browser debug endpoint failed.", new TimeoutException("Timed out waiting for a tracked browser protocol response to 'Target.attachToTarget'."))); 25new InvalidOperationException("Browser debug connection closed by the remote endpoint with status 'EndpointUnavailable' (1001): browser crashed")); 28new InvalidOperationException("Attaching to the tracked browser target failed.", new TimeoutException("Timed out waiting for a tracked browser protocol response to 'Target.attachToTarget'."))); 30new InvalidOperationException("Connecting to the tracked browser debug endpoint failed.", new WebSocketException("Connection refused")));
BrowserLogsBuilderExtensionsTests.cs (7)
1025sessionFactory.NextStartException = new InvalidOperationException("Launch failed."); 1103sessionFactory.NextStartException = new InvalidOperationException("Launch failed."); 1137NextStartException = new InvalidOperationException("Launch failed.", new TimeoutException("CDP timed out.")) 1193NextStartException = new InvalidOperationException("Launch failed.") 1542await firstSession.CompleteAsync(exitCode: 0, error: new InvalidOperationException("Target crashed.")); 1756?? throw new InvalidOperationException("Expected browser session property JSON."); 1763?? throw new InvalidOperationException("Expected a browser protocol event frame.");
BrowserLogsCdpConnectionTests.cs (3)
259await using var failingConnection = multiplexer.CreateConnection(_ => throw new InvalidOperationException("boom")); 355throw new InvalidOperationException("The in-memory websocket closed before a JSON message was received."); 522throw new InvalidOperationException("A failed connect should not detach a websocket.");
BrowserLogsSessionManagerTests.cs (1)
622throw new InvalidOperationException("StartSessionAsync should not be called after disposal.");
BrowserPageSessionTests.cs (4)
237firstConnection.FailCompletion(new InvalidOperationException("Socket reset.")); 293throw new InvalidOperationException("Simulated connection failure."); 311firstConnection.FailCompletion(new InvalidOperationException("Socket reset.")); 474? throw new InvalidOperationException("The fake connection is not connected.")
ConsoleLoggingTestHelpers.cs (1)
58?? throw new InvalidOperationException("ResourceLoggerService.TimeProvider was not found.");
src\Aspire.Hosting.Browsers\BrowserConfiguration.cs (4)
57throw new InvalidOperationException(BrowserMessageStrings.BrowserLogsEmptyBrowserConfiguration); 62throw new InvalidOperationException(BrowserMessageStrings.BrowserLogsEmptyProfileConfiguration); 67throw new InvalidOperationException( 128throw new InvalidOperationException(
src\Aspire.Hosting.Browsers\BrowserEndpointDiscovery.cs (1)
139throw new InvalidOperationException(
src\Aspire.Hosting.Browsers\BrowserHost.cs (1)
42var debugEndpoint = DebugEndpoint ?? throw new InvalidOperationException("Tracked browser host does not expose a WebSocket debug endpoint.");
src\Aspire.Hosting.Browsers\BrowserHostRegistry.cs (2)
57?? throw new InvalidOperationException(string.Format(CultureInfo.CurrentCulture, BrowserMessageStrings.BrowserLogsUnableToLocateBrowser, configuration.Browser)); 365throw new InvalidOperationException(
src\Aspire.Hosting.Browsers\BrowserLogsBuilderExtensions.cs (2)
330throw new InvalidOperationException(string.Format(CultureInfo.CurrentCulture, BrowserMessageStrings.BrowserLogsResourceMissingHttpEndpoint, resource.Name)); 336throw new InvalidOperationException(string.Format(CultureInfo.CurrentCulture, BrowserMessageStrings.BrowserLogsEndpointNotAllocated, endpointAnnotation.Name, resource.Name));
src\Aspire.Hosting.Browsers\BrowserLogsCdpConnection.cs (6)
291terminalException = new InvalidOperationException( 307terminalException ??= new InvalidOperationException("Browser debug connection closed."); 319throw terminalException ?? new InvalidOperationException("Browser debug connection closed."); 505return new InvalidOperationException($"Browser debug connection closed by the remote endpoint with status '{closeStatus}' ({(int)closeStatus}): {result.CloseStatusDescription}"); 508return new InvalidOperationException($"Browser debug connection closed by the remote endpoint with status '{closeStatus}' ({(int)closeStatus})."); 511return new InvalidOperationException("Browser debug connection closed by the remote endpoint without a close status.");
src\Aspire.Hosting.Browsers\BrowserLogsCdpConnectionMultiplexer.cs (3)
99var connectionException = new InvalidOperationException("Tracked browser CDP event handler failed.", ex); 122throw new InvalidOperationException("Tracked browser CDP pipe is no longer active."); 206throw new InvalidOperationException("Tracked browser CDP connection subscription is no longer active.");
src\Aspire.Hosting.Browsers\BrowserLogsCdpProtocol.cs (13)
67throw new InvalidOperationException("Tracked browser protocol frame was not a JSON object."); 83throw new InvalidOperationException("Tracked browser protocol frame was malformed."); 89throw new InvalidOperationException("Tracked browser protocol frame ended unexpectedly."); 97throw new InvalidOperationException("Tracked browser protocol response id was not an integer."); 105: throw new InvalidOperationException("Tracked browser protocol event method was not a string."); 170return envelope.Result ?? throw new InvalidOperationException("Tracked browser target creation did not return a result payload."); 178return envelope.Result ?? throw new InvalidOperationException("Tracked browser target attachment did not return a result payload."); 186return envelope.Result ?? throw new InvalidOperationException("Tracked browser target discovery did not return a result payload."); 202var result = envelope.Result ?? throw new InvalidOperationException("Tracked browser screenshot capture did not return a result payload."); 205throw new InvalidOperationException("Tracked browser screenshot capture did not return image data."); 303?? throw new InvalidOperationException("Tracked browser protocol frame was empty."); 319throw new InvalidOperationException($"{message} (CDP error {code})."); 322throw new InvalidOperationException(message);
src\Aspire.Hosting.Browsers\BrowserLogsConfigurationManager.cs (2)
400throw new InvalidOperationException( 412throw new InvalidOperationException(
src\Aspire.Hosting.Browsers\BrowserLogsRunningSession.cs (8)
131public string BrowserExecutable => _browserExecutable ?? throw new InvalidOperationException("Browser executable is not available before the session starts."); 135public BrowserHostOwnership BrowserHostOwnership => _browserHostOwnership ?? throw new InvalidOperationException("Browser host ownership is not available before the session starts."); 141public string TargetId => _targetId ?? throw new InvalidOperationException("Browser target id is not available before the session starts."); 143private Task<BrowserSessionResult> Completion => _completion ?? throw new InvalidOperationException("Session has not been started."); 178var pageSession = _pageSession ?? throw new InvalidOperationException("Browser page session is not available."); 181var data = result.Data ?? throw new InvalidOperationException("Tracked browser screenshot capture returned no image data."); 189throw new InvalidOperationException("Tracked browser screenshot capture returned invalid image data.", ex); 279var pageSession = _pageSession ?? throw new InvalidOperationException("Browser page session is not available.");
src\Aspire.Hosting.Browsers\BrowserLogsSessionManager.cs (1)
206throw new InvalidOperationException("No active tracked browser session is available to capture.");
src\Aspire.Hosting.Browsers\BrowserPageSession.cs (13)
71public string TargetId => _targetId ?? throw new InvalidOperationException("Browser target id is not available before the target session starts."); 73public string TargetSessionId => _targetSessionId ?? throw new InvalidOperationException("Browser target session id is not available before the target session starts."); 75public Task<BrowserPageSessionResult> Completion => _monitorTask ?? throw new InvalidOperationException("Browser page session has not started."); 85var connection = _connection ?? throw new InvalidOperationException("Tracked browser debug connection is not available."); 86var targetSessionId = _targetSessionId ?? throw new InvalidOperationException("Browser target session id is not available before the target session starts."); 109new InvalidOperationException($"Tracked browser page crashed with status '{targetCrashed.Parameters.Status}' and error code '{targetCrashed.Parameters.ErrorCode}'.")), 121new InvalidOperationException($"Tracked browser inspector detached: {inspectorDetached.Reason ?? "unknown reason"}.")), 256throw new InvalidOperationException("Tracked browser target id is not available."); 263?? throw new InvalidOperationException("Browser target attachment did not return a session id."); 295?? throw new InvalidOperationException("Browser target creation did not return a target id."); 345var error = new InvalidOperationException($"Tracked browser host '{_host.Identity}' ended before the page session completed."); 366connectionError ??= new InvalidOperationException("The tracked browser debug connection closed without reporting a reason."); 460var connection = _connection ?? throw new InvalidOperationException("Tracked browser debug connection is not available.");
src\Aspire.Hosting.Browsers\BrowserUserDataPathResolver.cs (1)
105throw new InvalidOperationException(
src\Aspire.Hosting.Browsers\ChromiumBrowserResolver.cs (6)
59throw new InvalidOperationException(string.Format(CultureInfo.CurrentCulture, BrowserMessageStrings.BrowserLogsUserDataDirectoryNotFound, userDataDirectory)); 94throw new InvalidOperationException( 100throw new InvalidOperationException( 106throw new InvalidOperationException( 112throw new InvalidOperationException( 146throw new InvalidOperationException(
tests\Shared\AsyncTestHelpers.cs (1)
238throw new InvalidOperationException($"Assert failed after {retries} retries: {message}");
Aspire.Hosting.CodeGeneration.Go (1)
AtsGoCodeGenerator.cs (1)
91?? throw new InvalidOperationException($"Embedded resource '{name}' not found.");
Aspire.Hosting.CodeGeneration.Java (1)
AtsJavaCodeGenerator.cs (1)
75?? throw new InvalidOperationException($"Embedded resource '{name}' not found.");
Aspire.Hosting.CodeGeneration.Python (4)
AtsPythonCodeGenerator.cs (3)
511throw new InvalidOperationException( 653?? throw new InvalidOperationException($"Embedded resource '{name}' not found."); 1482throw new InvalidOperationException("Cannot support a generic interface that doesn't have exactly 1 argument.");
PythonLanguageSupport.cs (1)
304?? throw new InvalidOperationException("Embedded resource 'microvenv.py' not found.");
Aspire.Hosting.CodeGeneration.Rust (1)
AtsRustCodeGenerator.cs (1)
73?? throw new InvalidOperationException($"Embedded resource '{name}' not found.");
Aspire.Hosting.CodeGeneration.Rust.Tests (1)
tests\Shared\TemporaryWorkspace.cs (1)
51throw new InvalidOperationException($"Failed to initialize git repository: {error}");
Aspire.Hosting.CodeGeneration.TypeScript (4)
AtsTypeScriptCodeGenerator.cs (3)
310throw new InvalidOperationException( 418throw new InvalidOperationException("Union input types must define at least one member type."); 4673throw new InvalidOperationException(
EmbeddedResources.cs (1)
26?? throw new InvalidOperationException($"Embedded resource '{name}' not found.");
Aspire.Hosting.CodeGeneration.TypeScript.Tests (1)
tests\Shared\TemporaryWorkspace.cs (1)
51throw new InvalidOperationException($"Failed to initialize git repository: {error}");
Aspire.Hosting.Containers.Tests (1)
tests\Shared\AsyncTestHelpers.cs (1)
238throw new InvalidOperationException($"Assert failed after {retries} retries: {message}");
Aspire.Hosting.DevTunnels (1)
DevTunnelCli.cs (1)
253throw new InvalidOperationException("Failed to start devtunnel process.");
Aspire.Hosting.DevTunnels.Tests (2)
TestDevTunnelCli.cs (1)
61throw new InvalidOperationException("No test devtunnel CLI result was configured.");
tests\Shared\AsyncTestHelpers.cs (1)
238throw new InvalidOperationException($"Assert failed after {retries} retries: {message}");
Aspire.Hosting.Docker (17)
DockerComposeEnvironmentContext.cs (1)
81throw new InvalidOperationException("Volume source and target must be set");
DockerComposeEnvironmentExtensions.cs (2)
48throw 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(AddDockerComposeEnvironment)}'."); 199configure(builder.Resource.Dashboard ?? throw new InvalidOperationException("Dashboard resource is not initialized"));
DockerComposeEnvironmentResource.cs (3)
408throw new InvalidOperationException($"Docker Compose file not found at {dockerComposeFilePath}"); 452throw new InvalidOperationException( 493throw new InvalidOperationException(
DockerComposeServiceResourceExtensions.cs (1)
85args[index++] = val ?? throw new InvalidOperationException("Value is null");
EnvFile.cs (2)
91throw new InvalidOperationException("Cannot save EnvFile without a path. Use Load() to create an EnvFile with a path."); 131throw new InvalidOperationException("Cannot save EnvFile without a path. Use Load() to create an EnvFile with a path.");
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");
src\Aspire.Hosting\Dcp\Process\ProcessUtil.cs (1)
163processLifetimeTcs.TrySetException(new InvalidOperationException(message));
src\Shared\Yaml\ForceQuotedStringsEventEmitter.cs (1)
65? style ?? throw new InvalidOperationException("Style cannot be null when not applying double quotes.")
UnixFileModeTypeConverter.cs (2)
21throw new InvalidOperationException(parser.Current?.ToString()); 34throw new InvalidOperationException($"Expected {nameof(UnixFileMode)} but got {value?.GetType()}");
Aspire.Hosting.Dotnet.Tests (1)
tests\Shared\AsyncTestHelpers.cs (1)
238throw new InvalidOperationException($"Assert failed after {retries} retries: {message}");
Aspire.Hosting.DotnetTool.Tests (1)
tests\Shared\AsyncTestHelpers.cs (1)
238throw new InvalidOperationException($"Assert failed after {retries} retries: {message}");
Aspire.Hosting.EntityFrameworkCore (7)
EFMigrationResourceBuilderExtensions.cs (2)
379throw new InvalidOperationException( 397throw new InvalidOperationException(
EFResourceBuilderExtensions.cs (5)
157throw new InvalidOperationException( 163throw new InvalidOperationException( 171throw new InvalidOperationException( 175throw new InvalidOperationException( 391throw new InvalidOperationException($"Failed to generate {operationName} for '{migrationResource.Name}': {result.ErrorMessage}");
Aspire.Hosting.Foundry (38)
FoundryExtensions.cs (1)
212throw new InvalidOperationException(LocalProjectsNotSupportedMessage);
FoundryLocalService.cs (5)
157endpointSource.TrySetException(new InvalidOperationException($"Foundry CLI service exited before reporting an endpoint. Exit code: {process.ExitCode}.")); 162throw new InvalidOperationException("Foundry CLI service process could not be started."); 208throw new InvalidOperationException($"Foundry CLI command '{FormatCommand(arguments)}' could not be started."); 223throw new InvalidOperationException($"Foundry CLI command '{FormatCommand(arguments)}' failed with exit code {process.ExitCode}: {error}{output}"); 267throw new InvalidOperationException($"Foundry CLI did not return a model ID for model '{modelName}'.");
HostedAgent\AzureHostedAgentResource.cs (8)
47var deploymentAnnotation = Target.GetDeploymentTargetAnnotation() ?? throw new InvalidOperationException($"Deployment target annotation is required on resource '{Target.Name}' to deploy as hosted agent."); 49?? throw new InvalidOperationException($"Compute environment for resource '{Target.Name}' must be an AzureCognitiveServicesProjectResource to deploy as hosted agent."); 113throw new InvalidOperationException($"Container image for hosted agent '{Name}' could not be resolved."); 159throw new InvalidOperationException("AzureEnvironmentResource must be present in the application model."); 167throw new InvalidOperationException($"Project '{project.Name}' does not have a valid connection string."); 502return new InvalidOperationException( 528throw new InvalidOperationException($"Value has already been set."); 556throw new InvalidOperationException("Value for provider has not been set.");
HostedAgent\HostedAgentBuilderExtension.cs (2)
489throw new InvalidOperationException($"Unable to create hosted agent for resource '{resource.Name}' because it could not be converted to a container resource."); 498throw new InvalidOperationException($"Unable to create hosted agent for resource '{resource.Name}' because it is not a container, executable, or project resource.");
Project\AzureCognitiveServicesBase.cs (1)
114var r = AzureProvisionableAspireResource<P>.GetProvisionableResource(infra, builder.Resource.GetBicepIdentifier()) ?? throw new InvalidOperationException($"Provisionable resource for Aspire resource '{builder.Resource.Name}' not found in infrastructure.");
Project\ConnectionBuilderExtensions.cs (4)
89throw new InvalidOperationException("Cannot create a Microsoft Foundry project connection to an emulator Cosmos DB instance."); 128throw new InvalidOperationException("Cannot create a Microsoft Foundry project connection to an emulator Storage account."); 168throw new InvalidOperationException("Cannot create a Microsoft Foundry project connection to an emulator Container Registry"); 258throw new InvalidOperationException("Cannot create a Microsoft Foundry project connection to an emulator Key Vault.");
Project\ProjectBuilderExtension.cs (4)
47throw new InvalidOperationException(FoundryExtensions.LocalProjectsNotSupportedMessage); 99throw new InvalidOperationException($"Azure Cognitive Services project resource '{builder.Resource.Name}' already has a Key Vault connection configured."); 440throw new InvalidOperationException($"No container registry configured for Azure Cognitive Services project resource '{aspireResource.Name}'. A container registry is required to publish hosted agents."); 725?? throw new InvalidOperationException($"Microsoft Foundry project resource '{builder.Resource.Name}' does not have a capability host configured. Call addCapabilityHost first.");
Project\ProjectResource.cs (5)
170throw new InvalidOperationException( 238_ => throw new InvalidOperationException( 338throw new InvalidOperationException($"Capability host '{Name}' on project '{projectName}' requires a CosmosDB resource. Call WithCosmosDB() on the capability host builder."); 342throw new InvalidOperationException($"Capability host '{Name}' on project '{projectName}' requires a Storage resource. Call WithStorage() on the capability host builder."); 346throw new InvalidOperationException($"Capability host '{Name}' on project '{projectName}' requires a Search resource. Call WithSearch() on the capability host builder.");
PromptAgent\AzurePromptAgentResource.cs (2)
154throw new InvalidOperationException( 205throw new InvalidOperationException($"Project '{project.Name}' does not have a valid endpoint.");
PromptAgent\PromptAgentBuilderExtensions.cs (2)
338throw new InvalidOperationException( 449throw new InvalidOperationException(
ToolResources\AzureAISearchToolResource.cs (2)
59throw new InvalidOperationException( 69throw new InvalidOperationException(
ToolResources\BingGroundingToolResource.cs (2)
58throw new InvalidOperationException( 67throw new InvalidOperationException(
Aspire.Hosting.Foundry.Tests (1)
tests\Shared\AsyncTestHelpers.cs (1)
238throw new InvalidOperationException($"Assert failed after {retries} retries: {message}");
Aspire.Hosting.Garnet (1)
GarnetBuilderExtensions.cs (1)
127builder.Services.AddHealthChecks().AddRedis(sp => connectionString ?? throw new InvalidOperationException("Connection string is unavailable"), name: healthCheckKey);
Aspire.Hosting.GitHub.Models (4)
src\Shared\IConfigurationExtensions.cs (4)
135throw new InvalidOperationException($"Error parsing URIs from configuration value '{key}'.", ex); 172throw new InvalidOperationException($"Error parsing URIs from configuration value '{key}'.", ex); 202throw new InvalidOperationException($"Unknown {typeof(T).Name} value \"{value}\". Valid values are {string.Join(", ", Enum.GetNames(typeof(T)))}."); 222throw new InvalidOperationException($"Missing required configuration for {key}. Valid values are {string.Join(", ", Enum.GetNames(typeof(T)))}.");
Aspire.Hosting.GitHub.Models.Tests (1)
tests\Shared\AsyncTestHelpers.cs (1)
238throw new InvalidOperationException($"Assert failed after {retries} retries: {message}");
Aspire.Hosting.Integration.Analyzers (1)
src\Aspire.Hosting.Analyzers\Infrastructure\WellKnownTypes.cs (1)
95?? throw new InvalidOperationException($"Failed to resolve well-known type '{WellKnownTypeData.WellKnownTypeNames[index]}'.");
Aspire.Hosting.Java (9)
JavaHostingExtensions.cs (9)
534static message => new InvalidOperationException(message)) is not { } tool) 536throw new InvalidOperationException( 693throw new InvalidOperationException( 700throw new InvalidOperationException( 707throw new InvalidOperationException( 810throw new InvalidOperationException( 817throw new InvalidOperationException( 1157throw new InvalidOperationException( 1431throw new InvalidOperationException(
Aspire.Hosting.JavaScript (9)
JavaScriptHostingExtensions.cs (9)
1289throw new InvalidOperationException($"Package manager '{packageManager.ExecutableName}' does not have ProductionInstallArgs configured, which is required for PublishAsPackageScript."); 1351throw new InvalidOperationException("DockerfileBuildAnnotation should exist after calling PublishAsDockerFile."); 2095throw new InvalidOperationException( 2197throw new InvalidOperationException( 2283throw new InvalidOperationException( 2313throw new InvalidOperationException( 2369throw new InvalidOperationException("JavaScriptPackageManagerAnnotation and JavaScriptInstallCommandAnnotation are required when installing packages."); 2454throw new InvalidOperationException( 2468throw new InvalidOperationException(
Aspire.Hosting.JavaScript.Tests (3)
BunAppFixture.cs (1)
23public DistributedApplication App => _app ?? throw new InvalidOperationException("DistributedApplication is not initialized.");
NodeAppFixture.cs (1)
21public DistributedApplication App => _app ?? throw new InvalidOperationException("DistributedApplication is not initialized.");
tests\Shared\AsyncTestHelpers.cs (1)
238throw new InvalidOperationException($"Assert failed after {retries} retries: {message}");
Aspire.Hosting.Kafka (1)
KafkaBuilderExtensions.cs (1)
67options.Configuration.BootstrapServers = connectionString ?? throw new InvalidOperationException("Connection string is unavailable");
Aspire.Hosting.Kafka.Tests (1)
tests\Shared\AsyncTestHelpers.cs (1)
238throw new InvalidOperationException($"Assert failed after {retries} retries: {message}");
Aspire.Hosting.Kubernetes (38)
CertManagerExtensions.cs (6)
343throw new InvalidOperationException( 425throw new InvalidOperationException( 432throw new InvalidOperationException( 481throw new InvalidOperationException( 589throw new InvalidOperationException( 658throw new InvalidOperationException(
Deployment\HelmDeploymentEngine.cs (5)
92throw new InvalidOperationException( 103throw new InvalidOperationException( 479throw new InvalidOperationException(message); 613throw new InvalidOperationException($"helm uninstall failed with exit code {exitCode}"); 644throw new InvalidOperationException(
Deployment\HelmVersionValidator.cs (4)
80throw new InvalidOperationException( 89throw new InvalidOperationException( 96throw new InvalidOperationException( 102throw new InvalidOperationException(
Extensions\EndpointRoutingValidation.cs (1)
50throw new InvalidOperationException(
Extensions\ResourceExtensions.cs (1)
286throw new InvalidOperationException($"Unsupported storage type: {context.Parent.DefaultStorageType}");
KubernetesEnvironmentExtensions.cs (2)
56throw new InvalidOperationException($"Resource '{r.Name}' is configured to publish as a Kubernetes service, but there are no '{nameof(KubernetesEnvironmentResource)}' resources or Kubernetes-backed compute environments. Ensure you have added one by calling '{nameof(AddKubernetesEnvironment)}'."); 214configure(builder.Resource.Dashboard ?? throw new InvalidOperationException("Dashboard resource is not initialized"));
KubernetesEnvironmentResource.cs (4)
512throw new InvalidOperationException( 1011throw new InvalidOperationException( 1140_ => throw new InvalidOperationException($"Unknown gateway path match type '{route.PathType}'.") 1376throw new InvalidOperationException(
KubernetesHelmChartExtensions.cs (4)
367throw new InvalidOperationException(message); 441throw new InvalidOperationException(message); 468throw new InvalidOperationException( 483throw new InvalidOperationException(
KubernetesPublishingContext.cs (1)
245throw new InvalidOperationException(
KubernetesResource.cs (5)
305throw new InvalidOperationException("Volume source and target must be set"); 310throw new InvalidOperationException("Bind mounts are not supported by the Kubernetes publisher"); 625args[index++] = val ?? throw new InvalidOperationException("Value is null"); 741throw new InvalidOperationException( 885_ => throw new InvalidOperationException($"Unsupported protocol type: {type}"),
src\Shared\Yaml\ForceQuotedStringsEventEmitter.cs (1)
65? style ?? throw new InvalidOperationException("Style cannot be null when not applying double quotes.")
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()}");
Yaml\KubernetesManifestResourceYamlConverter.cs (1)
26throw new InvalidOperationException($"Expected {nameof(KubernetesManifestResource)} but got {value?.GetType()}.");
Aspire.Hosting.Kubernetes.Tests (3)
FakeHelmRunner.cs (1)
55throw new InvalidOperationException("Helm version should not be probed.");
KubernetesPublisherTests.cs (2)
1614?? throw new InvalidOperationException("The Kubernetes workload was not generated."); 1642?? throw new InvalidOperationException("The Kubernetes workload was not generated.");
Aspire.Hosting.Maui (8)
Lifecycle\MauiBuildQueueEventSubscriber.cs (2)
140throw new InvalidOperationException( 217throw new InvalidOperationException(
MauiPlatformHelper.cs (2)
61?? throw new InvalidOperationException($"Unable to determine directory from project path: {projectPath}"); 104?? throw new InvalidOperationException($"Unable to determine directory from project path: {projectPath}");
src\Shared\IConfigurationExtensions.cs (4)
135throw new InvalidOperationException($"Error parsing URIs from configuration value '{key}'.", ex); 172throw new InvalidOperationException($"Error parsing URIs from configuration value '{key}'.", ex); 202throw new InvalidOperationException($"Unknown {typeof(T).Name} value \"{value}\". Valid values are {string.Join(", ", Enum.GetNames(typeof(T)))}."); 222throw new InvalidOperationException($"Missing required configuration for {key}. Valid values are {string.Join(", ", Enum.GetNames(typeof(T)))}.");
Aspire.Hosting.Maui.Tests (2)
MauiBuildQueueTests.cs (2)
42using var _ = cts.Token.Register(() => throw new InvalidOperationException("callback failure")); 838_buildFailures[resource.Name] = new InvalidOperationException(message);
Aspire.Hosting.MongoDB (2)
MongoDBBuilderExtensions.cs (2)
82sp => client ??= new MongoClient(connectionString ?? throw new InvalidOperationException("Connection string is unavailable")), 137new MongoClient(connectionString ?? throw new InvalidOperationException("Connection string is unavailable"))
Aspire.Hosting.MySql (3)
MySqlBuilderExtensions.cs (3)
69throw new InvalidOperationException($"Could not open connection to '{resource.Name}'"); 79builder.Services.AddHealthChecks().AddMySql(sp => connectionString ?? throw new InvalidOperationException("Connection string is unavailable"), name: healthCheckKey); 141builder.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)
238throw new InvalidOperationException($"Assert failed after {retries} retries: {message}");
Aspire.Hosting.OpenAI (4)
src\Shared\IConfigurationExtensions.cs (4)
135throw new InvalidOperationException($"Error parsing URIs from configuration value '{key}'.", ex); 172throw new InvalidOperationException($"Error parsing URIs from configuration value '{key}'.", ex); 202throw new InvalidOperationException($"Unknown {typeof(T).Name} value \"{value}\". Valid values are {string.Join(", ", Enum.GetNames(typeof(T)))}."); 222throw new InvalidOperationException($"Missing required configuration for {key}. Valid values are {string.Join(", ", Enum.GetNames(typeof(T)))}.");
Aspire.Hosting.OpenAI.Tests (1)
tests\Shared\AsyncTestHelpers.cs (1)
238throw new InvalidOperationException($"Assert failed after {retries} retries: {message}");
Aspire.Hosting.Oracle (1)
OracleDatabaseBuilderExtensions.cs (1)
57.AddOracle(sp => connectionString ?? throw new InvalidOperationException("Connection string is unavailable"), name: healthCheckKey);
Aspire.Hosting.Orleans (1)
OrleansServiceExtensions.cs (1)
437throw new InvalidOperationException("Clustering has not been configured for this service.");
Aspire.Hosting.PostgreSQL (3)
PostgresBuilderExtensions.cs (3)
87throw new InvalidOperationException($"Could not open connection to '{postgresServer.Name}'"); 100builder.Services.AddHealthChecks().AddNpgSql(sp => connectionString ?? throw new InvalidOperationException("Connection string is unavailable"), name: healthCheckKey, configure: (connection) => 173builder.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)
238throw new InvalidOperationException($"Assert failed after {retries} retries: {message}");
Aspire.Hosting.Python (4)
PythonAppResourceBuilderExtensions.cs (4)
879throw new InvalidOperationException("Cannot update virtual environment: Python entrypoint annotation not found."); 887_ => throw new InvalidOperationException($"Unsupported entrypoint type: {entrypointAnnotation.Type}") 935throw new InvalidOperationException("Cannot configure debugging: Python entrypoint annotation not found."); 1046throw new InvalidOperationException("Cannot set entrypoint: Python environment annotation with virtual environment not found.");
Aspire.Hosting.Python.Tests (2)
AddPythonAppTests.cs (2)
327throw new InvalidOperationException("Failed to create virtual environment."); 355throw new InvalidOperationException("Failed to install requirements.");
Aspire.Hosting.Qdrant (5)
QdrantBuilderExtensions.cs (3)
66sp => new QdrantHealthCheck(qdrantClient ?? throw new InvalidOperationException("Qdrant Client is unavailable")), 198throw new InvalidOperationException("Connection string is unavailable"); 228throw new InvalidOperationException("Endpoint is unavailable");
QdrantServerResource.cs (2)
119throw new InvalidOperationException("Optional references are not supported for Qdrant resources."); 124throw new InvalidOperationException("Named service references are not supported for Qdrant resources.");
Aspire.Hosting.RabbitMQ.Tests (1)
tests\Shared\AsyncTestHelpers.cs (1)
238throw new InvalidOperationException($"Assert failed after {retries} retries: {message}");
Aspire.Hosting.Radius (62)
CloudProviders\RadiusCloudProviderExtensions.cs (2)
57throw new InvalidOperationException( 98throw new InvalidOperationException(
Publishing\BicepPostProcessor.cs (1)
306throw new InvalidOperationException(
Publishing\RadCredentialRegisterStep.cs (4)
214throw new InvalidOperationException( 225_ => throw new InvalidOperationException($"Unknown Azure credential type '{credential.GetType().Name}'."), 234_ => throw new InvalidOperationException($"Unknown AWS credential type '{credential.GetType().Name}'."), 330throw new InvalidOperationException(msg);
Publishing\RadiusDeploymentPipelineStep.cs (3)
33new($"The 'rad' CLI was not found. Please install it from {RadInstallUrl} and ensure it is available on your PATH."); 122throw new InvalidOperationException( 229throw new InvalidOperationException(errorMessage);
Publishing\RadiusInfrastructureBuilder.cs (14)
973throw new InvalidOperationException( 1480throw new InvalidOperationException( 1497throw new InvalidOperationException( 1512throw new InvalidOperationException( 1522throw new InvalidOperationException( 1531throw new InvalidOperationException( 1578throw new InvalidOperationException( 1605throw new InvalidOperationException( 1615throw new InvalidOperationException( 1635throw new InvalidOperationException( 1838throw new InvalidOperationException( 1884new($"A recipe parameter on Radius environment '{_environment.Name}' references {cloud} provider " + 2016throw new InvalidOperationException( 2069throw new InvalidOperationException(
Publishing\SealedSecretApplyStep.cs (11)
156throw new InvalidOperationException( 186throw new InvalidOperationException( 295throw new InvalidOperationException( 349new( 367new( 427throw new InvalidOperationException( 490throw new InvalidOperationException( 534throw new InvalidOperationException( 586throw new InvalidOperationException( 654throw new InvalidOperationException( 822throw new InvalidOperationException(
RadiusEnvironmentResource.cs (2)
179_ => throw new InvalidOperationException($"The property '{property}' is not supported for the endpoint '{endpoint.Name}'.") 198throw new InvalidOperationException($"Endpoint '{endpoint.Name}' must specify a port for scheme '{scheme}'.");
Secrets\RadiusSecretStoreExtensions.cs (2)
374throw new InvalidOperationException( 442throw new InvalidOperationException(
Secrets\RadiusSecretStoreValidation.cs (14)
81throw new InvalidOperationException( 126throw new InvalidOperationException( 146throw new InvalidOperationException( 158throw new InvalidOperationException( 171throw new InvalidOperationException( 179throw new InvalidOperationException( 191throw new InvalidOperationException( 207throw new InvalidOperationException( 251throw new InvalidOperationException( 272throw new InvalidOperationException( 295throw new InvalidOperationException( 304throw new InvalidOperationException( 333throw new InvalidOperationException( 392throw new InvalidOperationException(
Secrets\SealedSecretManifest.cs (9)
73throw new InvalidOperationException( 85throw new InvalidOperationException( 156throw new InvalidOperationException( 168throw new InvalidOperationException( 215throw new InvalidOperationException( 230throw new InvalidOperationException( 237throw new InvalidOperationException( 351throw new InvalidOperationException( 683new(
Aspire.Hosting.Redis (1)
RedisBuilderExtensions.cs (1)
93builder.Services.AddHealthChecks().AddRedis(sp => connectionString ?? throw new InvalidOperationException("Connection string is unavailable"), name: healthCheckKey);
Aspire.Hosting.RemoteHost (27)
Ats\AtsMarshaller.cs (1)
160_ => throw new InvalidOperationException($"Unknown type category: {typeRef.Category}")
Ats\CapabilityDispatcher.cs (3)
660?? throw new InvalidOperationException($"Unable to await ValueTask result for return type '{returnType}'."); 662?? throw new InvalidOperationException($"Unable to convert ValueTask result for return type '{returnType}' to Task."); 672throw new InvalidOperationException(ex.Message, ex);
Ats\HandleRegistry.cs (3)
81throw new InvalidOperationException($"Handle '{handleId}' not found in registry"); 98throw new InvalidOperationException( 114throw new InvalidOperationException($"Handle '{handleId}' not found in registry");
Ats\ReferenceExpressionRef.cs (8)
323?? throw new InvalidOperationException($"Failed to create '{builderType.FullName}'."); 334?? throw new InvalidOperationException($"'{builder.GetType().FullName}' is missing AppendLiteral(string)."); 347?? throw new InvalidOperationException($"'{builder.GetType().FullName}' is missing AppendValueProvider(object, string)."); 355?? throw new InvalidOperationException($"'{builder.GetType().FullName}' is missing Build()."); 358?? throw new InvalidOperationException($"'{builder.GetType().FullName}.Build()' returned null."); 376?? throw new InvalidOperationException($"'{referenceExpressionType.FullName}' is missing CreateConditional(...)."); 379?? throw new InvalidOperationException($"'{referenceExpressionType.FullName}.CreateConditional(...)' returned null."); 384throw new InvalidOperationException($"Could not resolve runtime type '{fullName}'.");
AtsCapabilityScanner.cs (2)
3294throw new InvalidOperationException( 3306throw new InvalidOperationException(
CancellationTokenRegistry.cs (2)
35throw new InvalidOperationException($"Failed to register cancellation token with ID '{id}'"); 57throw new InvalidOperationException($"Failed to register cancellation token with ID '{id}'");
JsonRpcAuthenticationState.cs (1)
67throw new InvalidOperationException("Client must authenticate before invoking AppHost RPC methods.");
JsonRpcCallbackInvoker.cs (1)
35throw new InvalidOperationException("No client connection available for callback invocation");
src\Shared\IntegrationPackageProbeManifest.cs (6)
112throw new InvalidOperationException($"Integration package probe manifest '{normalizedManifestPath}' does not exist."); 333throw new InvalidOperationException($"Integration package probe manifest path '{normalizedPath}' does not exist."); 352throw new InvalidOperationException(invalidPathMessage, ex); 367throw new InvalidOperationException($"Integration package probe manifest entry is missing required property '{propertyName}'."); 423throw new InvalidOperationException($"Integration package probe manifest entry is missing required property '{propertyName}'."); 431throw new InvalidOperationException($"Integration package probe manifest property '{propertyName}' must be a string.");
Aspire.Hosting.RemoteHost.Tests (25)
CallbackProxyTests.cs (2)
233ExceptionToThrow = new InvalidOperationException("Callback failed") 248ExceptionToThrow = new InvalidOperationException("Callback with result failed")
CapabilityDispatcherTests.cs (10)
107throw new InvalidOperationException("Handler failed"); 1943new InvalidOperationException("WithEndpoint failed.\r\nTry again."), 1970new InvalidOperationException("The service collection cannot be modified because it is read-only.\r"), 2022new InvalidOperationException("CreateGlobal failed.")); 2053new InvalidOperationException(KestrelMessage)); 2193throw new InvalidOperationException("Async error: " + value); 2222throw new InvalidOperationException("Multiple calls to WithEndpoint can conflict."); 2490_ => throw new InvalidOperationException($"Unexpected union value type: {value.GetType().Name}") 2502_ => throw new InvalidOperationException($"Unexpected union value type: {value.GetType().Name}") 2514_ => throw new InvalidOperationException($"Unexpected union value type: {value.GetType().Name}")
CodeGenerationDiagnosticBuilderTests.cs (5)
17new InvalidOperationException("plain failure"), 76var outer = new InvalidOperationException("wrapper", inner); 145var exception = new InvalidOperationException("outer", new MissingMethodException("inner")); 156new InvalidOperationException("unrelated"), 165Assert.Null(CodeGenerationDiagnosticBuilder.TryDescribeAssemblySkew(new InvalidOperationException("boom")));
LayoutCommandTests.cs (1)
421: throw new InvalidOperationException("project.assets.json did not contain a packageFolders entry.");
OrphanDetectorTests.cs (6)
44IsProcessRunningWithStartTime = (_, _) => throw new InvalidOperationException("Start-time path should not be used without REMOTE_APP_HOST_STARTED."), 68IsProcessRunning = _ => throw new InvalidOperationException("PID-only path should not be used when REMOTE_APP_HOST_STARTED is set."), 117IsProcessRunning = _ => throw new InvalidOperationException("Start time from ASPIRE_CLI_STARTED should select the legacy start-time path."), 118IsProcessRunningWithStartTime = (_, _) => throw new InvalidOperationException("Legacy ASPIRE_CLI_STARTED should not use the stable start-time path."), 143IsProcessRunning = _ => throw new InvalidOperationException("Start time from ASPIRE_CLI_STARTED_STABLE should select the start-time path."), 149IsProcessRunningWithLegacyStartTime = (_, _) => throw new InvalidOperationException("Stable ASPIRE_CLI_STARTED_STABLE should be preferred."),
tests\Shared\TemporaryWorkspace.cs (1)
51throw new InvalidOperationException($"Failed to initialize git repository: {error}");
Aspire.Hosting.Rust (4)
RustHostingExtensions.cs (4)
111?? throw new InvalidOperationException( 153throw new InvalidOperationException( 651?? throw new InvalidOperationException( 728throw new InvalidOperationException(
Aspire.Hosting.Rust.Tests (2)
RustDockerfileShellTests.cs (1)
219using var process = Process.Start(startInfo) ?? throw new InvalidOperationException("Failed to start /bin/sh.");
RustPublicApiTests.cs (1)
466throw new InvalidOperationException("Transient cargo metadata failure.");
Aspire.Hosting.Sdk.Tests (2)
AppHostSdkTargetsTests.cs (1)
1921return directory ?? throw new InvalidOperationException("Could not find repository root.");
tests\Shared\TemporaryWorkspace.cs (1)
51throw new InvalidOperationException($"Failed to initialize git repository: {error}");
Aspire.Hosting.SqlServer (3)
SqlServerBuilderExtensions.cs (3)
51builder.Services.AddHealthChecks().AddSqlServer(sp => connectionString ?? throw new InvalidOperationException("Connection string is unavailable"), name: healthCheckKey); 85throw new InvalidOperationException($"Could not open connection to '{sqlServer.Name}'"); 134builder.ApplicationBuilder.Services.AddHealthChecks().AddSqlServer(sp => connectionString ?? throw new InvalidOperationException("Connection string is unavailable"), name: healthCheckKey);
Aspire.Hosting.Testing (16)
DistributedApplicationEntryPointInvoker.cs (1)
101_appTcs.TrySetException(new InvalidOperationException($"The entry point exited without building a {nameof(DistributedApplication)}."));
DistributedApplicationFactory.cs (6)
294throw new InvalidOperationException($"The configured launch profile, '{launchProfileName}', was not found in the launch settings file."); 378throw new InvalidOperationException($"Assembly of specified type {entryPoint.Name} does not have an entry point."); 392throw new InvalidOperationException( 411?? throw new InvalidOperationException($"Application did not register an implementation of {typeof(IHostApplicationLifetime)}."); 454throw new InvalidOperationException("The application has not been initialized."); 549_ => throw new InvalidOperationException($"Registered service descriptor for {typeof(IHost)} does not conform to any known pattern.")
DistributedApplicationHostingTestingExtensions.cs (7)
74throw new InvalidOperationException(Properties.Resources.DashboardUrlPublishModeExceptionMessage); 80throw new InvalidOperationException(Properties.Resources.DashboardDisabledExceptionMessage); 95throw new InvalidOperationException(Properties.Resources.DashboardUrlUnavailableExceptionMessage); 103throw new InvalidOperationException(Properties.Resources.DashboardUrlUnavailableExceptionMessage); 109throw new InvalidOperationException(Properties.Resources.DashboardUrlUnavailableExceptionMessage); 120throw new InvalidOperationException(Properties.Resources.DashboardUrlUnavailableExceptionMessage); 298throw new InvalidOperationException(exceptionMessage);
DistributedApplicationTestingBuilder.cs (2)
360throw new InvalidOperationException(Properties.Resources.DashboardTestingPublishModeExceptionMessage); 669throw 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 (3)
TestingBuilderTests.cs (2)
49throw new InvalidOperationException($"Found unexpected AppHost files in {AppContext.BaseDirectory}: {string.Join(", ", unexpectedAppHostFiles)}"); 61?? throw new InvalidOperationException("Generated AppHost type not found.");
tests\Shared\AsyncTestHelpers.cs (1)
238throw new InvalidOperationException($"Assert failed after {retries} retries: {message}");
Aspire.Hosting.Tests (69)
Backchannel\AuxiliaryBackchannelRpcTargetTests.cs (2)
918throw new InvalidOperationException("resource callbacks must not be invoked by describe discovery"); 1186throw new InvalidOperationException("Watch stream ended before a matching snapshot was observed.");
Cli\CliOrphanDetectorTests.cs (1)
103detector.IsProcessRunningWithLegacyStartTime = (_, _) => throw new InvalidOperationException("Stable start time should be preferred.");
Dashboard\DashboardEventHandlersTests.cs (1)
829Exception = new InvalidOperationException("Error!").ToString(),
Dashboard\DashboardServiceTests.cs (2)
669reader.Complete(new InvalidOperationException("Error!")); 707writer.Complete(new InvalidOperationException("Error!"));
Dcp\DcpExecutorTests.cs (19)
1520throw new InvalidOperationException("Unexpected type: " + logStreamType); 3071throw new InvalidOperationException("Unexpected type: " + logStreamType); 3134throw new InvalidOperationException("Unexpected type: " + logStreamType); 3198throw new InvalidOperationException("Unexpected type: " + logStreamType); 3265throw new InvalidOperationException("Unexpected type: " + item.Type); 4974throw new InvalidOperationException("Launch configuration failed."); 6487throw new InvalidOperationException(producerFailureMessage); 6497throw new InvalidOperationException(producerFailureMessage); 7376throw new InvalidOperationException("Test exception from async launch configuration producer"); 7937throw new InvalidOperationException("Project launch configuration failed."); 8256throw new InvalidOperationException("Launch configuration failed."); 8446throw new InvalidOperationException("Launch configuration failed."); 8466throw new InvalidOperationException("Launch configuration failed."); 8611throw new InvalidOperationException("Launch configuration failed."); 9453throw new InvalidOperationException("env callback failure"); 9490throw new InvalidOperationException("args callback failure"); 9561_ => throw new InvalidOperationException("Test exception from launch configuration producer"), 9658_ => throw new InvalidOperationException("Test exception from launch configuration producer"), 10129throw new InvalidOperationException("Could not find two consecutive available ports.");
Dcp\DcpHostNotificationTests.cs (1)
737throw new InvalidOperationException("Expected process arguments to be set.");
Dcp\GatedReadStream.cs (1)
34throw new InvalidOperationException("The stream has already been released.");
DockerUtilsTests.cs (1)
15var expectedException = new InvalidOperationException("probe failed");
ExternalServiceTests.cs (1)
331var urlParam = builder.AddParameter("failing-url", () => throw new InvalidOperationException("Parameter resolution failed"));
Health\ResourceHealthCheckServiceTests.cs (3)
104services => throw new InvalidOperationException("An error!"), 370throw new InvalidOperationException("Random failure instead of result!"); 646tcs.SetException(new InvalidOperationException("ResourceReadyEvent failed"));
InteractionServiceTests.cs (1)
1319throw new InvalidOperationException("Inputs should be specified when completing input interaction");
Lifecycle\TerminalHostFailureDiagnosticServiceTests.cs (1)
268throw new InvalidOperationException("No snapshot observed.");
Orchestrator\ApplicationOrchestratorTests.cs (1)
1562throw new InvalidOperationException("The connection property isn't available.");
Orchestrator\ParameterProcessorTests.cs (1)
1349return new ParameterResource(name, _ => throw new InvalidOperationException($"Generic error for parameter '{name}'"), secret: false);
Pipelines\DistributedApplicationPipelineTests.cs (6)
681throw new InvalidOperationException("Dependency failed"); 757throw new InvalidOperationException("Step 1 failed"); 788throw new InvalidOperationException("This step fails"); 819throw new InvalidOperationException("Immediate failure"); 851throw new InvalidOperationException("Build failed"); 1261throw new InvalidOperationException("Test failure");
ResourceExtensionsTests.cs (1)
561_ => throw new InvalidOperationException($"Unexpected option '{optionName}'.")
ResourceLoggerServiceTests.cs (4)
280string n => throw new InvalidOperationException($"Unexpected {n}") 488: throw new InvalidOperationException($"Unexpected {name}"))); 608throw new InvalidOperationException("Expected positive line numbers."); 629throw new InvalidOperationException($"Subscriber {subscriberIndex} observed non-positive line number.");
ResourceNotificationTests.cs (6)
71_ => throw new InvalidOperationException($"Unknown resource type: {resourceType}") 1104throw new InvalidOperationException("No events received"); 1140throw new InvalidOperationException("No events received"); 1330resourceReadyTcs.SetException(new InvalidOperationException("ResourceReady failed")); 1671throw new InvalidOperationException($"Unknown excluded properties for {type}: {string.Join(", ", unknownExclusions)}."); 1715?? throw new InvalidOperationException($"Could not find {type}.{nameof(ImmutableArray<int>.Add)}.");
TestProgramFixture.cs (2)
18public TestProgram TestProgram => _testProgram ?? throw new InvalidOperationException("TestProgram is not initialized."); 20public DistributedApplication App => _app ?? throw new InvalidOperationException("DistributedApplication is not initialized.");
tests\Shared\AsyncTestHelpers.cs (1)
238throw new InvalidOperationException($"Assert failed after {retries} retries: {message}");
tests\Shared\TestInteractionFileUploadStore.cs (2)
85throw new InvalidOperationException($"Submitted files for input '{inputName}' do not match the completed uploads."); 93throw new InvalidOperationException($"Submitted files for input '{inputName}' do not match the completed uploads.");
tests\Shared\TestProcesses.cs (1)
45var process = Process.Start(psi) ?? throw new InvalidOperationException("Failed to start long-running test process.");
ValueSnapshotTests.cs (6)
77var exception = new InvalidOperationException("Test error"); 89var exception = new InvalidOperationException("Test error"); 107var exception = new InvalidOperationException("Test error"); 126var exception = new InvalidOperationException("Error occurred"); 156snapshot.SetException(new InvalidOperationException()); 172snapshot.SetException(new InvalidOperationException());
WaitForTests.cs (1)
566resourceReadyTcs.SetException(new InvalidOperationException("The resource ready event failed!"));
WithProcessCommandTests.cs (3)
1295processRunner.EnqueueException(new InvalidOperationException("process start failed")); 1319processRunner.EnqueuePending(Task.FromException<ProcessResult>(new InvalidOperationException("process failed after start"))); 1368throw new InvalidOperationException("factory failed");
Aspire.Hosting.TestUtilities (21)
Helpers\JsonDocumentManifestPublisher.cs (2)
40return _manifestDocument ?? throw new InvalidOperationException("JsonDocument not available."); 54get => _manifestDocument ?? throw new InvalidOperationException("JsonDocument not available.");
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");
Helpers\Network.cs (1)
60throw new InvalidOperationException(
Publishing\FakeContainerRuntime.cs (5)
49throw new InvalidOperationException("Fake container runtime is configured to fail"); 60throw new InvalidOperationException("Fake container runtime is configured to fail"); 71throw new InvalidOperationException("Fake container runtime is configured to fail"); 87throw new InvalidOperationException("Fake container runtime is configured to fail"); 104throw new InvalidOperationException("Fake container runtime is configured to fail");
tests\Shared\TemporaryWorkspace.cs (1)
51throw new InvalidOperationException($"Failed to initialize git repository: {error}");
Utils\DockerUtils.cs (4)
105throw new InvalidOperationException(message, runtimeResolution.DetectionException); 143throw new InvalidOperationException($"Failed to inspect the deleted volume named '{volumeName}', the inspect process did not exit."); 147throw new InvalidOperationException($"Failed to delete the volume named '{volumeName}'. Attempted to inspect the volume and it still exists."); 152throw 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.");
Utils\TestDcpExecutor.cs (1)
37: throw new InvalidOperationException($"Resource '{resourceName}' not found.");
Aspire.Hosting.Valkey (1)
ValkeyBuilderExtensions.cs (1)
142.AddRedis(sp => connectionString ?? throw new InvalidOperationException("Connection string is unavailable"), name: healthCheckKey);
Aspire.Hosting.Valkey.Tests (1)
tests\Shared\AsyncTestHelpers.cs (1)
238throw new InvalidOperationException($"Assert failed after {retries} retries: {message}");
Aspire.Hosting.Yarp (1)
ConfigurationBuilder\YarpCluster.cs (1)
170throw new InvalidOperationException("External service must have either a URI or a URL parameter defined.");
Aspire.Managed.Tests (5)
ParentProcessWatchdogTests.cs (1)
45using var registration = operationCts.Token.Register(static () => throw new InvalidOperationException("simulated cancellation callback failure"));
TerminalHostSignalTests.cs (3)
42?? throw new InvalidOperationException("Failed to start aspire-managed."); 109?? throw new InvalidOperationException("Failed to start the parent process."); 139?? throw new InvalidOperationException("Failed to start aspire-managed.");
tests\Shared\TemporaryWorkspace.cs (1)
51throw new InvalidOperationException($"Failed to initialize git repository: {error}");
Aspire.Microsoft.Azure.Cosmos (6)
AspireMicrosoftAzureCosmosExtensions.cs (3)
74throw new InvalidOperationException($"The connection string '{connectionName}' does not exist or is missing the container name or database name."); 139throw new InvalidOperationException($"The connection string '{name}' does not exist or is missing the container name or database name."); 302throw 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)
54throw new InvalidOperationException( 142throw new InvalidOperationException( 226throw 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.Microsoft.Extensions.Configuration.AzureAppConfiguration (1)
AspireAppConfigurationExtensions.cs (1)
70throw new InvalidOperationException($"Endpoint and connection string are missing. It should be provided in 'ConnectionStrings:{connectionName}' or under the 'Endpoint' and 'ConnectionString' key in the '{DefaultConfigSectionName}' configuration section.");
Aspire.Microsoft.Extensions.Configuration.AzureAppConfiguration.Tests (1)
tests\Aspire.Azure.Security.KeyVault.Tests\MockTransport.cs (1)
53throw new InvalidOperationException("the request is not compatible with the transport");
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.v2.Tests (1)
tests\Aspire.MongoDB.Driver.Tests\MongoDbContainerFixture.cs (1)
17throw new InvalidOperationException("The test container was not initialized.");
Aspire.MongoDB.EntityFrameworkCore (5)
AspireMongoDBEntityFrameworkCoreExtensions.cs (1)
86throw new InvalidOperationException($"A database name is required but was not provided. Specify it via the '{nameof(databaseName)}' parameter, the '{nameof(MongoDBEntityFrameworkCoreSettings.DatabaseName)}' setting, or include it in the connection string.");
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.MongoDB.EntityFrameworkCore.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)
151throw 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)
24throw new InvalidOperationException("The test container was not initialized.");
Aspire.Npgsql.Tests (1)
PostgreSQLContainerFixture.cs (1)
24throw new InvalidOperationException("The test container was not initialized.");
Aspire.OpenAI (3)
AspireOpenAIClientBuilder.cs (2)
73throw new InvalidOperationException( 88throw 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)
140throw 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)
238throw new InvalidOperationException($"Assert failed after {retries} retries: {message}");
Aspire.Pomelo.EntityFrameworkCore.MySql (7)
AspireEFMySqlExtensions.cs (3)
186throw new InvalidOperationException($"A DbContextOptions<{typeof(TContext).Name}> was not found. Please ensure 'ServerVersion' was configured."); 209throw new InvalidOperationException($"{nameof(PomeloEntityFrameworkCoreMySqlSettings)}.{nameof(PomeloEntityFrameworkCoreMySqlSettings.DisableRetry)} needs to be set when a custom Execution Strategy is configured."); 228throw 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)
24throw new InvalidOperationException("The test container was not initialized.");
Aspire.RabbitMQ.Client.Tests (5)
AspireRabbitMQLoggingTests.cs (4)
121LogError("error", new InvalidOperationException("test")); 152throw new InvalidOperationException(exceptionMessage); 195InvalidOperationException innerException = new("Inner exception"); 198throw new InvalidOperationException(exceptionMessage, innerException);
RabbitMQContainerFixture.cs (1)
17throw new InvalidOperationException("The test container was not initialized.");
Aspire.RabbitMQ.Client.v6.Tests (5)
tests\Aspire.RabbitMQ.Client.Tests\AspireRabbitMQLoggingTests.cs (4)
121LogError("error", new InvalidOperationException("test")); 152throw new InvalidOperationException(exceptionMessage); 195InvalidOperationException innerException = new("Inner exception"); 198throw 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)
206throw 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)
167throw new InvalidOperationException("Project is already running"); 319throw new InvalidOperationException(exceptionMessage); 364throw new InvalidOperationException("Dashboard URL is not available"); 403throw new InvalidOperationException("Dashboard URL is not available"); 422throw new InvalidOperationException("Tried to stop the app host process but it is not running."); 499throw new InvalidOperationException("The app host process is not running.");
tests\Shared\TemplatesTesting\BuildEnvironment.cs (1)
279throw 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.TerminalHost.Tests (3)
TerminalHostAppTests.cs (1)
611throw new InvalidOperationException($"Producer-side reader: frame length {length} exceeds 16MB cap.");
tests\Shared\AsyncTestHelpers.cs (1)
238throw new InvalidOperationException($"Assert failed after {retries} retries: {message}");
tests\Shared\TemporaryWorkspace.cs (1)
51throw new InvalidOperationException($"Failed to initialize git repository: {error}");
Aspire.TestTools (3)
GitHubCli.cs (3)
42return Task.FromException<string>(new InvalidOperationException(File.ReadAllText(fixturePath))); 287throw new InvalidOperationException($"gh {BuildDisplayArguments(arguments)} failed: {message.Trim()}"); 349throw new InvalidOperationException($"gh {BuildDisplayArguments(arguments)} failed: {stderr.Trim()}");
Aspire.TypeSystem (1)
AttributeDataReader.cs (1)
316CatalogName = catalogName ?? throw new InvalidOperationException("AspireValueAttribute requires a catalog name."),
cdac-build-tool (22)
ContractDescriptorSourceFileEmitter.cs (1)
97throw new InvalidOperationException ($"no replacement for {key}");
DataDescriptorModel.cs (17)
115throw new InvalidOperationException("Baseline must be set before adding types"); 130throw new InvalidOperationException("Baseline must be set before adding globals"); 146throw new InvalidOperationException("Baseline must be set before adding globals"); 172throw new InvalidOperationException($"Baseline already set to {_baseline} cannot set to {baseline}"); 181throw new InvalidOperationException($"Baseline '{baseline}' not known"); 195throw new InvalidOperationException("TODO: [cdac] - implement baseline parsing"); 212throw new InvalidOperationException($"Value must be set for global {globalName}"); 222throw new InvalidOperationException($"Value must be set for sub-descriptor {subDescriptorName}"); 248throw new InvalidOperationException($"Size already set to {_size} cannot set to {value}"); 287throw new InvalidOperationException($"Type already set to {_type} cannot set to {value}"); 299throw new InvalidOperationException($"Value already set to {_value} cannot set to {value}"); 317throw new InvalidOperationException($"Type already set to {_type} cannot set to {value}"); 330throw new InvalidOperationException($"Offset already set to {_offset} cannot set to {value}"); 340throw new InvalidOperationException($"Offset must be set for {typeName}.{fieldName}"); 392_ => throw new InvalidOperationException("Unknown GlobalValue type") 418throw new InvalidOperationException($"Version already set to {_version} cannot set to {value}"); 431throw new InvalidOperationException("Version must be set for contract");
JsonConverter\GlobalValueJsonConverter.cs (1)
36throw new InvalidOperationException("Unknown GlobalValue type");
ObjectFileScraper.cs (3)
344throw new InvalidOperationException("expected a nul-terminated name"); 465throw new InvalidOperationException("expected endMagic, got all zeros. Did you add something to the data descriptor that can't be initialized at compile time?"); 467throw new InvalidOperationException($"expected endMagic, got 0x{endMagic[0]:x} 0x{endMagic[1]:x} 0x{endMagic[2]:x} 0x{endMagic[3]:x}");
CodeStyleConfigFileGenerator (4)
Program.cs (1)
81=> throw e.Exception ?? new InvalidOperationException(e.Message);
src\roslyn\src\Dependencies\Contracts\Contract.cs (1)
161throw new InvalidOperationException($"{message} - file {fileName} line {lineNumber}");
src\roslyn\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)
70throw new InvalidOperationException("ConfigurationSchemaAttribute should only be used with 3 ctor arguments."); 93throw 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\roslyn\src\Compilers\Shared\BuildProtocol.cs (1)
356throw new InvalidOperationException("Received invalid response type from server.");
src\roslyn\src\Compilers\Shared\BuildServerConnection.cs (3)
823throw new InvalidOperationException("Unable to acquire guard"); 892throw new InvalidOperationException("Lock already held"); 1004throw new InvalidOperationException("Lock already held");
src\roslyn\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") 387_ => throw new InvalidOperationException("Unexpected node type.")
Grammar\GrammarGenerator.cs (1)
317_ => throw new InvalidOperationException(),
SourceWriter.cs (1)
1004throw new InvalidOperationException("field cannot be a random SyntaxNodeOrTokenList");
TreeFlattening.cs (1)
52throw new InvalidOperationException("Unknown child type.");
datacollector (2)
src\vstest\src\Microsoft.TestPlatform.Execution.Shared\DebuggerBreakpoint.cs (2)
83throw new InvalidOperationException($"Cannot find AttachVS.exe tool."); 88throw new InvalidOperationException($"Cannot start tool, path {vsAttachPath} does not exist.");
datacollector.arm64 (2)
src\vstest\src\Microsoft.TestPlatform.Execution.Shared\DebuggerBreakpoint.cs (2)
83throw new InvalidOperationException($"Cannot find AttachVS.exe tool."); 88throw new InvalidOperationException($"Cannot start tool, path {vsAttachPath} does not exist.");
dotnet (100)
_generated\100\WorkloadListJsonSerializerContext.g.cs (2)
75throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 83throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
_generated\107\WorkloadSearchVersionsJsonSerializerContext.g.cs (2)
75throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 83throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
_generated\118\WorkloadHistoryJsonSerializerContext.g.cs (2)
75throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 83throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
_generated\126\PackInfoJsonSerializerContext.g.cs (2)
78throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 86throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
_generated\139\NugetSearchApiJsonSerializerContext.g.cs (2)
80throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 88throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
_generated\14\CliSchemaJsonSerializerContext.g.cs (2)
72throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 80throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
_generated\149\SdkVulnerabilityJsonContext.g.cs (2)
72throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 80throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
_generated\156\SlnfJsonSerializerContext.g.cs (2)
76throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 84throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
_generated\170\TelemetryDiskLoggerJsonSerializerContext.g.cs (2)
72throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 80throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
_generated\177\LocalToolsCacheJsonSerializerContext.g.cs (2)
74throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 82throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
_generated\187\SdkVulnerabilityCacheJsonContext.g.cs (2)
72throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 80throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
_generated\32\RunFileApiJsonSerializerContext.g.cs (2)
72throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 80throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
_generated\36\CSharpCompilerCommandJsonSerializerContext.g.cs (2)
74throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 82throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
_generated\46\RunFileBuildCacheJsonSerializerContext.g.cs (2)
74throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 82throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
_generated\52\RunFileJsonSerializerContext.g.cs (2)
72throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 80throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
_generated\57\SdkCheckJsonSerializerContext.g.cs (2)
72throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 80throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
_generated\69\ToolListJsonSerializerContext.g.cs (2)
72throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 80throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
_generated\74\GlobalJsonWorkloadSetsJsonSerializerContext.g.cs (2)
76throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 84throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
_generated\79\WorkloadManifestUpdaterJsonSerializerContext.g.cs (2)
72throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 80throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
_generated\84\WorkloadInstallJsonSerializerContext.g.cs (2)
75throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 83throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
_generated\92\InstallStateJsonSerializerContext.g.cs (2)
77throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 85throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
CommandFactory\CommandResolution\ProjectDependenciesCommandResolver.cs (1)
145throw new InvalidOperationException(string.Format(
Commands\Reference\FileBasedAppReferenceEditor.cs (1)
22?? throw new InvalidOperationException($"Source file path '{EntryPointFilePath}' does not have a containing directory.");
Commands\Run\CSharpCompilerCommand.cs (2)
147?? throw new InvalidOperationException("Could not find compiler commit hash in the assembly attributes."); 415throw new InvalidOperationException($"FrameworkList.xml not found at '{frameworkListPath}'. The SDK installation may be corrupted.");
Commands\Run\RunCommand.cs (1)
242_ => throw new InvalidOperationException()
Commands\Run\RunPlan.cs (1)
30_ => throw new InvalidOperationException($"Run tier '{Tier}' does not map to a managed build level."),
Commands\Test\MTP\IPC\HttpTestHostGateway.cs (1)
71throw new InvalidOperationException("Unable to start the dotnet test HTTP gateway on loopback.");
Commands\Test\MTP\IPC\NamedPipeServer.cs (1)
242throw new InvalidOperationException(CliCommandStrings.InternalLoopAsyncDidNotExitSuccessfullyErrorMessage);
Commands\Test\MTP\IPC\Serializers\DiscoveredTestMessagesSerializer.cs (1)
240throw new InvalidOperationException("Trait message is missing Key or Value field.");
Commands\Test\MTP\Models.cs (2)
76throw new InvalidOperationException(); 86throw new InvalidOperationException();
Commands\Test\MTP\MSBuildUtility.cs (1)
63?? throw new InvalidOperationException($"The solution configuration '{activeSolutionConfiguration}|{activeSolutionPlatform}' is invalid.");
Commands\Test\MTP\Terminal\AnsiTerminal.cs (1)
155throw new InvalidOperationException(CliCommandStrings.ConsoleIsAlreadyInBatchingMode);
Commands\Test\MTP\Terminal\SimpleTerminalBase.cs (2)
171throw new InvalidOperationException(CliCommandStrings.ConsoleIsAlreadyInBatchingMode); 220throw new InvalidOperationException();
Commands\Test\MTP\Terminal\TestProgressStateAwareTerminal.cs (1)
79throw new InvalidOperationException("No empty slot found");
Commands\Test\MTP\TestApplication.cs (5)
89throw new InvalidOperationException(CliCommandStrings.RunAsyncCalledMoreThanOnce); 252throw new InvalidOperationException(CliCommandStrings.MissingTestSessionEnd); 446?? throw new InvalidOperationException("Unable to determine the current Windows user."); 736throw new InvalidOperationException(CliCommandStrings.DotnetTestDuplicateHandshakeOnConnection); 921throw new InvalidOperationException(CliCommandStrings.UnexpectedHelpMessage);
Commands\Test\MTP\TestApplicationActionQueue.cs (1)
60throw new InvalidOperationException($"Failed to write to channel for test application: {testApplication}");
Commands\Test\MTP\TestApplicationHandler.cs (22)
219throw new InvalidOperationException(string.Format( 254throw new InvalidOperationException(string.Format(CliCommandStrings.UnexpectedMessageInHelpMode, nameof(DiscoveredTestMessages))); 259throw new InvalidOperationException(string.Format(CliCommandStrings.UnexpectedMessageWithoutHandshake, nameof(DiscoveredTestMessages))); 266throw new InvalidOperationException(string.Format(CliCommandStrings.UnexpectedMessageWithoutTestHostHandshake, nameof(DiscoveredTestMessages))); 277throw new InvalidOperationException(string.Format(CliCommandStrings.DotnetTestMismatchingExecutionId, executionId, nameof(DiscoveredTestMessages), _handshakeInfo.Value.ExecutionId)); 302throw new InvalidOperationException(string.Format(CliCommandStrings.UnexpectedMessageInHelpMode, nameof(TestResultMessages))); 307throw new InvalidOperationException(string.Format(CliCommandStrings.UnexpectedMessageWithoutHandshake, nameof(TestResultMessages))); 312throw new InvalidOperationException(string.Format(CliCommandStrings.UnexpectedMessageWithoutTestHostHandshake, nameof(TestResultMessages))); 323throw new InvalidOperationException(string.Format(CliCommandStrings.DotnetTestMismatchingExecutionId, messageExecutionId, nameof(TestResultMessages), _handshakeInfo.Value.ExecutionId)); 373throw new InvalidOperationException(string.Format(CliCommandStrings.UnexpectedMessageInHelpMode, nameof(TestInProgressMessages))); 378throw new InvalidOperationException(string.Format(CliCommandStrings.UnexpectedMessageWithoutHandshake, nameof(TestInProgressMessages))); 384throw new InvalidOperationException(string.Format(CliCommandStrings.DotnetTestMismatchingExecutionId, testInProgressMessages.ExecutionId, nameof(TestInProgressMessages), _handshakeInfo.Value.ExecutionId)); 407throw new InvalidOperationException(string.Format(CliCommandStrings.UnexpectedMessageInHelpMode, nameof(FileArtifactMessages))); 412throw new InvalidOperationException(string.Format(CliCommandStrings.UnexpectedMessageWithoutHandshake, nameof(FileArtifactMessages))); 419throw new InvalidOperationException(string.Format(CliCommandStrings.UnexpectedMessageWithoutTestHostHandshake, nameof(FileArtifactMessages))); 430throw new InvalidOperationException(string.Format(CliCommandStrings.DotnetTestMismatchingExecutionId, fileArtifactExecutionId, nameof(FileArtifactMessages), _handshakeInfo.Value.ExecutionId)); 474throw new InvalidOperationException(string.Format(CliCommandStrings.UnexpectedMessageInHelpMode, nameof(TestSessionEvent))); 479throw new InvalidOperationException(string.Format(CliCommandStrings.UnexpectedMessageWithoutHandshake, nameof(TestSessionEvent))); 490throw new InvalidOperationException(string.Format(CliCommandStrings.DotnetTestMismatchingExecutionId, sessionExecutionId, nameof(TestSessionEvent), _handshakeInfo.Value.ExecutionId)); 495throw new InvalidOperationException(string.Format( 515throw new InvalidOperationException(CliCommandStrings.UnexpectedTestSessionEnd); 520throw new InvalidOperationException(string.Format(CliCommandStrings.UnknownSessionEventType, sessionEvent.SessionType));
Commands\Test\MTP\TestRunPolicy.cs (1)
122throw new InvalidOperationException("A test application exited without a matching start.");
Commands\Workload\Config\WorkloadConfigCommand.cs (1)
92throw new InvalidOperationException($"Invalid update mode: {_updateMode}");
Commands\Workload\Install\WorkloadInstallerFactory.cs (1)
37throw new InvalidOperationException(CliCommandStrings.OSDoesNotSupportMsi);
Commands\Workload\Install\WorkloadManifestUpdater.cs (1)
57throw new InvalidOperationException(CliCommandStrings.OSDoesNotSupportMsi);
Commands\Workload\WorkloadManifestCorruptionRepairer.cs (2)
81throw new InvalidOperationException(string.Format(CliCommandStrings.WorkloadSetHasMissingManifests, workloadSet.Version)); 106throw new InvalidOperationException("Package downloader is required to repair workload manifests.");
PrintableTable.cs (3)
96throw new InvalidOperationException(); 106throw new InvalidOperationException(); 116throw new InvalidOperationException();
src\sdk\artifacts\.packages\microsoft.codeanalysis.buildclient\5.11.0-1.26424.106\contentFiles\cs\net11.0\BuildProtocol.cs (1)
356throw new InvalidOperationException("Received invalid response type from server.");
src\sdk\artifacts\.packages\microsoft.codeanalysis.buildclient\5.11.0-1.26424.106\contentFiles\cs\net11.0\BuildServerConnection.cs (3)
823throw new InvalidOperationException("Unable to acquire guard"); 892throw new InvalidOperationException("Lock already held"); 1004throw new InvalidOperationException("Lock already held");
ToolManifest\ToolManifestEditor.cs (1)
422throw new InvalidOperationException(
dotnet-aot (36)
_generated\106\NugetSearchApiJsonSerializerContext.g.cs (2)
80throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 88throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
_generated\113\NugetServiceIndexJsonSerializerContext.g.cs (2)
72throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 80throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
_generated\15\CliSchemaJsonSerializerContext.g.cs (2)
72throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 80throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
_generated\29\TelemetryDiskLoggerJsonSerializerContext.g.cs (2)
72throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 80throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
_generated\34\WorkloadManifestUpdaterJsonSerializerContext.g.cs (2)
72throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 80throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
_generated\44\SdkVulnerabilityJsonContext.g.cs (2)
72throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 80throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
_generated\54\RunFileBuildCacheJsonSerializerContext.g.cs (2)
74throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 82throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
_generated\62\InstallStateJsonSerializerContext.g.cs (2)
77throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 85throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
_generated\67\SdkCheckJsonSerializerContext.g.cs (2)
72throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 80throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
_generated\74\SlnfJsonSerializerContext.g.cs (2)
76throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 84throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
_generated\81\LocalToolsCacheJsonSerializerContext.g.cs (2)
74throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 82throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
_generated\93\ToolListJsonSerializerContext.g.cs (2)
72throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 80throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
ManagedHost.cs (6)
74throw new InvalidOperationException("Runtime initialization failed - load_assembly_and_get_function_pointer is not available."); 96throw new InvalidOperationException($"Failed to load assembly and get function pointer. HRESULT: 0x{result:X8}"); 141throw new InvalidOperationException($"hostfxr_initialize_for_dotnet_command_line failed. Status: {result} (0x{(uint)result:X8})"); 160throw new InvalidOperationException( 214throw new InvalidOperationException($"hostfxr_initialize_for_runtime_config failed. Status: {result} (0x{(uint)result:X8})"); 227throw new InvalidOperationException($"hostfxr_get_runtime_delegate failed. Status: {result} (0x{(uint)result:X8})");
src\sdk\src\Cli\dotnet\Commands\Run\RunPlan.cs (1)
30_ => throw new InvalidOperationException($"Run tier '{Tier}' does not map to a managed build level."),
src\sdk\src\Cli\dotnet\Commands\Workload\Install\WorkloadManifestUpdater.cs (1)
57throw new InvalidOperationException(CliCommandStrings.OSDoesNotSupportMsi);
src\sdk\src\Cli\dotnet\PrintableTable.cs (3)
96throw new InvalidOperationException(); 106throw new InvalidOperationException(); 116throw new InvalidOperationException();
src\sdk\src\Cli\dotnet\ToolManifest\ToolManifestEditor.cs (1)
422throw new InvalidOperationException(
dotnet-dev-certs (13)
_generated\7\DevCertsJsonSerializerContext.g.cs (2)
75throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 83throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
src\aspnetcore\src\Shared\CertificateGeneration\CertificateManager.cs (5)
447throw new InvalidOperationException($"The directory '{exportDir}' does not exist. Choose permissions carefully when creating it."); 715throw new InvalidOperationException("Unknown format."); 914throw new InvalidOperationException($"'{nameof(RemoveLocations.Undefined)}' is not a valid location."); 926throw new InvalidOperationException("Invalid location."); 982throw new InvalidOperationException($"Failed to create a key with a size of {minimumKeySize} bits");
src\aspnetcore\src\Shared\CertificateGeneration\MacOSCertificateManager.cs (4)
110throw new InvalidOperationException("There was an error trusting the certificate."); 262throw new InvalidOperationException($@"There was an error removing the certificate with thumbprint '{certificate.Thumbprint}'. 278throw new InvalidOperationException($"Can't determine the subject for the certificate with subject '{certificate.Subject}'."); 360throw new InvalidOperationException("Failed to add the certificate to the keychain. Are you running in a non-interactive session perhaps?");
src\aspnetcore\src\Shared\CertificateGeneration\UnixCertificateManager.cs (1)
532throw new InvalidOperationException($@"There was an error removing the certificate with thumbprint '{certificate.Thumbprint}'.");
src\aspnetcore\src\Shared\CommandLineUtils\CommandLine\CommandLineApplication.cs (1)
124throw new InvalidOperationException(message);
dotnet-getdocument (1)
src\aspnetcore\src\Shared\CommandLineUtils\CommandLine\CommandLineApplication.cs (1)
124throw new InvalidOperationException(message);
dotnet-Microsoft.XmlSerializer.Generator (3)
Sgen.cs (3)
342throw new InvalidOperationException(SR.Format(SR.ErrSerializerExists, codePath, nameof(force))); 347throw new InvalidOperationException(SR.Format(SR.ErrDirectoryExists, codePath)); 483throw new InvalidOperationException(SR.Format(SR.ErrLoadAssembly, assemblyName));
dotnet-openapi (1)
src\aspnetcore\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-sourcelink (1)
dotnet-sql-cache (1)
src\aspnetcore\src\Shared\CommandLineUtils\CommandLine\CommandLineApplication.cs (1)
124throw new InvalidOperationException(message);
dotnet-suggest (1)
DotnetMuxer.cs (1)
40throw new InvalidOperationException("no muxer!");
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)
253throw 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 (8)
_generated\0\BindingExtensions.g.cs (3)
107throw new InvalidOperationException("Cannot create instance of type 'Microsoft.AspNetCore.Authentication.JwtBearer.Tools.SigningKey' because parameter 'Length' has no matching config. Each parameter in the constructor that does not have a default value must have a corresponding config entry."); 149throw new InvalidOperationException($"'ErrorOnUnknownConfiguration' was set on the provided BinderOptions, but the following properties were not found on the instance of {type}: {string.Join(", ", temp)}"); 198throw new InvalidOperationException($"Failed to convert configuration value '{value ?? "null"}' at '{path}' to type '{typeof(int)}'.", exception);
_generated\12\JwtSerializerContext.g.cs (2)
77throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 85throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
Helpers\ConsoleTable.cs (2)
34throw new InvalidOperationException("Columns must be set before rows can be added."); 39throw new InvalidOperationException(
src\aspnetcore\src\Shared\CommandLineUtils\CommandLine\CommandLineApplication.cs (1)
124throw new InvalidOperationException(message);
dotnet-user-secrets (3)
_generated\2\SecretManagerJsonSerializerContext.g.cs (2)
75throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 83throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
src\aspnetcore\src\Shared\CommandLineUtils\CommandLine\CommandLineApplication.cs (1)
124throw new InvalidOperationException(message);
dotnet-watch (1)
Watch\BuildEvaluator.cs (1)
41=> _context.MainProjectOptions ?? throw new InvalidOperationException();
DotNetHostedAgent (5)
Program.cs (5)
14?? throw new InvalidOperationException("ConnectionStrings__projmyproject is not set."); 17?? throw new InvalidOperationException("ConnectionStrings__chat is not set."); 27throw new InvalidOperationException("ConnectionStrings__projmyproject contains an invalid Endpoint value."); 94throw new InvalidOperationException($"Connection string is missing '{key}'."); 101throw new InvalidOperationException($"Connection string has an empty '{key}' value.");
GenerateDocumentationAndConfigFiles (53)
Program.cs (4)
935onDuplicateEntryInRelease: (_1, _2, _3, _4, line) => throw new InvalidOperationException($"Duplicate entry in {shippedFile} at {line.LineNumber}: '{line}'"), 936onInvalidEntry: (line, _2, _3, _4) => throw new InvalidOperationException($"Invalid entry in {shippedFile} at {line.LineNumber}: '{line}'"), 945onDuplicateEntryInRelease: (_1, _2, _3, _4, line) => throw new InvalidOperationException($"Duplicate entry in {unshippedFile} at {line.LineNumber}: '{line}'"), 946onInvalidEntry: (line, _2, _3, _4) => throw new InvalidOperationException($"Invalid entry in {unshippedFile} at {line.LineNumber}: '{line}'"),
src\roslyn\src\Compilers\Core\Portable\Collections\SmallDictionary.cs (2)
193throw new InvalidOperationException(); 460throw new InvalidOperationException();
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\ReaderWriterLockSlimExtensions.cs (2)
93throw new InvalidOperationException(); 101throw new InvalidOperationException();
src\roslyn\src\Compilers\Core\Portable\Text\TextChangeRangeExtensions.cs (1)
323throw new InvalidOperationException();
src\roslyn\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\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (1)
102throw new InvalidOperationException($"Unexpected concurrent access to {GetType()}");
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+ValueBuilder.cs (1)
68throw new InvalidOperationException($"Unexpected concurrent access to {GetType()}");
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+ValueBuilder.cs (1)
78throw new InvalidOperationException($"Unexpected concurrent access to {GetType()}");
src\roslyn\src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Enumerator.cs (2)
24public object? Current => throw new InvalidOperationException(); 33throw new InvalidOperationException();
src\roslyn\src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Enumerator`1.cs (1)
24public new T Current => throw new InvalidOperationException();
src\roslyn\src\Dependencies\Contracts\Contract.cs (1)
161throw new InvalidOperationException($"{message} - file {fileName} line {lineNumber}");
src\roslyn\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\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Extensions\IOperationExtensions.cs (1)
520throw new InvalidOperationException();
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\SmallDictionary.cs (2)
306throw new InvalidOperationException(); 573throw new InvalidOperationException();
src\roslyn\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\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (1)
24=> node.Parent ?? throw new InvalidOperationException("Node's parent was null");
src\roslyn\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\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser.cs (1)
89trimmedDictionary[key.Trim()] = allRawConventions.TryGetValue(key, out var value) ? value : throw new InvalidOperationException();
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\NamingStyle.cs (2)
83throw new InvalidOperationException(); 170default: throw new InvalidOperationException();
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (1)
482throw new InvalidOperationException();
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Serialization\ObjectWriter.cs (1)
286throw new InvalidOperationException($"Unsupported object type: {value.GetType()}");
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\BKTree.Builder.cs (1)
201throw new InvalidOperationException();
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\StringEscapeEncoder.cs (1)
138throw new InvalidOperationException();
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\TaskExtensions.cs (1)
36throw new InvalidOperationException($"{nameof(WaitAndGetResult)} cannot be called from a thread pool thread.");
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationConstructedMethodSymbol.cs (1)
85=> throw new System.InvalidOperationException();
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationMethodSymbol.cs (1)
110=> throw new InvalidOperationException();
src\roslyn\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\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\ISolutionExtensions.cs (3)
37=> solution.GetDocument(syntaxTree) ?? throw new InvalidOperationException(); 44throw new InvalidOperationException(string.Format(WorkspaceExtensionsResources.Project_of_ID_0_is_required_to_accomplish_the_task_but_is_not_available_from_the_solution, projectId)); 128=> new InvalidOperationException(string.Format(WorkspaceExtensionsResources.The_solution_does_not_contain_the_specified_document, debugName ?? "Unknown"));
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\ProjectExtensions.cs (1)
99throw new InvalidOperationException(string.Format(WorkspaceExtensionsResources.Compilation_is_required_to_accomplish_the_task_but_is_not_supported_by_project_0, project.Name));
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\AddImports\AbstractAddImportsService.cs (1)
123throw new InvalidOperationException();
GetDocument.Insider (4)
Commands\GetDocumentCommand.cs (1)
98throw new InvalidOperationException(
src\44e1214b125d320f\HostFactoryResolver.cs (2)
257_hostTcs.TrySetException(new InvalidOperationException("The entry point exited without ever building an IHost.")); 296throw 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.");
src\aspnetcore\src\Shared\CommandLineUtils\CommandLine\CommandLineApplication.cs (1)
124throw new InvalidOperationException(message);
HealthChecksSandbox.AppHost (1)
AppHost.cs (1)
95() => new HealthCheckResult(status, description, new InvalidOperationException(exceptionMessage))
ilc (4)
src\runtime\src\coreclr\tools\Common\TypeSystem\IL\HelperExtensions.cs (4)
79throw new InvalidOperationException(string.Format("Expected method '{0}' not found on type '{1}'", System.Text.Encoding.UTF8.GetString(name), type)); 94throw new InvalidOperationException(string.Format("Expected field '{0}' not found on type '{1}'", System.Text.Encoding.UTF8.GetString(name), type)); 109throw new InvalidOperationException(string.Format("Expected type '{0}' not found on type '{1}'", Encoding.UTF8.GetString(name), type)); 124throw new InvalidOperationException(
ILCompiler.Compiler (39)
Compiler\Dataflow\AttributeDataFlow.cs (1)
128_ => throw new InvalidOperationException()
Compiler\Dataflow\CompilerGeneratedState.cs (2)
78throw new InvalidOperationException(); 346throw new InvalidOperationException();
Compiler\Dataflow\FlowAnnotations.cs (2)
999throw new InvalidOperationException($"Cannot get 'this' parameter of method {method.GetDisplayName()} with no 'this' parameter."); 1007throw new InvalidOperationException($"Cannot get 'this' parameter of method {method.GetDisplayName()} with no 'this' parameter.");
Compiler\Dataflow\MethodBodyScanner.cs (3)
90throw new InvalidOperationException(); 215throw new InvalidOperationException(MessageContainer.CreateErrorMessage( 1056throw new InvalidOperationException(MessageContainer.CreateErrorMessage(
Compiler\DependencyAnalysis\DictionaryLayoutNode.cs (2)
247throw new InvalidOperationException($"{OwningMethodOrType}: {entry}"); 314throw new InvalidOperationException($"{OwningMethodOrType}: {entry}");
Compiler\InlinedThreadStatics.cs (3)
14internal virtual int GetSize() => throw new InvalidOperationException(); 15internal virtual List<MetadataType> GetTypes() => throw new InvalidOperationException(); 16internal virtual Dictionary<MetadataType, int> GetOffsets() => throw new InvalidOperationException();
Compiler\MetadataManager.cs (1)
824throw new InvalidOperationException($"Metadata blob exceeded the addressing range (allowed: {MaxAllowedMetadataOffset}, actual: {metadataBlob.Length})");
Compiler\ObjectWriter\Dwarf\DwarfInfoWriter.cs (1)
58throw new InvalidOperationException($"Trying to write a children into DIE (Tag {_dieStack.Peek().Tag}) with DW_CHILDREN_no");
src\runtime\src\coreclr\tools\Common\Compiler\CompilerTypeSystemContext.Wasm.cs (1)
63_ => throw new InvalidOperationException($"Unknown elevated signature encoding: {slot}{elevation}")
src\runtime\src\coreclr\tools\Common\Compiler\Dataflow\MethodProxy.cs (1)
45? throw new InvalidOperationException($"Cannot get parameter #{(int)index} of method {GetDisplayName()} with {GetParametersCount()} parameters")
src\runtime\src\coreclr\tools\Common\Compiler\DependencyAnalysis\Target_Wasm\WasmTypes.cs (1)
57throw new InvalidOperationException("Unsupported CorInfoWasmType: " + ty);
src\runtime\src\coreclr\tools\Common\Compiler\DependencyTrackingLevel.cs (1)
53throw new InvalidOperationException();
src\runtime\src\coreclr\tools\Common\Compiler\ObjectWriter\ObjectWriter.cs (4)
528throw new InvalidOperationException("Both or neither of the symbols that define a symbol range must be non-null."); 548throw new InvalidOperationException("The end symbol of the symbol range must be emitted into the same object."); 638throw new InvalidOperationException("The start symbol of the symbol range must be emitted into the same object."); 643throw new InvalidOperationException("The symbols that define a symbol range must be in the same section.");
src\runtime\src\coreclr\tools\Common\Compiler\ProcessLinkerXmlBase.cs (1)
93throw new InvalidOperationException("The containing assembly must be specified for XML which is restricted to modifying that assembly only.");
src\runtime\src\coreclr\tools\Common\Internal\Runtime\DehydratedData.cs (1)
57throw new InvalidOperationException(); // decoder can only decode this many extra bytes
src\runtime\src\coreclr\tools\Common\TypeSystem\IL\HelperExtensions.cs (4)
79throw new InvalidOperationException(string.Format("Expected method '{0}' not found on type '{1}'", System.Text.Encoding.UTF8.GetString(name), type)); 94throw new InvalidOperationException(string.Format("Expected field '{0}' not found on type '{1}'", System.Text.Encoding.UTF8.GetString(name), type)); 109throw new InvalidOperationException(string.Format("Expected type '{0}' not found on type '{1}'", Encoding.UTF8.GetString(name), type)); 124throw new InvalidOperationException(
src\runtime\src\coreclr\tools\Common\TypeSystem\IL\Stubs\ArrayMethodILEmitter.cs (1)
59throw new InvalidOperationException();
src\runtime\src\tools\illink\src\ILLink.Shared\DataFlow\ForwardDataFlowAnalysis.cs (1)
144throw new InvalidOperationException();
src\runtime\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\runtime\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\runtime\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");
ILCompiler.DependencyAnalysisFramework (1)
DependencyAnalyzer.cs (1)
135throw new InvalidOperationException();
ILCompiler.Diagnostics (1)
PerfMapWriter.cs (1)
91throw new InvalidOperationException();
ILCompiler.MetadataTransform (1)
Internal\Metadata\NativeFormat\Writer\NativeMetadataWriter.cs (1)
482throw new InvalidOperationException();
ILCompiler.ReadyToRun (28)
Compiler\DependencyAnalysis\ReadyToRun\ManifestMetadataTableNode.cs (3)
193throw new InvalidOperationException("Cannot get ModuleToIndex mapping until marking is complete."); 209throw new InvalidOperationException("Adding a new assembly after signatures have been materialized."); 246throw new InvalidOperationException("Adding a new assembly after signatures have been materialized.");
Compiler\DependencyAnalysis\ReadyToRun\RuntimeFunctionsTableNode.cs (1)
73throw new InvalidOperationException("Virtual IPs are not used on non-WASM targets.");
Compiler\DependencyAnalysis\ReadyToRun\SignatureBuilder.cs (1)
309throw new InvalidOperationException();
Compiler\DependencyAnalysis\ReadyToRun\TypeHandle.cs (1)
94throw new InvalidOperationException();
IBC\MIbcProfileParser.cs (1)
316throw new InvalidOperationException($"Unexpected opcode: {opcode}");
src\runtime\src\coreclr\tools\Common\Compiler\CompilerTypeSystemContext.Wasm.cs (1)
63_ => throw new InvalidOperationException($"Unknown elevated signature encoding: {slot}{elevation}")
src\runtime\src\coreclr\tools\Common\Compiler\Dataflow\MethodProxy.cs (1)
45? throw new InvalidOperationException($"Cannot get parameter #{(int)index} of method {GetDisplayName()} with {GetParametersCount()} parameters")
src\runtime\src\coreclr\tools\Common\Compiler\DependencyAnalysis\Target_Wasm\WasmTypes.cs (1)
57throw new InvalidOperationException("Unsupported CorInfoWasmType: " + ty);
src\runtime\src\coreclr\tools\Common\Compiler\DependencyTrackingLevel.cs (1)
53throw new InvalidOperationException();
src\runtime\src\coreclr\tools\Common\Compiler\ObjectWriter\ObjectWriter.cs (4)
528throw new InvalidOperationException("Both or neither of the symbols that define a symbol range must be non-null."); 548throw new InvalidOperationException("The end symbol of the symbol range must be emitted into the same object."); 638throw new InvalidOperationException("The start symbol of the symbol range must be emitted into the same object."); 643throw new InvalidOperationException("The symbols that define a symbol range must be in the same section.");
src\runtime\src\coreclr\tools\Common\Compiler\ObjectWriter\WasmObjectWriter.cs (1)
208throw new InvalidOperationException($"Signature index of {key} not found for function: {node.ToString()}");
src\runtime\src\coreclr\tools\Common\Compiler\ObjectWriter\WebCilObjectWriter.cs (2)
683throw new InvalidOperationException($"Unsupported relocation size for relocation: {reloc.Type}"); 729throw new InvalidOperationException($"Symbol '{reloc.SymbolName}' was not registered. Relocation type {reloc.Type}.");
src\runtime\src\coreclr\tools\Common\Compiler\ProcessLinkerXmlBase.cs (1)
93throw new InvalidOperationException("The containing assembly must be specified for XML which is restricted to modifying that assembly only.");
src\runtime\src\coreclr\tools\Common\JitInterface\CorInfoImpl.cs (1)
2681throw new InvalidOperationException();
src\runtime\src\coreclr\tools\Common\JitInterface\JitConfigProvider.cs (1)
58throw new InvalidOperationException();
src\runtime\src\coreclr\tools\Common\JitInterface\WasmLowering.cs (1)
409_ => throw new InvalidOperationException($"Unknown signature char: {c}")
src\runtime\src\coreclr\tools\Common\TypeSystem\IL\HelperExtensions.cs (4)
79throw new InvalidOperationException(string.Format("Expected method '{0}' not found on type '{1}'", System.Text.Encoding.UTF8.GetString(name), type)); 94throw new InvalidOperationException(string.Format("Expected field '{0}' not found on type '{1}'", System.Text.Encoding.UTF8.GetString(name), type)); 109throw new InvalidOperationException(string.Format("Expected type '{0}' not found on type '{1}'", Encoding.UTF8.GetString(name), type)); 124throw new InvalidOperationException(
src\runtime\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");
ILCompiler.RyuJit (9)
JitInterface\CorInfoImpl.RyuJit.cs (1)
1897throw new InvalidOperationException(methodDesc.ToString());
src\runtime\src\coreclr\tools\aot\ILCompiler.ReadyToRun\IBC\MIbcProfileParser.cs (1)
316throw new InvalidOperationException($"Unexpected opcode: {opcode}");
src\runtime\src\coreclr\tools\Common\JitInterface\CorInfoImpl.cs (1)
2681throw new InvalidOperationException();
src\runtime\src\coreclr\tools\Common\JitInterface\JitConfigProvider.cs (1)
58throw new InvalidOperationException();
src\runtime\src\coreclr\tools\Common\JitInterface\WasmLowering.cs (1)
409_ => throw new InvalidOperationException($"Unknown signature char: {c}")
src\runtime\src\coreclr\tools\Common\TypeSystem\IL\HelperExtensions.cs (4)
79throw new InvalidOperationException(string.Format("Expected method '{0}' not found on type '{1}'", System.Text.Encoding.UTF8.GetString(name), type)); 94throw new InvalidOperationException(string.Format("Expected field '{0}' not found on type '{1}'", System.Text.Encoding.UTF8.GetString(name), type)); 109throw new InvalidOperationException(string.Format("Expected type '{0}' not found on type '{1}'", Encoding.UTF8.GetString(name), type)); 124throw new InvalidOperationException(
ILCompiler.TypeSystem (10)
src\runtime\src\coreclr\tools\Common\TypeSystem\Common\DefType.FieldLayout.cs (2)
300throw new InvalidOperationException("Only reference types are allowed."); 494_ => throw new InvalidOperationException()
src\runtime\src\coreclr\tools\Common\TypeSystem\Common\LayoutInt.cs (1)
51throw new InvalidOperationException();
src\runtime\src\coreclr\tools\Common\TypeSystem\Common\TargetDetails.cs (1)
258throw new InvalidOperationException();
src\runtime\src\coreclr\tools\Common\TypeSystem\Common\TypeSystemHelpers.cs (1)
355throw new InvalidOperationException();
src\runtime\src\coreclr\tools\Common\TypeSystem\Ecma\EcmaSignatureEncoder.cs (1)
176throw new InvalidOperationException("Attempting to encode an invalid type signature.");
src\runtime\src\coreclr\tools\Common\TypeSystem\IL\HelperExtensions.cs (4)
79throw new InvalidOperationException(string.Format("Expected method '{0}' not found on type '{1}'", System.Text.Encoding.UTF8.GetString(name), type)); 94throw new InvalidOperationException(string.Format("Expected field '{0}' not found on type '{1}'", System.Text.Encoding.UTF8.GetString(name), type)); 109throw new InvalidOperationException(string.Format("Expected type '{0}' not found on type '{1}'", Encoding.UTF8.GetString(name), type)); 124throw new InvalidOperationException(
illink (33)
ILLink.RoslynAnalyzer (24)
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();
IMethodSymbolExtensions.cs (1)
41throw new InvalidOperationException($"Cannot get parameter at index {(int)index} of method {method.GetDisplayName()} with {method.GetParametersCount()} parameters.");
src\runtime\src\libraries\System.Reflection.Metadata\src\System\Reflection\Metadata\TypeNameParserHelpers.cs (6)
361throw new InvalidOperationException(); 372throw new InvalidOperationException(); 383throw new InvalidOperationException(); 394throw new InvalidOperationException(); 405throw new InvalidOperationException(); 416throw new InvalidOperationException();
src\runtime\src\tools\illink\src\ILLink.Shared\DataFlow\ForwardDataFlowAnalysis.cs (1)
144throw new InvalidOperationException();
src\runtime\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\runtime\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\runtime\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)
66_ => throw new InvalidOperationException()
TrimAnalysis\FlowAnnotations.cs (2)
260throw new InvalidOperationException($"Cannot get 'this' parameter of method {method.GetDisplayName()} with no 'this' parameter."); 267throw 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); 159throw 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)
398throw new InvalidOperationException( 407throw new InvalidOperationException( 416throw new InvalidOperationException( 425throw new InvalidOperationException(
Infrastructure.Tests (31)
CreateFailingTestIssue\CreateFailingTestIssueFixture.cs (2)
22throw new InvalidOperationException($"CreateFailingTestIssue project not found at {ToolProjectPath}."); 64throw new InvalidOperationException(
DownloadFailingJobLogs\DownloadFailingJobLogsFixture.cs (2)
24throw new InvalidOperationException($"DownloadFailingJobLogs script not found at {ToolPath}."); 29throw new InvalidOperationException($"dotnet.sh not found at {DotNetPath}.");
ExtractTestPartitions\ExtractTestPartitionsFixture.cs (2)
43throw new InvalidOperationException( 58throw new InvalidOperationException(
ExtractTestPartitions\MockAssemblyBuilder.cs (1)
278throw new InvalidOperationException($"Failed to compile mock assembly:{Environment.NewLine}{errors}");
GenerateTestSummary\GenerateTestSummaryFixture.cs (2)
22throw new InvalidOperationException($"GenerateTestSummary project not found at {ToolProjectPath}."); 57throw new InvalidOperationException(
Pipelines\ExtensionE2eWorkflow.cs (1)
39return Scalar(step, "run") ?? throw new InvalidOperationException($"Step '{stepName}' has no run script.");
Pipelines\NixCliPackageTests.cs (1)
217?? throw new InvalidOperationException($"Could not parse {relativePath} as a JSON object.");
Pipelines\NpmCliPackageTests.cs (7)
6870 => throw new InvalidOperationException("Expected at least one supported npm CLI platform."), 698?? throw new InvalidOperationException($"Failed to parse JSON object from {path}"); 704?? throw new InvalidOperationException($"Missing JSON object property '{propertyName}'."); 710?? throw new InvalidOperationException($"Missing JSON string property '{propertyName}'."); 715return jsonNode?.AsArray().Select(value => value?.GetValue<string>() ?? throw new InvalidOperationException("JSON array contains a null value.")).ToArray() 716?? throw new InvalidOperationException("Missing JSON string array."); 723property => property.Value?.GetValue<string>() ?? throw new InvalidOperationException($"JSON property '{property.Key}' is not a string."),
PowerShellScripts\BuildTestMatrixTests.cs (2)
748?? throw new InvalidOperationException("Failed to parse matrix JSON"); 762?? throw new InvalidOperationException("No CITestsProperty items found in CITestsProperties.props");
PowerShellScripts\SplitTestProjectsTests.cs (1)
208}) ?? throw new InvalidOperationException("Failed to parse partitions JSON");
Shared\GitCli.cs (2)
39using var process = Process.Start(psi) ?? throw new InvalidOperationException("Failed to start git."); 45throw new InvalidOperationException($"git {string.Join(' ', args)} failed ({process.ExitCode}): {stderr}");
Shared\TestTrxBuilder.cs (1)
91throw new InvalidOperationException($"Canonical test name '{testCase.CanonicalTestName}' must contain at least one '.'.");
tests\Shared\TemporaryWorkspace.cs (1)
51throw new InvalidOperationException($"Failed to initialize git repository: {error}");
TestTriggerMap\SelectTestsAcceptanceTests.cs (2)
950throw new InvalidOperationException("No integration src/Aspire.Hosting*/api/<name>.ats.txt with a matching tests/PolyglotAppHosts/<name> fixture was found."); 965throw new InvalidOperationException("No src/Components/<dir> with a same-named test project was found.");
tools\GenerateCITimeline\GitHubApi.cs (2)
17using var process = Process.Start(psi) ?? throw new InvalidOperationException("Failed to start gh process."); 28throw new InvalidOperationException($"gh api failed: {stderr.Trim()}");
WorkflowScripts\ExtensionReleaseWorkflowTests.cs (1)
608?? throw new InvalidOperationException($"Failed to start {pythonExecutable}.");
WorkflowScripts\PrDocsCheckWorkflowTests.cs (1)
190?? throw new InvalidOperationException($"Failed to start {python}.");
Keycloak.Web (1)
AuthorizationHandler.cs (1)
11throw new InvalidOperationException("No HttpContext available from the IHttpContextAccessor!");
libmscordaccore_universal (1)
Entrypoints.cs (1)
382throw new InvalidOperationException(
Microsoft.Agents.AI.ProjectTemplates.Tests (5)
DotNetNewCommand.cs (1)
34throw new InvalidOperationException($"A {nameof(DotNetNewCommand)} should specify a custom hive with '{nameof(WithCustomHive)}()'.");
TemplateExecutionTestClassFixtureBase.cs (1)
151throw new InvalidOperationException(
TestCommand.cs (1)
30throw new InvalidOperationException($"The {nameof(TestCommand)} did not specify an executable file name.");
WellKnownPaths.cs (2)
57throw new InvalidOperationException("Failed to establish root of the repository"); 70throw new InvalidOperationException($"Expected to find '{dotNetExeName}' at '{dotNetExePath}', but it was not found.");
Microsoft.Analyzers.Local (4)
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)
JsonValueTest.cs (1)
326Assert.False(JsonValue.Null.Equals(new InvalidOperationException()));
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (2)
398=> throw new InvalidOperationException(message); 410=> throw new InvalidOperationException(message, innerException);
Microsoft.Arcade.Common (3)
Command.cs (3)
192throw new InvalidOperationException("Already handling stdout!"); 204throw new InvalidOperationException("Already handling stderr!"); 248throw new InvalidOperationException($"Unable to invoke {memberName} after the command has been run");
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)
329throw new InvalidOperationException($"Failed to convert configuration value at '{configuration.GetSection(reloadConfigOnChangeKey).Path}' to type '{typeof(bool)}'.");
Microsoft.AspNetCore.Antiforgery (4)
AntiforgeryApplicationBuilderExtensions.cs (1)
54throw 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)
256throw new InvalidOperationException(Resources.FormatAntiforgery_RequiresSSL(
Internal\DefaultAntiforgeryTokenGenerator.cs (1)
86throw new InvalidOperationException(
src\aspnetcore\src\Shared\Buffers\RefPooledArrayBufferWriter.cs (1)
107throw new InvalidOperationException($"Cannot advance past the end of the buffer. Current position: {_index}, Capacity: {_buffer.Length}, Requested advance: {count}.");
Microsoft.AspNetCore.App.Analyzers (23)
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\aspnetcore\src\Shared\RoslynUtils\SymbolExtensions.cs (1)
210_ => throw new InvalidOperationException("Unexpected symbol type: " + symbol)
src\aspnetcore\src\Shared\RoslynUtils\WellKnownTypes.cs (1)
104throw new InvalidOperationException($"Failed to resolve well-known type '{WellKnownTypeData.WellKnownTypeNames[index]}'.");
Microsoft.AspNetCore.App.CodeFixes (1)
RouteParameterUnusedParameterFixer.cs (1)
94_ => throw new InvalidOperationException($"Unexpected method syntax: {methodSyntax.GetType().FullName}")
Microsoft.AspNetCore.AsyncState (2)
parent\parent\parent\eng\MSBuild\parent\parent\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)
96exception = new InvalidOperationException("Invalid return state, unable to redirect."); 108exception = 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 (4)
_generated\4\BearerTokenJsonSerializerContext.g.cs (2)
72throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 80throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
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\aspnetcore\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.DeviceBoundSessions (7)
_generated\10\DeviceBoundSessionJsonContext.g.cs (2)
78throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 86throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
DeviceBoundSessionHandler.cs (3)
295?? throw new InvalidOperationException( 324throw new InvalidOperationException( 348throw new InvalidOperationException("Set-Cookie credential serialization did not produce the expected empty cookie prefix.");
DeviceBoundSessionHttpContextExtensions.cs (2)
88throw new InvalidOperationException( 96throw new InvalidOperationException(
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.Negotiate (5)
NegotiateHandler.cs (4)
105throw new InvalidOperationException("An anonymous request was received in between authentication handshake requests."); 120throw new InvalidOperationException("Non-negotiate request was received in between authentication handshake requests."); 298throw new InvalidOperationException("AuthenticateAsync must not be called before the UseAuthentication middleware runs."); 318throw 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.OpenIdConnect (12)
Events\PushedAuthorizationContext.cs (3)
51throw new InvalidOperationException("Only one of HandlePush, SkipPush, and HandledClientAuthentication may be called in the OnPushAuthorization event."); 81throw new InvalidOperationException("Only one of HandlePush, SkipPush, and HandledClientAuthentication may be called in the OnPushAuthorization event."); 105throw new InvalidOperationException("Only one of HandlePush, SkipPush, and HandledClientAuthentication may be called in the OnPushAuthorization event.");
OpenIdConnectHandler.cs (7)
157throw new InvalidOperationException("An error was returned from the RemoteSignOut event.", remoteSignOutContext.Result.Failure); 281throw new InvalidOperationException("Cannot redirect to the end session endpoint, the configuration may be missing or invalid."); 354throw new InvalidOperationException("An error was returned from the SignedOutCallbackRedirect event.", signOut.Result.Failure); 493throw new InvalidOperationException( 513throw new InvalidOperationException("Pushed authorization is required by the OpenId Connect provider, but disabled by the OpenIdConnectOptions.PushedAuthorizationBehavior."); 522throw new InvalidOperationException("Pushed authorization is required by the OpenIdConnectOptions.PushedAuthorizationBehavior, but no pushed authorization endpoint is available."); 619throw 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.Twitter (3)
_generated\6\TwitterJsonContext.g.cs (2)
74throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 82throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
TwitterHandler.cs (1)
399throw new InvalidOperationException(errorMessageStringBuilder.ToString());
Microsoft.AspNetCore.Authentication.WsFederation (2)
WsFederationOptions.cs (1)
61throw 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); 211throw 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.Components (120)
_generated\4\PersistentServicesRegistryJsonContext.g.cs (2)
78throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 86throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
BindConverter.cs (2)
1898throw new InvalidOperationException( 2127throw 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 (2)
74: 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."); 81throw new InvalidOperationException($"The component activator returned a null value for a component of type {componentType.FullName}.");
DefaultComponentPropertyActivator.cs (3)
83throw new InvalidOperationException($"Cannot provide a value for property " + 90?? throw new InvalidOperationException($"Cannot provide a value for property " + 97?? throw new InvalidOperationException($"Cannot provide a value for property " +
Dispatcher.cs (1)
32throw 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)
288throw new InvalidOperationException($"'{GetType().Name}' already initialized."); 560=> throw new InvalidOperationException($"To support navigation locks, {GetType().Name} must override {nameof(HandleLocationChangingHandlerException)}"); 611throw 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 (6)
40throw new InvalidOperationException("PersistentComponentState already initialized."); 68throw new InvalidOperationException("Registering a callback while persisting state is not allowed."); 115throw new InvalidOperationException("Persisting state is only allowed during an OnPersisting callback."); 131throw new InvalidOperationException("Persisting state is only allowed during an OnPersisting callback."); 151throw new InvalidOperationException("Persisting state is only allowed during an OnPersisting callback."); 249throw new InvalidOperationException("Cannot update existing state: previous state has not been cleared or state is not initialized.");
PersistentState\ComponentStatePersistenceManager.cs (4)
78throw new InvalidOperationException("State already initialized."); 104throw new InvalidOperationException("State already persisted."); 167throw new InvalidOperationException("Render mode already set."); 206throw new InvalidOperationException(
PersistentState\PersistentServicesRegistry.cs (2)
209throw new InvalidOperationException( 215throw new InvalidOperationException(
PersistentState\PersistentValueProviderComponentSubscription.cs (1)
234throw new InvalidOperationException(
Reflection\ComponentProperties.cs (11)
190throw new InvalidOperationException( 212throw new InvalidOperationException( 219throw new InvalidOperationException( 225throw new InvalidOperationException( 234throw new InvalidOperationException( 242throw new InvalidOperationException( 250throw new InvalidOperationException( 270throw new InvalidOperationException( 280throw new InvalidOperationException( 331throw new InvalidOperationException( 343throw new InvalidOperationException(
RenderHandle.cs (6)
27internal SectionRegistry SectionRegistry => _renderer?.SectionRegistry ?? throw new InvalidOperationException("No renderer has been initialized."); 59?? throw new InvalidOperationException("No renderer has been initialized."); 64public RendererInfo RendererInfo => _renderer?.RendererInfo ?? throw new InvalidOperationException("No renderer has been initialized."); 76throw new InvalidOperationException("No renderer has been initialized."); 90return _renderer?.Assets ?? throw new InvalidOperationException("No renderer has been initialized."); 123throw 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 (15)
174throw new InvalidOperationException($"Valueless attributes may only be added immediately after frames of type {RenderTreeFrameType.Element}"); 477throw new InvalidOperationException("No preceding attribute frame exists."); 483throw new InvalidOperationException($"Incorrect frame type: '{prevFrame.FrameTypeField}'"); 540throw new InvalidOperationException("Cannot set a key outside the scope of a component or element."); 554throw new InvalidOperationException($"Cannot set a key on a frame of type {parentFrame.FrameTypeField}."); 600throw new InvalidOperationException($"Element reference captures may only be added as children of frames of type {RenderTreeFrameType.Element}"); 617throw new InvalidOperationException(ComponentReferenceCaptureInvalidParentMessage); 623throw new InvalidOperationException(ComponentReferenceCaptureInvalidParentMessage); 651throw new InvalidOperationException("There is no enclosing component frame."); 658throw new InvalidOperationException($"The enclosing frame is not of the required type '{nameof(RenderTreeFrameType.Component)}'."); 683throw new InvalidOperationException($"Named events may only be added as children of frames of type {RenderTreeFrameType.Element}"); 724throw new InvalidOperationException($"Attributes may only be added immediately after frames of type {RenderTreeFrameType.Element} or {RenderTreeFrameType.Component}"); 732throw new InvalidOperationException($"Component parameters may only be added immediately after frames of type {RenderTreeFrameType.Component}"); 803throw new InvalidOperationException( 817throw 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)
33throw new InvalidOperationException($"The method {methodInfo} cannot be used as an event handler because it declares more than one parameter."); 44throw new InvalidOperationException($"The event handler parameter type {declaredType.FullName} for event must inherit from {typeof(EventArgs).FullName}.");
RenderTree\Renderer.cs (2)
816throw new InvalidOperationException("The specified component is not a root component"); 842throw 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."); 1038throw new InvalidOperationException($"{nameof(RenderTreeFrameType.ComponentReferenceCapture)} frame references invalid parent index."); 1045throw 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\Router.cs (7)
127throw new InvalidOperationException($"The {nameof(Router)} component requires a value for the parameter {nameof(AppAssembly)}."); 135throw new InvalidOperationException($"The {nameof(Router)} component requires a value for the parameter {nameof(Found)}."); 143throw new InvalidOperationException($"Setting {nameof(NotFound)} and {nameof(NotFoundPage)} properties simultaneously is not supported. Use either {nameof(NotFound)} or {nameof(NotFoundPage)}."); 148throw new InvalidOperationException($"The type {NotFoundPage.FullName} " + 155throw new InvalidOperationException($"The type {NotFoundPage.FullName} " + 265throw new InvalidOperationException($"The type {context.Handler.FullName} " + 416throw new InvalidOperationException($"No component found for route '{route}'. " +
Routing\RouteTableFactory.cs (3)
190throw new InvalidOperationException($"Unable to find the provided template '{template}'"); 214throw new InvalidOperationException($""" 296_ => throw new InvalidOperationException("Invalid comparison result."),
Sections\SectionContent.cs (2)
56throw new InvalidOperationException($"{nameof(SectionContent)} requires that '{nameof(SectionName)}' and '{nameof(SectionId)}' cannot both have non-null values."); 68throw new InvalidOperationException($"{nameof(SectionContent)} requires a non-null value either for '{nameof(SectionName)}' or '{nameof(SectionId)}'.");
Sections\SectionOutlet.cs (2)
50throw new InvalidOperationException($"{nameof(SectionOutlet)} requires that '{nameof(SectionName)}' and '{nameof(SectionId)}' cannot both have non-null values."); 62throw new InvalidOperationException($"{nameof(SectionOutlet)} requires a non-null value either for '{nameof(SectionName)}' or '{nameof(SectionId)}'.");
Sections\SectionRegistry.cs (5)
39throw new InvalidOperationException($"There are no content providers with the given section ID '{identifier}'."); 46throw new InvalidOperationException($"The provider was not found in the providers list of the given section ID '{identifier}'."); 69throw new InvalidOperationException($"There is already a subscriber to the content with the given section ID '{identifier}'."); 85throw new InvalidOperationException($"The subscriber with the given section ID '{identifier}' is already unsubscribed."); 97throw new InvalidOperationException($"There are no content providers with the given section ID '{identifier}'.");
src\aspnetcore\src\Components\Shared\src\QueryParameterValueSupplier.cs (1)
38throw new InvalidOperationException($"Querystring values cannot be parsed as type '{elementType}'.");
src\aspnetcore\src\Components\Shared\src\Reflection\PropertyGetter.cs (1)
29throw new InvalidOperationException("Cannot provide a value for property " +
src\aspnetcore\src\Components\Shared\src\Reflection\PropertySetter.cs (1)
25throw new InvalidOperationException("Cannot provide a value for property " +
src\aspnetcore\src\Components\Shared\src\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}'.");
src\aspnetcore\src\Http\Routing\src\Constraints\RegexErrorStubRouteConstraint.cs (2)
20throw new InvalidOperationException(Resources.RegexRouteContraint_NotConfigured); 30throw new InvalidOperationException(Resources.RegexRouteContraint_NotConfigured);
src\aspnetcore\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\aspnetcore\src\Http\Routing\src\RouteConstraintBuilder.cs (1)
140throw new InvalidOperationException(
src\aspnetcore\src\Http\Routing\src\RouteOptions.cs (1)
167throw new InvalidOperationException($"{type} must implement {typeof(IParameterPolicy)}");
src\aspnetcore\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\aspnetcore\src\Shared\PooledArrayBufferWriter.cs (1)
211throw new InvalidOperationException($"Cannot advance past the end of the buffer, which has a size of {capacity}.");
src\aspnetcore\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.AI (7)
Components\BlockRenderer.cs (2)
55throw new InvalidOperationException( 61throw new InvalidOperationException("BlockRenderer requires child content.");
Components\MessageInput.cs (1)
57?? throw new InvalidOperationException(
Components\MessageList.cs (1)
59?? throw new InvalidOperationException(
Engine\AgentContext.cs (2)
80throw new InvalidOperationException("A message is already being processed."); 104throw new InvalidOperationException(
Pipeline\BlockMappingPipeline.cs (1)
175throw new InvalidOperationException(
Microsoft.AspNetCore.Components.Analyzers (1)
InternalUsageAnalyzer.cs (1)
69_ => throw new InvalidOperationException("Unexpected operation kind: " + context.Operation.Kind),
Microsoft.AspNetCore.Components.Authorization (2)
AuthorizeViewCore.cs (2)
80throw new InvalidOperationException($"Do not specify both '{nameof(Authorized)}' and '{nameof(ChildContent)}'."); 85throw new InvalidOperationException($"Authorization requires a cascading parameter of type Task<{nameof(AuthenticationState)}>. Consider using {typeof(CascadingAuthenticationState).Name} to supply this.");
Microsoft.AspNetCore.Components.Endpoints (118)
_generated\14\ResourceCollectionSerializerContext.g.cs (2)
78throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 86throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
_generated\33\BrowserOptionsJsonContext.g.cs (2)
76throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 84throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
_generated\5\ImportMapSerializerContext.g.cs (2)
72throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 80throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
_generated\52\ServerComponentJsonContext.g.cs (2)
72throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 80throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
_generated\58\PrerenderComponentApplicationStoreSerializerContext.g.cs (2)
84throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 92throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
Builder\RazorComponentDataSourceOptions.cs (1)
28_ => throw new InvalidOperationException($"Unknown render mode: {obj}"),
Builder\RazorComponentEndpointDataSource.cs (1)
165throw 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(
CacheView\CacheViewService.cs (3)
66throw new InvalidOperationException( 99throw new InvalidOperationException( 120throw new InvalidOperationException(
DependencyInjection\HttpNavigationManager.cs (1)
45throw 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)
225throw 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.");
Forms\DataAnnotationsLocalizer.cs (1)
133?? throw new InvalidOperationException(
RazorComponentEndpointInvoker.cs (1)
61var 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\CacheViewTextWriter.cs (2)
105throw new InvalidOperationException( 163throw new InvalidOperationException(
Rendering\EndpointComponentState.cs (1)
114throw new InvalidOperationException(
Rendering\EndpointHtmlRenderer.cs (1)
79throw new InvalidOperationException("The HttpContext cannot change value once assigned.");
Rendering\EndpointHtmlRenderer.EventDispatch.cs (5)
50throw new InvalidOperationException(CreateMessageForAmbiguousNamedSubmitEvent(handlerName, locationsForName)); 119throw new InvalidOperationException($"The {nameof(Router.NotFoundPage)} route must be specified or re-execution middleware has to be set to render not found content."); 194throw new InvalidOperationException($"A single named submit event is tracked more than once at the same location."); 222throw new InvalidOperationException($"The named value frame for component '{componentId}' at index '{frameIndex}' unexpectedly matches a frame of type '{frame.FrameType}'."); 228throw new InvalidOperationException($"Expected a named value with name '{eventType}' but found the name '{frame.NamedEventType}'.");
Rendering\EndpointHtmlRenderer.Prerendering.cs (3)
232throw new InvalidOperationException( 290throw new InvalidOperationException( 318throw 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 (3)
59throw new InvalidOperationException($"{nameof(SendStreamingUpdatesAsync)} can only be called once."); 64throw new InvalidOperationException("Cannot begin streaming rendering because no framing header was set."); 324?? throw new InvalidOperationException(
Rendering\SSRRenderModeBoundary.cs (4)
99throw new InvalidOperationException($"A component of type '{componentType}' has render mode '{specifiedMode.GetType().Name}', " + 177throw 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."); 183throw 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."); 255throw new InvalidOperationException(
Rendering\TypeNameHash.cs (1)
18throw new InvalidOperationException($"Cannot compute a hash for a type without a {nameof(Type.FullName)}.");
Serialization\JsonStoredDataSerializer.cs (3)
113throw new InvalidOperationException($"Cannot deserialize type '{typeName}'."); 124?? throw new InvalidOperationException($"Cannot resolve the assembly-qualified name for type '{type}'."); 188throw new InvalidOperationException($"Cannot serialize type '{valueType}'.");
SessionCascadingValueSupplier.cs (3)
51throw new InvalidOperationException( 67throw new InvalidOperationException($"A property '{propertyName}' on component type '{type.FullName}' wasn't found."); 83throw new InvalidOperationException($"A callback is already registered for the session key '{sessionKey}'. Multiple components cannot use the same session key for multiple [SupplyParameterFromSession] attributes.");
SessionResolver.cs (1)
19throw new InvalidOperationException(SessionNotConfiguredMessage);
src\aspnetcore\src\Components\Shared\src\Reflection\PropertyGetter.cs (1)
29throw new InvalidOperationException("Cannot provide a value for property " +
src\aspnetcore\src\Components\Shared\src\Reflection\PropertySetter.cs (1)
25throw new InvalidOperationException("Cannot provide a value for property " +
src\aspnetcore\src\Components\Shared\src\RenderFragmentCapture.cs (1)
53throw new InvalidOperationException("Cannot retrieve captured frames because the RenderFragment was not invoked during rendering.");
src\aspnetcore\src\Components\Shared\src\RenderFragmentSerializer.cs (6)
191throw new InvalidOperationException( 245_ => throw new InvalidOperationException($"Unsupported render mode type: '{renderMode.GetType().Name}'."), 296throw new InvalidOperationException($"Cannot resolve component type '{node.TypeName}' from assembly '{node.TypeAssembly}'."); 312_ => throw new InvalidOperationException($"Unknown render mode name '{renderModeName}'."), 363_ => throw new InvalidOperationException($"Unexpected value type '{attr.Value?.GetType()}' for serialized RenderFragment attribute '{attr.Name}'.") 374var type = typeCache.GetParameterType(assemblyName, typeName) ?? throw new InvalidOperationException($"Could not resolve serialized type '{typeName}' from assembly '{assemblyName}'.");
src\aspnetcore\src\Components\Shared\src\ResourceCollectionProvider.cs (1)
24throw new InvalidOperationException("The resource collection URL has already been set.");
src\aspnetcore\src\Shared\Buffers\RefPooledArrayBufferWriter.cs (1)
107throw new InvalidOperationException($"Cannot advance past the end of the buffer. Current position: {_index}, Capacity: {_buffer.Length}, Requested advance: {count}.");
src\aspnetcore\src\Shared\ChunkingCookieManager\ChunkingCookieManager.cs (1)
180throw new InvalidOperationException("The cookie key and options are larger than ChunksSize, leaving no room for data.");
src\aspnetcore\src\Shared\Components\PrerenderComponentApplicationStore.cs (1)
63throw new InvalidOperationException("State already persisted.");
src\aspnetcore\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"),
TempData\TempDataCascadingValueSupplier.cs (2)
50throw new InvalidOperationException($"A property '{propertyName}' on component type '{type.FullName}' wasn't found."); 63throw new InvalidOperationException($"A callback is already registered for the TempData key '{tempDataKey}'. Multiple components cannot use the same TempData key for multiple [SupplyParameterFromTempData] attributes.");
TempData\TempDataProviderServiceCollectionExtensions.cs (1)
30_ => throw new InvalidOperationException($"Unsupported TempDataProviderType: {options.Value.TempDataProviderType}"),
Microsoft.AspNetCore.Components.Forms (11)
DataAnnotationsValidator.cs (2)
31throw new InvalidOperationException($"{nameof(DataAnnotationsValidator)} requires a cascading " + 52throw new InvalidOperationException($"{GetType()} does not support changing the " +
EditContext.cs (2)
339?? throw new InvalidOperationException("The async validator returned a null task."); 391throw new InvalidOperationException("The async validator returned a null task.");
FieldIdentifier.cs (1)
194throw new InvalidOperationException($"Unable to compile expression: {member}");
src\aspnetcore\src\Components\Shared\src\ExpressionFormatting\ExpressionFormatter.cs (5)
62throw new InvalidOperationException("Method calls cannot be formatted."); 218throw new InvalidOperationException($"Unable to evaluate index expressions of type '{indexExpression.GetType().Name}'."); 276throw new InvalidOperationException($"Cannot format an index argument of type '{memberType}'."); 287var member => throw new InvalidOperationException( 327throw new InvalidOperationException($"Unable to format constant values of type '{x.GetType()}'.");
ValidationRequestedEventArgs.cs (1)
49throw new InvalidOperationException(
Microsoft.AspNetCore.Components.Media (3)
MediaComponentBase.cs (3)
101throw new InvalidOperationException("Component is already attached to a render handle."); 114throw new InvalidOperationException($"{nameof(MediaComponentBase)}.{nameof(Source)} is required."); 232Log.LoadFailed(Logger, source.CacheKey, new InvalidOperationException(result.Error ?? "Unknown error"));
Microsoft.AspNetCore.Components.QuickGrid (8)
Columns\ColumnBase.razor.cs (1)
121throw new InvalidOperationException($"Column '{displayName}' expects item type '{typeof(TGridItem).FullName}', which does not match the parent QuickGrid's item type.");
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 (2)
279throw new InvalidOperationException($"{nameof(QuickGrid)} requires one of {nameof(Items)} or {nameof(ItemsProvider)}, but both were specified."); 507throw new InvalidOperationException(
src\aspnetcore\src\Components\Shared\src\QueryParameterValueSupplier.cs (1)
38throw new InvalidOperationException($"Querystring values cannot be parsed as type '{elementType}'.");
src\aspnetcore\src\Components\Shared\src\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}'.");
Microsoft.AspNetCore.Components.SdkAnalyzers (1)
InternalUsageAnalyzer.cs (1)
69_ => throw new InvalidOperationException("Unexpected operation kind: " + context.Operation.Kind),
Microsoft.AspNetCore.Components.Server (51)
_generated\13\CircuitPersistenceManagerSerializerContext.g.cs (2)
74throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 82throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
_generated\3\JavaScriptInitializersManifestJsonContext.g.cs (2)
74throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 82throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
_generated\38\ServerComponentJsonContext.g.cs (2)
72throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 80throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
_generated\44\PrerenderComponentApplicationStoreSerializerContext.g.cs (2)
84throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 92throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
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)
125throw new InvalidOperationException("The circuit host is already initialized."); 544throw new InvalidOperationException($"The stream with ID {streamId} is not available. It may have timed out."); 689throw new InvalidOperationException("Circuit is being invoked prior to initialization."); 786throw new InvalidOperationException("UpdateRootComponents is not supported when components have" + 836throw new InvalidOperationException($"The first set of update operations must always be of type {nameof(RootComponentOperationType.Add)}"); 937throw 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)
140throw 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\aspnetcore\src\Components\Shared\src\RenderFragmentCapture.cs (1)
53throw new InvalidOperationException("Cannot retrieve captured frames because the RenderFragment was not invoked during rendering.");
src\aspnetcore\src\Components\Shared\src\RenderFragmentSerializer.cs (6)
191throw new InvalidOperationException( 245_ => throw new InvalidOperationException($"Unsupported render mode type: '{renderMode.GetType().Name}'."), 296throw new InvalidOperationException($"Cannot resolve component type '{node.TypeName}' from assembly '{node.TypeAssembly}'."); 312_ => throw new InvalidOperationException($"Unknown render mode name '{renderModeName}'."), 363_ => throw new InvalidOperationException($"Unexpected value type '{attr.Value?.GetType()}' for serialized RenderFragment attribute '{attr.Name}'.") 374var type = typeCache.GetParameterType(assemblyName, typeName) ?? throw new InvalidOperationException($"Could not resolve serialized type '{typeName}' from assembly '{assemblyName}'.");
src\aspnetcore\src\Components\Shared\src\WebRootComponentManager.cs (7)
45throw new InvalidOperationException("Exceeded the maximum number of allowed server interactive root components."); 51throw new InvalidOperationException($"A root component with SSR component ID {ssrComponentId} already exists."); 81throw new InvalidOperationException($"No root component exists with SSR component ID {ssrComponentId}."); 135throw new InvalidOperationException("An invalid component marker key was provided."); 179throw new InvalidOperationException("Cannot update components with mismatching types."); 184throw new InvalidOperationException("An invalid component marker key was provided."); 191throw new InvalidOperationException("Cannot update components with mismatching keys.");
src\aspnetcore\src\Shared\Components\PrerenderComponentApplicationStore.cs (1)
63throw new InvalidOperationException("State already persisted.");
src\aspnetcore\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\aspnetcore\src\Shared\PooledArrayBufferWriter.cs (1)
211throw new InvalidOperationException($"Cannot advance past the end of the buffer, which has a size of {capacity}.");
src\aspnetcore\src\Shared\ValueStopwatch\ValueStopwatch.cs (1)
43throw new InvalidOperationException("An uninitialized, or 'default', ValueStopwatch cannot be used to get elapsed time.");
src\aspnetcore\src\SignalR\common\Shared\MemoryBufferWriter.cs (1)
63throw new InvalidOperationException("The reader wasn't returned!");
src\aspnetcore\src\submodules\MessagePack-CSharp\src\MessagePack.UnityClient\Assets\Scripts\MessagePack\Utilities.cs (1)
39throw 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.AutoPause (2)
_generated\2\AutoPauseJsonContext.g.cs (2)
72throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 80throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
Microsoft.AspNetCore.Components.Testing (16)
_generated\8\E2EManifestJsonContext.g.cs (2)
72throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 80throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
Infrastructure\E2EManifest.cs (3)
35?? throw new InvalidOperationException($"Failed to deserialize E2E manifest: {manifestPath}"); 48throw new InvalidOperationException( 56throw new InvalidOperationException(
Infrastructure\ServerFactory.cs (1)
172?? throw new InvalidOperationException(
Infrastructure\ServerInstance.cs (4)
96?? throw new InvalidOperationException($"Failed to start process for '{AppName}'."); 112throw new InvalidOperationException( 204throw new InvalidOperationException( 210throw new InvalidOperationException(
Infrastructure\TestReadinessHostingStartup.cs (2)
59?? throw new InvalidOperationException( 66?? throw new InvalidOperationException(
Playwright\BrowserTest.cs (1)
35s_browserState?.Browser ?? throw new InvalidOperationException(
Playwright\PlaywrightTest.cs (1)
26s_playwright ?? throw new InvalidOperationException(
Playwright\UITest.cs (2)
39?? throw new InvalidOperationException( 67?? throw new InvalidOperationException(
Microsoft.AspNetCore.Components.Web (56)
_generated\15\WebRendererSerializerContext.g.cs (2)
72throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 80throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
ElementReferenceExtensions.cs (2)
38throw new InvalidOperationException("No JavaScript runtime found."); 48throw new InvalidOperationException("ElementReference has not been configured correctly.");
Forms\DisplayName.cs (1)
45throw new InvalidOperationException($"{GetType()} requires a value for the " +
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)
271throw new InvalidOperationException($"{GetType()} requires a value for the 'ValueExpression' " + 305throw 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."); 115throw 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\Label.cs (1)
79throw new InvalidOperationException($"{GetType()} requires a value for the " +
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)
46throw new InvalidOperationException($"{GetType()} requires a cascading parameter " + 53throw 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\aspnetcore\src\Components\Shared\src\ExpressionFormatting\ExpressionFormatter.cs (5)
62throw new InvalidOperationException("Method calls cannot be formatted."); 218throw new InvalidOperationException($"Unable to evaluate index expressions of type '{indexExpression.GetType().Name}'."); 276throw new InvalidOperationException($"Cannot format an index argument of type '{memberType}'."); 287var member => throw new InvalidOperationException( 327throw new InvalidOperationException($"Unable to format constant values of type '{x.GetType()}'.");
Virtualization\Virtualize.cs (4)
245throw new InvalidOperationException( 400throw new InvalidOperationException( 427throw new InvalidOperationException( 448throw new InvalidOperationException(
WebEventData\ChangeEventArgsReader.cs (1)
59throw new InvalidOperationException(
WebEventData\WebEventData.cs (2)
29throw new InvalidOperationException("Error parsing the event descriptor", e); 87throw new InvalidOperationException($"There was an error parsing the event arguments. EventId: '{eventHandlerId}'.", e);
Microsoft.AspNetCore.Components.WebAssembly (38)
_generated\20\WebAssemblyJsonSerializerContext.g.cs (2)
77throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 85throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
_generated\26\PrerenderComponentApplicationStoreSerializerContext.g.cs (2)
84throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 92throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
Hosting\WebAssemblyCultureProvider.cs (1)
49throw new InvalidOperationException("Blazor detected a change in the application's culture that is not supported with the current project configuration. " +
Hosting\WebAssemblyHost.cs (2)
133throw new InvalidOperationException("The host has already started."); 241throw new InvalidOperationException("All initial operations must be additions.");
Hosting\WebAssemblyHostBuilder.cs (2)
168throw new InvalidOperationException( 231throw new InvalidOperationException("WebAssemblyHostBuilder needs to be instantiated in the UI thread.");
Hosting\WebAssemblyHostConfiguration.cs (1)
66throw new InvalidOperationException("Can only set property if at least one provider has been inserted.");
Http\WebAssemblyHttpRequestMessageExtensions.cs (3)
35_ => throw new InvalidOperationException($"Unsupported enum value {requestCredentials}.") 62_ => throw new InvalidOperationException($"Unsupported enum value {requestCache}.") 87_ => throw new InvalidOperationException($"Unsupported enum value {requestMode}.")
Prerendering\WebAssemblyComponentParameterDeserializer.cs (6)
35throw new InvalidOperationException($"The number of parameter definitions '{parametersDefinitions.Count}' does not match the number parameter values '{parameterValues.Count}'."); 43throw new InvalidOperationException("The name is missing in a parameter definition."); 52throw new InvalidOperationException($"The parameter definition for '{definition.Name}' is incomplete: Type='{definition.TypeName}' Assembly='{definition.Assembly}'."); 67throw new InvalidOperationException($"Could not parse the parameter value for parameter '{definition.Name}' of type '{definition.TypeName}' and assembly '{definition.Assembly}'.", e); 75throw new InvalidOperationException($"The parameter '{definition.Name}' with type '{definition.TypeName}' in assembly '{definition.Assembly}' could not be found."); 107throw 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)
131throw new InvalidOperationException($"The component operation of type '{operation.Type}' requires a '{nameof(operation.Marker)}' to be specified."); 135?? 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 application 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\aspnetcore\src\Components\Shared\src\RenderFragmentCapture.cs (1)
53throw new InvalidOperationException("Cannot retrieve captured frames because the RenderFragment was not invoked during rendering.");
src\aspnetcore\src\Components\Shared\src\RenderFragmentSerializer.cs (6)
191throw new InvalidOperationException( 245_ => throw new InvalidOperationException($"Unsupported render mode type: '{renderMode.GetType().Name}'."), 296throw new InvalidOperationException($"Cannot resolve component type '{node.TypeName}' from assembly '{node.TypeAssembly}'."); 312_ => throw new InvalidOperationException($"Unknown render mode name '{renderModeName}'."), 363_ => throw new InvalidOperationException($"Unexpected value type '{attr.Value?.GetType()}' for serialized RenderFragment attribute '{attr.Name}'.") 374var type = typeCache.GetParameterType(assemblyName, typeName) ?? throw new InvalidOperationException($"Could not resolve serialized type '{typeName}' from assembly '{assemblyName}'.");
src\aspnetcore\src\Components\Shared\src\ResourceCollectionProvider.cs (1)
24throw new InvalidOperationException("The resource collection URL has already been set.");
src\aspnetcore\src\Components\Shared\src\WebRootComponentManager.cs (6)
51throw new InvalidOperationException($"A root component with SSR component ID {ssrComponentId} already exists."); 81throw new InvalidOperationException($"No root component exists with SSR component ID {ssrComponentId}."); 135throw new InvalidOperationException("An invalid component marker key was provided."); 179throw new InvalidOperationException("Cannot update components with mismatching types."); 184throw new InvalidOperationException("An invalid component marker key was provided."); 191throw new InvalidOperationException("Cannot update components with mismatching keys.");
src\aspnetcore\src\Shared\Components\PrerenderComponentApplicationStore.cs (1)
63throw new InvalidOperationException("State already persisted.");
Microsoft.AspNetCore.Components.WebAssembly.Authentication (12)
_generated\9\InteractiveRequestOptionsSerializerContext.g.cs (2)
76throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 84throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
RemoteAuthenticatorViewCore.cs (8)
145throw new InvalidOperationException($"Invalid action '{Action}'."); 203throw new InvalidOperationException($"Invalid action '{Action}'."); 240throw new InvalidOperationException($"Invalid authentication result status '{result.Status}'."); 253throw new InvalidOperationException("Should not redirect."); 275throw new InvalidOperationException($"Invalid authentication result status '{result.Status}'."); 323throw new InvalidOperationException($"Invalid authentication result status."); 341throw new InvalidOperationException("Should not redirect."); 360throw new InvalidOperationException($"Invalid authentication result status.");
Services\AuthorizationMessageHandler.cs (2)
53throw new InvalidOperationException($"The '{nameof(AuthorizationMessageHandler)}' is not configured. " + 102throw new InvalidOperationException("Handler already configured.");
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)
422throw 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 (12)
_generated\11\SourceGenerationContext.g.cs (2)
76throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 84throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
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)
63throw new InvalidOperationException("Cannot invoke JavaScript outside of a WebView context.");
Services\WebViewRenderer.cs (1)
80throw 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\aspnetcore\src\Shared\StaticWebAssets\ManifestStaticWebAssetFileProvider.cs (1)
274public Stream CreateReadStream() => throw new InvalidOperationException("Can not create a stream for a directory.");
WebViewManager.cs (2)
96throw new InvalidOperationException($"There is already a root component with selector '{selector}'."); 125throw 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.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.Connections.Abstractions (2)
src\aspnetcore\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.Cors (2)
Infrastructure\CorsPolicyBuilder.cs (1)
232throw new InvalidOperationException(Resources.InsecureConfiguration);
Infrastructure\CorsService.cs (1)
51throw new InvalidOperationException(Resources.FormatPolicyNotFound(policyName));
Microsoft.AspNetCore.DataProtection (18)
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);
Managed\ManagedAuthenticatedEncryptor.cs (1)
266throw Error.CryptCommon_GenericError(new InvalidOperationException("Failed to compute HMAC"));
src\aspnetcore\src\Shared\Buffers\RefPooledArrayBufferWriter.cs (1)
107throw new InvalidOperationException($"Cannot advance past the end of the buffer. Current position: {_index}, Capacity: {_buffer.Length}, Requested advance: {count}.");
src\aspnetcore\src\Shared\PooledArrayBufferWriter.cs (1)
211throw new InvalidOperationException($"Cannot advance past the end of the buffer, which has a size of {capacity}.");
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.MicroBenchmarks (3)
src\aspnetcore\src\Shared\BenchmarkRunner\AspNetCoreBenchmarkAttribute.cs (1)
51throw new InvalidOperationException(message);
src\aspnetcore\src\Shared\Buffers\RefPooledArrayBufferWriter.cs (1)
107throw new InvalidOperationException($"Cannot advance past the end of the buffer. Current position: {_index}, Capacity: {_buffer.Length}, Requested advance: {count}.");
src\aspnetcore\src\Shared\PooledArrayBufferWriter.cs (1)
211throw new InvalidOperationException($"Cannot advance past the end of the buffer, which has a size of {capacity}.");
Microsoft.AspNetCore.DeveloperCertificates.XPlat (10)
src\aspnetcore\src\Shared\CertificateGeneration\CertificateManager.cs (5)
447throw new InvalidOperationException($"The directory '{exportDir}' does not exist. Choose permissions carefully when creating it."); 715throw new InvalidOperationException("Unknown format."); 914throw new InvalidOperationException($"'{nameof(RemoveLocations.Undefined)}' is not a valid location."); 926throw new InvalidOperationException("Invalid location."); 982throw new InvalidOperationException($"Failed to create a key with a size of {minimumKeySize} bits");
src\aspnetcore\src\Shared\CertificateGeneration\MacOSCertificateManager.cs (4)
110throw new InvalidOperationException("There was an error trusting the certificate."); 262throw new InvalidOperationException($@"There was an error removing the certificate with thumbprint '{certificate.Thumbprint}'. 278throw new InvalidOperationException($"Can't determine the subject for the certificate with subject '{certificate.Subject}'."); 360throw new InvalidOperationException("Failed to add the certificate to the keychain. Are you running in a non-interactive session perhaps?");
src\aspnetcore\src\Shared\CertificateGeneration\UnixCertificateManager.cs (1)
532throw new InvalidOperationException($@"There was an error removing the certificate with thumbprint '{certificate.Thumbprint}'.");
Microsoft.AspNetCore.Diagnostics (5)
_generated\7\ExtensionsExceptionJsonContext.g.cs (2)
72throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 80throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
DiagnosticsMetrics.cs (1)
64throw new InvalidOperationException("Unexpected value: " + result);
ExceptionHandler\ExceptionHandlerMiddlewareImpl.cs (2)
57throw new InvalidOperationException(Resources.ExceptionHandlerOptions_NotConfiguredCorrectly); 268edi = 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 (13)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\BindingExtensions.g.cs (6)
235throw new InvalidOperationException("Cannot create instance of type 'System.Collections.Generic.KeyValuePair<string, object>' because parameter 'key' has no matching config. Each parameter in the constructor that does not have a default value must have a corresponding config entry."); 240throw new InvalidOperationException("Cannot create instance of type 'System.Collections.Generic.KeyValuePair<string, object>' because parameter 'value' has no matching config. Each parameter in the constructor that does not have a default value must have a corresponding config entry."); 334throw new InvalidOperationException($"'ErrorOnUnknownConfiguration' was set on the provided BinderOptions, but the following properties were not found on the instance of {type}: {string.Join(", ", temp)}"); 383throw new InvalidOperationException($"Failed to convert configuration value '{value ?? "null"}' at '{path}' to type '{typeof(T)}'.", exception); 395throw new InvalidOperationException($"Failed to convert configuration value '{value ?? "null"}' at '{path}' to type '{typeof(global::System.TimeSpan)}'.", exception); 407throw new InvalidOperationException($"Failed to convert configuration value '{value ?? "null"}' at '{path}' to type '{typeof(int)}'.", exception);
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\Validators.g.cs (5)
290throw new global::System.InvalidOperationException(MinMaxError); 295Minimum = ConvertValue(Minimum, culture) ?? throw new global::System.InvalidOperationException(MinMaxError); 296Maximum = ConvertValue(Maximum, culture) ?? throw new global::System.InvalidOperationException(MinMaxError); 301throw new global::System.InvalidOperationException("The maximum value '{Maximum}' must be greater than or equal to the minimum value '{Minimum}'."); 305throw new global::System.InvalidOperationException("Cannot use exclusive bounds when the maximum value is equal to the minimum value.");
Logging\HttpLoggingRedactionInterceptor.cs (1)
190_ => throw new InvalidOperationException($"Unsupported value '{mode}' for enum type '{nameof(IncomingPathLoggingMode)}'"),
Logging\Internal\LoggingRedactionOptionsConfigureOptions.cs (1)
121=> new($"Failed to convert configuration value at '{path}' to type '{type}'.", innerException);
Microsoft.AspNetCore.Diagnostics.Middleware.PerformanceTests (2)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (2)
398=> throw new InvalidOperationException(message); 410=> throw new InvalidOperationException(message, innerException);
Microsoft.AspNetCore.Diagnostics.Middleware.Tests (16)
Logging\AcceptanceTests.cs (2)
123throw new InvalidOperationException("Test exception"); 993public 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"),
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\EmptyCollections\EmptyReadOnlyList.cs (2)
55public T Current => throw new InvalidOperationException(); 56object IEnumerator.Current => throw new InvalidOperationException();
Microsoft.AspNetCore.Grpc.JsonTranscoding (74)
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 (6)
24?? throw new InvalidOperationException($"Unable to resolve descriptor for {typeToConvert}."); 28?? throw new InvalidOperationException(@$"Error converting value ""{value}"" to enum type {typeToConvert}."); 36throw new InvalidOperationException($"Unexpected JSON token: {reader.TokenType}."); 49?? throw new InvalidOperationException($"Unable to resolve descriptor for {value.GetType()}."); 67throw new InvalidOperationException($"Integer can't be converted to enum {typeof(TEnum).FullName}."); 77throw 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)
74throw new InvalidOperationException("Couldn't resolve descriptor for message type: " + type); 157throw 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\aspnetcore\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\aspnetcore\src\Grpc\JsonTranscoding\src\Shared\Legacy.cs (12)
68throw new InvalidOperationException($"Invalid Timestamp value: {value}"); 100throw new InvalidOperationException($"Invalid Timestamp value: {value}"); 105throw new InvalidOperationException($"Invalid Timestamp value: {value}"); 123throw new InvalidOperationException($"Invalid Timestamp value: {value}"); 131throw new InvalidOperationException($"Invalid Timestamp value: {value}"); 174throw new InvalidOperationException("Non-normalized timestamp value."); 183throw new InvalidOperationException("Invalid Duration value: " + value); 190throw new InvalidOperationException("Invalid Duration value: " + value); 207throw new InvalidOperationException("Invalid Duration value: " + value); 214throw new InvalidOperationException("Invalid Duration value: " + value); 237throw new InvalidOperationException("Non-normalized duration value."); 313throw new InvalidOperationException($"Invalid field mask: {text}");
src\aspnetcore\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\aspnetcore\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\aspnetcore\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 (9)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\BindingExtensions.g.cs (2)
192throw new InvalidOperationException($"'ErrorOnUnknownConfiguration' was set on the provided BinderOptions, but the following properties were not found on the instance of {type}: {string.Join(", ", temp)}"); 241throw new InvalidOperationException($"Failed to convert configuration value at '{path}' to type '{typeof(int)}'.", exception);
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\Validators.g.cs (5)
103throw new global::System.InvalidOperationException(MinMaxError); 108Minimum = ConvertValue(Minimum, culture) ?? throw new global::System.InvalidOperationException(MinMaxError); 109Maximum = ConvertValue(Maximum, culture) ?? throw new global::System.InvalidOperationException(MinMaxError); 114throw new global::System.InvalidOperationException("The maximum value '{Maximum}' must be greater than or equal to the minimum value '{Minimum}'."); 118throw new global::System.InvalidOperationException("Cannot use exclusive bounds when the maximum value is equal to the minimum value.");
parent\parent\parent\eng\MSBuild\parent\parent\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 (22)
_generated\11\SourceGenerationContext.g.cs (2)
76throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 84throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
GenericHost\GenericWebHostBuilder.cs (3)
156exceptions.Add(new InvalidOperationException($"Startup assembly {assemblyName} failed to execute. See the inner exception for more details.", ex)); 211var instance = startupFactory(webHostBuilderContext) ?? throw new InvalidOperationException("The specified factory returned null startup instance."); 292throw 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)
194throw 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\aspnetcore\src\Shared\StaticWebAssets\ManifestStaticWebAssetFileProvider.cs (1)
274public Stream CreateReadStream() => throw new InvalidOperationException("Can not create a stream for a directory.");
WebHostBuilder.cs (2)
135throw new InvalidOperationException(Resources.WebHostBuilder_SingleInstance); 251exceptions.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.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); 376throw new InvalidOperationException("This form is being accessed with a failed antiforgery validation. 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)
50throw 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\aspnetcore\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.Connections (5)
Internal\HttpConnectionContext.cs (1)
350HttpContext = userRefreshHttpContext ?? HttpContext ?? throw new InvalidOperationException("An HttpContext is required to refresh authentication."),
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\aspnetcore\src\SignalR\common\Shared\MemoryBufferWriter.cs (1)
63throw new InvalidOperationException("The reader wasn't returned!");
Microsoft.AspNetCore.Http.Connections.Client (14)
HttpConnection.cs (7)
68throw new InvalidOperationException($"Cannot access the {nameof(Transport)} pipe before the connection has started."); 91set => throw new InvalidOperationException("The ConnectionId is set internally and should not be set by user code."); 329throw new InvalidOperationException("Negotiation can only be skipped when using the WebSocket transport directly."); 359throw new InvalidOperationException("Negotiate redirection limit exceeded."); 502throw new InvalidOperationException(negotiateResponse.Error); 637throw new InvalidOperationException("Configured HttpMessageHandlerFactory did not return a value."); 773throw new InvalidOperationException("Cannot refresh authentication before the connection is started.");
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)
222throw 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\aspnetcore\src\SignalR\common\Shared\ReusableUtf8JsonWriter.cs (1)
46throw new InvalidOperationException("The writer wasn't returned!");
src\aspnetcore\src\SignalR\common\Shared\Utf8BufferTextWriter.cs (1)
57throw new InvalidOperationException("The writer wasn't returned!");
Microsoft.AspNetCore.Http.Extensions (61)
_generated\11\ProblemDetailsJsonContext.g.cs (2)
72throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 80throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
HttpRequestJsonExtensions.cs (2)
406throw new InvalidOperationException($"Unable to read the request as JSON because the request content type '{request.ContentType}' is not a known JSON content type."); 425throw 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)
682throw new InvalidOperationException(errorMessage); 689throw new InvalidOperationException(errorMessage); 694throw new InvalidOperationException(errorMessage); 707throw new InvalidOperationException($"Encountered a parameter of type '{parameter.ParameterType}' without a name. Parameters must have a name."); 734throw new InvalidOperationException($"'{routeName}' is not a route parameter."); 819throw new InvalidOperationException($"Unable to resolve service referenced by {nameof(FromKeyedServicesAttribute)}. The service provider doesn't support keyed services."); 1601throw new InvalidOperationException($"The nullable type '{TypeNameHelper.GetTypeDisplayName(parameter.ParameterType, fullName: false)}' is not supported, mark the parameter as non-nullable."); 1721throw 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}."); 2884throw new InvalidOperationException("The IResult in Task<IResult> response must not be null."); 2892throw new InvalidOperationException("The Task returned by the Delegate must not be null."); 2900throw 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\aspnetcore\src\Components\Endpoints\src\FormMapping\Factories\CollectionConverterFactory.cs (1)
66throw new InvalidOperationException($"Unable to create converter for '{type.FullName}'.");
src\aspnetcore\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\aspnetcore\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\aspnetcore\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\aspnetcore\src\Components\Endpoints\src\FormMapping\Factories\ComplexTypeConverterFactory.cs (1)
104throw new InvalidOperationException($"Could not create a converter factory for type {type}.");
src\aspnetcore\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\aspnetcore\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\aspnetcore\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\aspnetcore\src\Components\Endpoints\src\FormMapping\Factories\EnumConverterFactory.cs (1)
20throw new InvalidOperationException($"Cannot create converter for type '{type}'.");
src\aspnetcore\src\Components\Endpoints\src\FormMapping\Factories\FileConverterFactory.cs (1)
29throw new InvalidOperationException($"Unable to create converter for '{type.FullName}'.");
src\aspnetcore\src\Components\Endpoints\src\FormMapping\Factories\NullableConverterFactory.cs (1)
35throw new InvalidOperationException($"Unable to create converter for type '{type}'.");
src\aspnetcore\src\Components\Endpoints\src\FormMapping\Factories\ParsableConverterFactory.cs (1)
25throw new InvalidOperationException($"Unable to create converter for '{type.FullName}'.");
src\aspnetcore\src\Components\Endpoints\src\FormMapping\FormDataMapperOptions.cs (1)
70throw new InvalidOperationException($"No converter registered for type '{type.FullName}'.");
src\aspnetcore\src\Components\Endpoints\src\FormMapping\FormDataReader.cs (1)
225throw new InvalidOperationException($"The maximum recursion depth of '{MaxRecursionDepth}' was exceeded for '{_currentPrefixBuffer}{separator}{key}'.");
src\aspnetcore\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\aspnetcore\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\aspnetcore\src\Shared\ObjectMethodExecutor\ObjectMethodExecutor.cs (1)
186throw new InvalidOperationException($"Cannot call {nameof(GetDefaultValueForParameter)}, because no parameter default values were supplied.");
src\aspnetcore\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\aspnetcore\src\Shared\PropertyAsParameterInfo.cs (2)
80throw new InvalidOperationException($"Encountered a parameter of type '{parameters[i].ParameterType}' without a name. Parameters must have a name."); 102throw new InvalidOperationException($"The nullable type '{TypeNameHelper.GetTypeDisplayName(parameters[i].ParameterType, fullName: false)}' is not supported.");
Microsoft.AspNetCore.Http.RequestDelegateGenerator (2)
src\aspnetcore\src\Shared\RoslynUtils\SymbolExtensions.cs (1)
210_ => throw new InvalidOperationException("Unexpected symbol type: " + symbol)
src\aspnetcore\src\Shared\RoslynUtils\WellKnownTypes.cs (1)
104throw 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\aspnetcore\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.HttpLogging (7)
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\aspnetcore\src\Shared\Buffers\RefPooledArrayBufferWriter.cs (1)
107throw new InvalidOperationException($"Cannot advance past the end of the buffer. Current position: {_index}, Capacity: {_buffer.Length}, Requested advance: {count}.");
src\aspnetcore\src\Shared\ValueStopwatch\ValueStopwatch.cs (1)
43throw 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 (29)
_generated\0\GeneratedRouteBuilderExtensions.g.cs (10)
136throw new InvalidOperationException("The IResult returned by the Delegate must not be null."); 289throw new InvalidOperationException("The IResult returned by the Delegate must not be null."); 439throw new InvalidOperationException("The IResult returned by the Delegate must not be null."); 570throw new InvalidOperationException("The IResult returned by the Delegate must not be null."); 703throw new InvalidOperationException("The IResult returned by the Delegate must not be null."); 820throw new InvalidOperationException("The IResult returned by the Delegate must not be null."); 936throw new InvalidOperationException("The IResult returned by the Delegate must not be null."); 1054throw new InvalidOperationException("The IResult returned by the Delegate must not be null."); 1163throw new InvalidOperationException("The IResult returned by the Delegate must not be null."); 1277throw new InvalidOperationException("The IResult returned by the Delegate must not be null.");
_generated\17\IdentityEndpointsJsonSerializerContext.g.cs (2)
72throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 80throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
_generated\50\IdentityJsonSerializerContext.g.cs (2)
76throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 84throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
IdentityBuilderExtensions.cs (1)
79throw new InvalidOperationException(Resources.FormatInvalidManagerType(customType.Name, "SignInManager", builder.UserType.Name));
Passkeys\CredentialPublicKey.cs (5)
77throw new InvalidOperationException($"Unsupported key type '{_type}'."); 113_ => throw new InvalidOperationException($"Missing or unknown kty {_type}"), 206throw new InvalidOperationException($"Cannot get RSA signature padding for key type {_type}."); 223_ => throw new InvalidOperationException($"Missing or unknown alg {_alg}"), 247_ => throw new InvalidOperationException("Invalid COSE algorithm value."),
SecurityStampValidator.cs (1)
199throw new InvalidOperationException("RequestServices is null.");
SignInManager.cs (7)
113throw new InvalidOperationException("HttpContext must not be null."); 568?? throw new InvalidOperationException( 573throw new InvalidOperationException( 612?? throw new InvalidOperationException( 617throw new InvalidOperationException( 679throw new InvalidOperationException( 712throw new InvalidOperationException(
src\aspnetcore\src\Shared\ValueStopwatch\ValueStopwatch.cs (1)
43throw new InvalidOperationException("An uninitialized, or 'default', ValueStopwatch cannot be used to get elapsed time.");
Microsoft.AspNetCore.Identity.EntityFrameworkCore (11)
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)
733throw new InvalidOperationException(
UserStore.cs (2)
372throw new InvalidOperationException(string.Format(CultureInfo.CurrentCulture, Resources.RoleNotFound, normalizedRoleName)); 878throw new InvalidOperationException(
Microsoft.AspNetCore.Identity.UI (46)
_generated\10\Logout_cshtml.g.cs (1)
104throw new InvalidOperationException(InvalidTagHelperIndexerAssignment("asp-route-returnUrl", "Microsoft.AspNetCore.Mvc.TagHelpers.FormTagHelper", "RouteValues"));
_generated\3\ExternalLogin_cshtml.g.cs (1)
210throw new InvalidOperationException(InvalidTagHelperIndexerAssignment("asp-route-returnUrl", "Microsoft.AspNetCore.Mvc.TagHelpers.FormTagHelper", "RouteValues"));
_generated\30\Register_cshtml.g.cs (2)
343throw new InvalidOperationException(InvalidTagHelperIndexerAssignment("asp-route-returnUrl", "Microsoft.AspNetCore.Mvc.TagHelpers.FormTagHelper", "RouteValues")); 464throw new InvalidOperationException(InvalidTagHelperIndexerAssignment("asp-route-returnUrl", "Microsoft.AspNetCore.Mvc.TagHelpers.FormTagHelper", "RouteValues"));
_generated\38\_Layout_cshtml.g.cs (1)
290throw new InvalidOperationException("The default Identity UI layout requires a partial view '_LoginPartial' " +
_generated\45\ExternalLogin_cshtml.g.cs (1)
216throw new InvalidOperationException(InvalidTagHelperIndexerAssignment("asp-route-returnUrl", "Microsoft.AspNetCore.Mvc.TagHelpers.FormTagHelper", "RouteValues"));
_generated\49\Login_cshtml.g.cs (2)
372throw new InvalidOperationException(InvalidTagHelperIndexerAssignment("asp-route-returnUrl", "Microsoft.AspNetCore.Mvc.TagHelpers.AnchorTagHelper", "RouteValues")); 525throw new InvalidOperationException(InvalidTagHelperIndexerAssignment("asp-route-returnUrl", "Microsoft.AspNetCore.Mvc.TagHelpers.FormTagHelper", "RouteValues"));
_generated\50\LoginWith2fa_cshtml.g.cs (2)
281throw new InvalidOperationException(InvalidTagHelperIndexerAssignment("asp-route-returnUrl", "Microsoft.AspNetCore.Mvc.TagHelpers.FormTagHelper", "RouteValues")); 314throw new InvalidOperationException(InvalidTagHelperIndexerAssignment("asp-route-returnUrl", "Microsoft.AspNetCore.Mvc.TagHelpers.AnchorTagHelper", "RouteValues"));
_generated\52\Logout_cshtml.g.cs (1)
104throw new InvalidOperationException(InvalidTagHelperIndexerAssignment("asp-route-returnUrl", "Microsoft.AspNetCore.Mvc.TagHelpers.FormTagHelper", "RouteValues"));
_generated\7\Login_cshtml.g.cs (2)
359throw new InvalidOperationException(InvalidTagHelperIndexerAssignment("asp-route-returnUrl", "Microsoft.AspNetCore.Mvc.TagHelpers.AnchorTagHelper", "RouteValues")); 512throw new InvalidOperationException(InvalidTagHelperIndexerAssignment("asp-route-returnUrl", "Microsoft.AspNetCore.Mvc.TagHelpers.FormTagHelper", "RouteValues"));
_generated\72\Register_cshtml.g.cs (2)
353throw new InvalidOperationException(InvalidTagHelperIndexerAssignment("asp-route-returnUrl", "Microsoft.AspNetCore.Mvc.TagHelpers.FormTagHelper", "RouteValues")); 474throw new InvalidOperationException(InvalidTagHelperIndexerAssignment("asp-route-returnUrl", "Microsoft.AspNetCore.Mvc.TagHelpers.FormTagHelper", "RouteValues"));
_generated\8\LoginWith2fa_cshtml.g.cs (2)
276throw new InvalidOperationException(InvalidTagHelperIndexerAssignment("asp-route-returnUrl", "Microsoft.AspNetCore.Mvc.TagHelpers.FormTagHelper", "RouteValues")); 309throw new InvalidOperationException(InvalidTagHelperIndexerAssignment("asp-route-returnUrl", "Microsoft.AspNetCore.Mvc.TagHelpers.AnchorTagHelper", "RouteValues"));
_generated\80\_Layout_cshtml.g.cs (1)
293throw new InvalidOperationException("The default Identity UI layout requires a partial view '_LoginPartial' " +
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)
721throw 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\aspnetcore\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.ApiExplorer (3)
EndpointMetadataApiDescriptionProvider.cs (1)
218throw new InvalidOperationException($"Encountered a parameter of type '{parameter.ParameterType}' without a name. Parameters must have a name.");
src\aspnetcore\src\Shared\PropertyAsParameterInfo.cs (2)
80throw new InvalidOperationException($"Encountered a parameter of type '{parameters[i].ParameterType}' without a name. Parameters must have a name."); 102throw 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)
72throw new InvalidOperationException(message); 118throw new InvalidOperationException(Resources.FormatOutputFormatterNoMediaType(GetType().FullName)); 160throw 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)
287throw new InvalidOperationException(); 376throw 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)
906throw new InvalidOperationException(); 944throw new InvalidOperationException(message); 1346throw new InvalidOperationException(); // Unreachable. 1441throw 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)
346throw new InvalidOperationException(Resources.FormatUrlHelper_RelativePagePathIsNotSupported(
SignOutResult.cs (1)
107throw new InvalidOperationException(
src\aspnetcore\src\Shared\ChunkingCookieManager\ChunkingCookieManager.cs (1)
180throw new InvalidOperationException("The cookie key and options are larger than ChunksSize, leaving no room for data.");
src\aspnetcore\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\aspnetcore\src\Shared\ObjectMethodExecutor\ObjectMethodExecutor.cs (1)
186throw new InvalidOperationException($"Cannot call {nameof(GetDefaultValueForParameter)}, because no parameter default values were supplied.");
src\aspnetcore\src\Shared\ValueStopwatch\ValueStopwatch.cs (1)
43throw new InvalidOperationException("An uninitialized, or 'default', ValueStopwatch cannot be used to get elapsed time.");
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.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\aspnetcore\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)
51throw new InvalidOperationException(message);
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)
647throw new InvalidOperationException(); 687throw new InvalidOperationException(message);
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.Testing (14)
_generated\2\CustomJsonSerializerContext.g.cs (2)
74throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 82throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
src\44e1214b125d320f\HostFactoryResolver.cs (2)
257_hostTcs.TrySetException(new InvalidOperationException("The entry point exited without ever building an IHost.")); 296throw 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 (10)
178throw new InvalidOperationException(Resources.UseKestrelCanBeCalledBeforeInitialization); 285throw new InvalidOperationException(Resources.ConfigureWebApplicationBuilderNotSupported); 327ex = new InvalidOperationException(Resources.ConfigureWebApplicationBuilderNotSupported); 344throw new InvalidOperationException(Resources.FormatMissingBuilderMethod( 356throw new InvalidOperationException(Resources.ConfigureWebApplicationBuilderNotSupported); 568throw new InvalidOperationException(Resources.FormatInvalidAssemblyEntryPoint(typeof(TEntryPoint).Name)); 575throw new InvalidOperationException(Resources.FormatMissingDepsFile( 738throw new InvalidOperationException(Resources.ServerNotInitialized); 773throw new InvalidOperationException(Resources.ServerNotInitialized); 791throw 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)
67throw 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)
77throw 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\aspnetcore\src\Shared\PooledArrayBufferWriter.cs (1)
211throw 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.OpenApi (29)
_generated\6\OpenApiJsonSchemaContext.g.cs (2)
72throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 80throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
Extensions\JsonNodeSchemaExtensions.cs (1)
646_ => throw new InvalidOperationException($"Unknown schema type: {identifier}"),
Services\OpenApiDocumentService.cs (1)
192throw new InvalidOperationException("Cached operation transformer context not found. Please ensure that the operation contains the `x-aspnetcore-id` extension attribute.");
Services\OpenApiGenerator.cs (1)
375throw new InvalidOperationException($"Encountered a parameter of type '{parameter.ParameterType}' without a name. Parameters must have a name.");
Services\Schemas\OpenApiSchemaService.cs (10)
481throw new InvalidOperationException($"The input schema must be an {nameof(OpenApiSchema)} or {nameof(OpenApiSchemaReference)}."); 490throw new InvalidOperationException($"The input schema must be an {nameof(OpenApiSchema)} or {nameof(OpenApiSchemaReference)}."); 661throw new InvalidOperationException("Reference path cannot be null or empty."); 666throw new InvalidOperationException($"Only fragment references (starting with '{OpenApiConstants.RefPrefix}') are supported. Found: {refPath}"); 679throw new InvalidOperationException($"Failed to resolve reference '{refPath}'. Expected '{currentPath}' to start with '/'"); 744throw new InvalidOperationException($"Failed to resolve reference '{fullJsonPointer}': property '{unescapedReferenceToken}' not found."); 776throw new InvalidOperationException($"Failed to resolve reference '{fullJsonPointer}': cannot navigate an array when the current token '{unescapedReferenceToken}' isn't a valid number"); 781throw new InvalidOperationException($"Failed to resolve reference '{fullJsonPointer}': array index '{unescapedReferenceToken}' has a leading zero, which is not allowed."); 785?? throw new InvalidOperationException($"Failed to resolve reference '{fullJsonPointer}': array index '{arrayIndex}' was not found."); 788throw new InvalidOperationException($"Failed to resolve reference '{fullJsonPointer}': Unexpected JsonNode '{currentNode.GetType()}'");
src\aspnetcore\src\Shared\ObjectMethodExecutor\ObjectMethodExecutor.cs (1)
186throw new InvalidOperationException($"Cannot call {nameof(GetDefaultValueForParameter)}, because no parameter default values were supplied.");
src\aspnetcore\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\aspnetcore\src\Shared\PropertyAsParameterInfo.cs (2)
80throw new InvalidOperationException($"Encountered a parameter of type '{parameters[i].ParameterType}' without a name. Parameters must have a name."); 102throw new InvalidOperationException($"The nullable type '{TypeNameHelper.GetTypeDisplayName(parameters[i].ParameterType, fullName: false)}' is not supported.");
src\aspnetcore\src\SignalR\common\Shared\MemoryBufferWriter.cs (1)
63throw new InvalidOperationException("The reader wasn't returned!");
src\aspnetcore\src\SignalR\common\Shared\Utf8BufferTextWriter.cs (1)
57throw 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.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)
144throw new InvalidOperationException($"{nameof(OutputCacheContext.CacheVaryByRules)} must not be null on the {nameof(OutputCacheContext)}");
OutputCacheMiddleware.cs (1)
487throw 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.StackExchangeRedis (1)
RedisOutputCacheStore.cs (1)
447_ = connection ?? throw new InvalidOperationException($"{nameof(connection)} cannot be null.");
Microsoft.AspNetCore.Owin (2)
OwinEnvironment.cs (2)
77throw new InvalidOperationException("Key already present"); 333throw new InvalidOperationException("Missing feature: " + FeatureInterface.FullName); // TODO: LOC
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\aspnetcore\src\Shared\ValueStopwatch\ValueStopwatch.cs (1)
43throw 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.Razor.Utilities.Shared (6)
PooledArrayBufferWriter`1.cs (1)
139throw new InvalidOperationException(SR.FormatCannot_advance_past_end_of_the_buffer_which_has_a_size_of_0(capacity));
src\roslyn\src\Razor\src\Shared\Microsoft.AspNetCore.Razor.SharedUtilities\PooledObjects\PooledDictionaryBuilder`2.cs (1)
38throw new InvalidOperationException();
src\roslyn\src\Razor\src\Shared\Microsoft.AspNetCore.Razor.SharedUtilities\ThrowHelper.cs (2)
215=> throw new InvalidOperationException(message); 234=> throw new InvalidOperationException(message);
Threading\ReaderWriterLockSlimExtensions.cs (2)
95throw new InvalidOperationException(); 103throw new InvalidOperationException();
Microsoft.AspNetCore.RequestDecompression (2)
src\aspnetcore\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.ResponseCaching (3)
ResponseCachingKeyProvider.cs (1)
91throw new InvalidOperationException($"{nameof(CachedVaryByRules)} must not be null on the {nameof(ResponseCachingContext)}");
ResponseCachingMiddleware.cs (1)
433throw 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.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 (49)
Builder\EndpointRoutingApplicationBuilderExtensions.cs (3)
119throw new InvalidOperationException(Resources.FormatUnableToFindServices( 135throw new InvalidOperationException(message); 148throw new InvalidOperationException(message);
Builder\RoutingBuilderExtensions.cs (2)
27throw new InvalidOperationException(Resources.FormatUnableToFindServices( 50throw new InvalidOperationException(Resources.FormatUnableToFindServices(
Builder\RoutingEndpointConventionBuilderExtensions.cs (1)
160throw 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)
105throw new InvalidOperationException($"Endpoint {endpoint.DisplayName} contains authorization metadata, " + 113throw new InvalidOperationException($"Endpoint {endpoint.DisplayName} contains CORS metadata, " + 121throw new InvalidOperationException($"Endpoint {endpoint.DisplayName} contains anti-forgery metadata, " +
EndpointNameAddressScheme.cs (1)
92throw new InvalidOperationException(builder.ToString());
EndpointRoutingMiddleware.cs (4)
60throw new InvalidOperationException($"The '{MiddlewareInvokedKeys.PostRoutingPipeline}' application property is reserved for the framework and cannot be set by application code."); 325throw new InvalidOperationException($"Endpoint {endpoint.DisplayName} contains authorization metadata, " + 331throw new InvalidOperationException($"Endpoint {endpoint.DisplayName} contains CORS metadata, " + 337throw 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)
191throw 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)
392throw 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\aspnetcore\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.Server.HttpSys (44)
AuthenticationHandler.cs (1)
43throw new InvalidOperationException("No RequestContext found.");
RequestProcessing\RequestContext.cs (7)
95throw new InvalidOperationException("Upgrade requires HTTP/1.1."); 97throw new InvalidOperationException("This request cannot be upgraded because it has a body."); 101throw new InvalidOperationException("This request cannot be upgraded, the response has already started."); 275throw new InvalidOperationException("Windows HTTP Server API does not support HTTP_FEATURE_ID.HttpFeatureCacheTlsClientHello or HttpQueryRequestProperty. See HTTP_FEATURE_ID for details."); 329throw new InvalidOperationException("Windows HTTP Server API does not support HttpQueryRequestProperty."); 442throw new InvalidOperationException("This request cannot be delegated, the request body has already started."); 446throw new InvalidOperationException("This request cannot be delegated, the response has already started.");
RequestProcessing\RequestContext.FeatureCollection.cs (2)
495throw new InvalidOperationException("Cannot register new callbacks, the response has already started."); 506throw 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."); 293throw new InvalidOperationException(Resources.Exception_ReadOnlyStream); 298throw new InvalidOperationException(Resources.Exception_ReadOnlyStream); 303throw new InvalidOperationException(Resources.Exception_ReadOnlyStream);
RequestProcessing\Response.cs (2)
248throw new InvalidOperationException("Headers already sent."); 254throw new InvalidOperationException(Resources.FormatException_InvalidReasonPhraseCharacter(
RequestProcessing\ResponseBody.cs (7)
95throw new InvalidOperationException("Synchronous IO APIs are disabled, see AllowSynchronousIO."); 427throw new InvalidOperationException(Resources.Exception_WriteOnlyStream); 432throw new InvalidOperationException(Resources.Exception_WriteOnlyStream); 437throw new InvalidOperationException(Resources.Exception_WriteOnlyStream); 523throw new InvalidOperationException("Synchronous IO APIs are disabled, see AllowSynchronousIO."); 552throw new InvalidOperationException("More bytes written than specified in the Content-Length header."); 558throw new InvalidOperationException("More bytes written than specified in the Content-Length header.");
src\aspnetcore\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\aspnetcore\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\aspnetcore\src\Shared\HttpSys\RequestProcessing\HeaderEncoding.cs (1)
25throw new InvalidOperationException();
src\aspnetcore\src\Shared\HttpSys\RequestProcessing\RawUrlHelper.cs (1)
50throw new InvalidOperationException("Invalid URI format");
src\aspnetcore\src\Shared\HttpSys\RequestProcessing\RequestHeaders.cs (1)
259throw new InvalidOperationException("The response headers cannot be modified because the response has already started.");
src\aspnetcore\src\Shared\HttpSys\RequestProcessing\RequestUriBuilder.cs (1)
115throw new InvalidOperationException("The path contains null characters.");
src\aspnetcore\src\Shared\ServerInfrastructure\StringUtilities.cs (2)
46throw new InvalidOperationException(); 60throw new InvalidOperationException();
StandardFeatureCollection.cs (1)
82throw new InvalidOperationException("The collection is read-only");
UrlPrefixCollection.cs (1)
198throw new InvalidOperationException("Cannot bind to port 0 with https.");
Microsoft.AspNetCore.Server.IIS (41)
Core\EmptyStream.cs (1)
34throw new InvalidOperationException(CoreStrings.SynchronousReadsDisallowed);
Core\HttpRequestStream.cs (1)
28throw new InvalidOperationException(CoreStrings.SynchronousReadsDisallowed);
Core\HttpResponseStream.cs (1)
37throw new InvalidOperationException(CoreStrings.SynchronousWritesDisallowed);
Core\IISHttpContext.cs (3)
732throw new InvalidOperationException("Response already started"); 894throw new InvalidOperationException(CoreStrings.FormatParameterReadOnlyAfterResponseStarted(name)); 899throw new InvalidOperationException(CoreStrings.FormatInvalidReasonPhraseCharacter(
Core\IISHttpContext.FeatureCollection.cs (6)
346throw new InvalidOperationException(CoreStrings.UpgradeWithWrongProtocolVersion); 348throw new InvalidOperationException(CoreStrings.CannotUpgradeNonUpgradableRequest); 353throw new InvalidOperationException(CoreStrings.UpgradeCannotBeCalledMultipleTimes); 357throw new InvalidOperationException(CoreStrings.UpgradeCannotBeCalledMultipleTimes); 449throw new InvalidOperationException(CoreStrings.MaxRequestBodySizeCannotBeModifiedAfterRead); 453throw new InvalidOperationException(CoreStrings.MaxRequestBodySizeCannotBeModifiedForUpgradedRequests);
Core\IISHttpContext.Features.cs (1)
340throw 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\aspnetcore\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\aspnetcore\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\aspnetcore\src\Shared\HttpSys\RequestProcessing\HeaderEncoding.cs (1)
25throw new InvalidOperationException();
src\aspnetcore\src\Shared\HttpSys\RequestProcessing\RawUrlHelper.cs (1)
50throw new InvalidOperationException("Invalid URI format");
src\aspnetcore\src\Shared\HttpSys\RequestProcessing\RequestHeaders.cs (1)
259throw new InvalidOperationException("The response headers cannot be modified because the response has already started.");
src\aspnetcore\src\Shared\HttpSys\RequestProcessing\RequestUriBuilder.cs (1)
115throw new InvalidOperationException("The path contains null characters.");
src\aspnetcore\src\Shared\ServerInfrastructure\BufferExtensions.cs (1)
61throw new InvalidOperationException("Buffer backed by array was expected");
src\aspnetcore\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.Kestrel.Core (114)
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)
36throw new InvalidOperationException(CoreStrings.FormatMultipleCertificateSources(endpointName)); 72throw new InvalidOperationException(CoreStrings.InvalidPemKey); 254throw new InvalidOperationException(string.Format(CultureInfo.InvariantCulture, CoreStrings.UnrecognizedCertificateKeyOid, certificate.PublicKey.Oid.Value)); 260return 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)
209throw new InvalidOperationException("No reading operation to complete."); 282throw new InvalidOperationException("Reading is already in progress.");
Internal\Http\Http1MessageBody.cs (1)
239throw 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 (8)
286throw new InvalidOperationException(CoreStrings.FormatInvalidAsciiOrControlChar( 910return new InvalidOperationException( 949ex = new InvalidOperationException( 1341throw new InvalidOperationException(CoreStrings.FormatParameterReadOnlyAfterResponseStarted(value)); 1352var ex = new InvalidOperationException(message); 1415throw new InvalidOperationException(CoreStrings.FormatWritingToResponseBodyNotSupported(StatusCode)); 1505throw new InvalidOperationException("Invalid ordering of calling StartAsync or CompleteAsync and Advance."); 1754throw 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)
896throw 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)
1328throw new InvalidOperationException(CoreStrings.AcceptCannotBeCalledMultipleTimes); 1333throw new InvalidOperationException(CoreStrings.WebTransportIsDisabled); 1338throw 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)
510_ => 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)
462throw new InvalidOperationException($"{nameof(ApplicationServices)} must not be null. This is normally set automatically via {nameof(IConfigureOptions<KestrelServerOptions>)}.");
ListenOptionsHttpsExtensions.cs (1)
183throw new InvalidOperationException(CoreStrings.NoCertSpecifiedNoDevelopmentCertificateFound);
LocalhostListenOptions.cs (1)
25throw new InvalidOperationException(CoreStrings.DynamicPortOnLocalhostNotSupported);
Middleware\HttpsConnectionMiddleware.cs (1)
503throw new InvalidOperationException(CoreStrings.FormatInvalidServerCertificateEku(certificate.Thumbprint));
src\aspnetcore\src\Servers\Kestrel\shared\Http2HeadersEnumerator.cs (1)
132throw new InvalidOperationException("Unexpected headers collection type.");
src\aspnetcore\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\aspnetcore\src\Shared\Buffers\RefPooledArrayBufferWriter.cs (1)
107throw new InvalidOperationException($"Cannot advance past the end of the buffer. Current position: {_index}, Capacity: {_buffer.Length}, Requested advance: {count}.");
src\aspnetcore\src\Shared\CertificateGeneration\CertificateManager.cs (5)
447throw new InvalidOperationException($"The directory '{exportDir}' does not exist. Choose permissions carefully when creating it."); 715throw new InvalidOperationException("Unknown format."); 914throw new InvalidOperationException($"'{nameof(RemoveLocations.Undefined)}' is not a valid location."); 926throw new InvalidOperationException("Invalid location."); 982throw new InvalidOperationException($"Failed to create a key with a size of {minimumKeySize} bits");
src\aspnetcore\src\Shared\CertificateGeneration\MacOSCertificateManager.cs (4)
110throw new InvalidOperationException("There was an error trusting the certificate."); 262throw new InvalidOperationException($@"There was an error removing the certificate with thumbprint '{certificate.Thumbprint}'. 278throw new InvalidOperationException($"Can't determine the subject for the certificate with subject '{certificate.Subject}'."); 360throw new InvalidOperationException("Failed to add the certificate to the keychain. Are you running in a non-interactive session perhaps?");
src\aspnetcore\src\Shared\CertificateGeneration\UnixCertificateManager.cs (1)
532throw new InvalidOperationException($@"There was an error removing the certificate with thumbprint '{certificate.Thumbprint}'.");
src\aspnetcore\src\Shared\ServerInfrastructure\BufferExtensions.cs (1)
61throw new InvalidOperationException("Buffer backed by array was expected");
src\aspnetcore\src\Shared\ServerInfrastructure\StringUtilities.cs (2)
46throw new InvalidOperationException(); 60throw new InvalidOperationException();
src\aspnetcore\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.Transport.DirectTls (11)
Connection\DirectTlsConnectionListener.cs (1)
96throw new InvalidOperationException("Transport already bound");
ConnectionIoState.cs (4)
236throw new InvalidOperationException("Handshake not complete"); 241throw new InvalidOperationException("Read already pending"); 363throw new InvalidOperationException("Handshake not complete"); 368throw new InvalidOperationException("Write already pending");
DirectTlsTransportFactory.cs (1)
75throw new InvalidOperationException(
TlsAwaitable.cs (1)
64throw new InvalidOperationException("TlsAwaitable is already active");
TlsEventPump.cs (3)
155throw new InvalidOperationException($"epoll_create1 failed: {Marshal.GetLastWin32Error()}"); 215throw new InvalidOperationException($"Failed to add listen socket to epoll: errno={errno}"); 383_onFatalError.Invoke(new InvalidOperationException($"The DirectTls event pump {_id} failed: epoll_wait returned errno={errno}."));
WebHostBuilderDirectTlsExtensions.cs (1)
108throw new InvalidOperationException(error);
Microsoft.AspNetCore.Server.Kestrel.Transport.NamedPipes (9)
Internal\NamedPipeConnectionListener.cs (1)
123throw new InvalidOperationException("Accept queue writer was unexpectedly closed.");
src\aspnetcore\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)
258throw 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\aspnetcore\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\aspnetcore\src\Shared\ServerInfrastructure\StringUtilities.cs (2)
46throw new InvalidOperationException(); 60throw new InvalidOperationException();
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.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 (21)
HubConnection.cs (13)
310throw new InvalidOperationException($"The {nameof(HubConnection)} cannot be started if it is not in the {nameof(HubConnectionState.Disconnected)} state."); 317throw new InvalidOperationException($"The {nameof(HubConnection)} cannot be started while {nameof(StopAsync)} is running."); 608throw new InvalidOperationException("Cannot refresh authentication when the connection is not active."); 620throw new InvalidOperationException("Authentication refresh is only supported with HTTP-based connections."); 1130throw new InvalidOperationException($"{reader.GetType()} is not a {typeof(ChannelReader<>).Name}."); 1676throw new InvalidOperationException($"Unexpected message type: {message.GetType().FullName}"); 1863throw new InvalidOperationException( 2309throw new InvalidOperationException($"Assertion failed in {memberName}, at {fileName}:{lineNumber}: {message}"); 2370throw new InvalidOperationException($"'{methodName}' already has a value returning handler. Multiple return values are not supported."); 2478throw new InvalidOperationException($"Invocation ID '{irq.InvocationId}' is already in use."); 2734throw new InvalidOperationException($"There are no callbacks registered for the method '{methodName}'"); 2765throw new InvalidOperationException($"The HubConnection failed to transition from the '{expectedState}' state to the '{newState}' state because it was actually in the '{OverallState}' state."); 2817throw 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)
110_channel.Writer.TryComplete(new InvalidOperationException("Server provided a result in a completion response to a streamed invocation.")); 220_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\aspnetcore\src\SignalR\common\Shared\MessageBuffer.cs (1)
226throw new InvalidOperationException("Sequence ID greater than amount of messages we've received.");
src\aspnetcore\src\SignalR\common\Shared\ReflectionHelper.cs (1)
93throw new InvalidOperationException($"Type '{type}' does not implement IAsyncEnumerator<>");
Microsoft.AspNetCore.SignalR.Common (4)
src\aspnetcore\src\SignalR\common\Shared\MemoryBufferWriter.cs (1)
63throw new InvalidOperationException("The reader wasn't returned!");
src\aspnetcore\src\SignalR\common\Shared\ReusableUtf8JsonWriter.cs (1)
46throw new InvalidOperationException("The writer wasn't returned!");
src\aspnetcore\src\SignalR\common\Shared\Utf8BufferTextReader.cs (1)
42throw new InvalidOperationException("The reader wasn't returned!");
src\aspnetcore\src\SignalR\common\Shared\Utf8BufferTextWriter.cs (1)
57throw new InvalidOperationException("The writer wasn't returned!");
Microsoft.AspNetCore.SignalR.Core (22)
DefaultHubLifetimeManager.cs (1)
235throw new InvalidOperationException("Cannot send to an empty group name.");
HubConnectionHandler.cs (1)
121throw 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( 306throw 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\aspnetcore\src\Shared\ObjectMethodExecutor\ObjectMethodExecutor.cs (1)
186throw new InvalidOperationException($"Cannot call {nameof(GetDefaultValueForParameter)}, because no parameter default values were supplied.");
src\aspnetcore\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\aspnetcore\src\SignalR\common\Shared\MessageBuffer.cs (1)
226throw new InvalidOperationException("Sequence ID greater than amount of messages we've received.");
src\aspnetcore\src\SignalR\common\Shared\ReflectionHelper.cs (1)
93throw new InvalidOperationException($"Type '{type}' does not implement IAsyncEnumerator<>");
Microsoft.AspNetCore.SignalR.Protocols.Json (4)
Protocol\JsonHubProtocol.cs (1)
567throw new InvalidOperationException($"Unsupported message type: {message.GetType().FullName}");
src\aspnetcore\src\SignalR\common\Shared\ReusableUtf8JsonWriter.cs (1)
46throw new InvalidOperationException("The writer wasn't returned!");
src\aspnetcore\src\SignalR\common\Shared\Utf8BufferTextReader.cs (1)
42throw new InvalidOperationException("The reader wasn't returned!");
src\aspnetcore\src\SignalR\common\Shared\Utf8BufferTextWriter.cs (1)
57throw new InvalidOperationException("The writer wasn't returned!");
Microsoft.AspNetCore.SignalR.Protocols.MessagePack (1)
src\aspnetcore\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\aspnetcore\src\SignalR\common\Shared\MemoryBufferWriter.cs (1)
63throw new InvalidOperationException("The reader wasn't returned!");
src\aspnetcore\src\SignalR\common\Shared\Utf8BufferTextReader.cs (1)
42throw new InvalidOperationException("The reader wasn't returned!");
src\aspnetcore\src\SignalR\common\Shared\Utf8BufferTextWriter.cs (1)
57throw new InvalidOperationException("The writer wasn't returned!");
Microsoft.AspNetCore.SignalR.Specification.Tests (3)
src\aspnetcore\src\SignalR\common\Shared\MemoryBufferWriter.cs (1)
63throw new InvalidOperationException("The reader wasn't returned!");
src\aspnetcore\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\aspnetcore\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\aspnetcore\src\SignalR\common\Shared\MemoryBufferWriter.cs (1)
63throw new InvalidOperationException("The reader wasn't returned!");
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 (16)
_generated\12\StaticAssetsManifestJsonContext.g.cs (2)
72throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 80throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
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.");
StaticAssetDescriptor.cs (8)
30set => _order = !_isFrozen ? value : throw new InvalidOperationException("StaticAssetDescriptor is frozen and doesn't accept further changes"); 38get => _route ?? throw new InvalidOperationException("Route is required"); 39set => _route = !_isFrozen ? value : throw new InvalidOperationException("StaticAssetDescriptor is frozen and doesn't accept further changes"); 48get => _assetFile ?? throw new InvalidOperationException("AssetPath is required"); 49set => _assetFile = !_isFrozen ? value : throw new InvalidOperationException("StaticAssetDescriptor is frozen and doesn't accept further changes"); 59set => _selectors = !_isFrozen ? value : throw new InvalidOperationException("StaticAssetDescriptor is frozen and doesn't accept further changes"); 69set => _endpointProperties = !_isFrozen ? value : throw new InvalidOperationException("StaticAssetDescriptor is frozen and doesn't accept further changes"); 79set => _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)
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();
src\44e1214b125d320f\HostFactoryResolver.cs (2)
257_hostTcs.TrySetException(new InvalidOperationException("The entry point exited without ever building an IHost.")); 296throw 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.");
TestServer.cs (2)
123?? throw new InvalidOperationException("The TestServer constructor was not called with a IWebHostBuilder so IWebHost is not available."); 149get => _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)
208throw 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.Testing (3)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (2)
398=> throw new InvalidOperationException(message); 410=> throw new InvalidOperationException(message, innerException);
ServiceFakesHostExtensions.cs (1)
41?? throw new InvalidOperationException("No suitable address found to call the server.");
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.WebUtilities (3)
FormPipeReader.cs (1)
119throw new InvalidOperationException("End of body before form was fully parsed.");
src\aspnetcore\src\Shared\UrlDecoder\UrlDecoder.cs (2)
108throw new InvalidOperationException("The path contains null characters."); 446throw new InvalidOperationException("The path contains null characters.");
Microsoft.Build (44)
_generated\7\TasksDetailsJsonContext.g.cs (2)
75throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 83throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
BackEnd\Client\MSBuildClient.cs (2)
736throw new InvalidOperationException($"Unexpected packet type {packet.GetType().Name}"); 751throw new InvalidOperationException($"Unexpected console output type {consoleWrite.OutputType}");
BackEnd\Components\ProjectCache\ProjectCacheService.cs (1)
421throw new InvalidOperationException($"Plugin type '{pluginType}' does not derive from a supported plugin base class.");
BackEnd\Components\Scheduler\Scheduler.cs (1)
1844new InvalidOperationException(
BackEnd\Node\OutOfProcServerNode.cs (2)
138shutdownException = new InvalidOperationException("MSBuild server is already running!"); 412_shutdownException = new InvalidOperationException("Client requested build while server is busy processing previous client build request.");
BackEnd\Shared\WorkUnitResult.cs (1)
126throw new InvalidOperationException("Readonly struct - use the factory method for deserialization.");
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)
347throw new InvalidOperationException("Cannot do a constrained lookup on this collection."); 596throw new InvalidOperationException(); 971throw new InvalidOperationException(); 1003throw new InvalidOperationException(); 1013throw new InvalidOperationException();
Construction\ProjectElementContainer.cs (2)
908throw new InvalidOperationException(); 1020throw new InvalidOperationException();
Evaluation\LazyItemEvaluator.IncludeOperation.cs (1)
147throw new InvalidOperationException(fragment.GetType().ToString());
Evaluation\Profiler\EvaluationProfiler.cs (1)
135throw new InvalidOperationException("Evaluation frame disposed out of order");
Graph\GraphBuilder.cs (2)
581throw new InvalidOperationException(ResourceUtilities.GetResourceString("NullReferenceFromProjectInstanceFactory")); 625throw 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)
110throw new InvalidOperationException(
Instance\TaskRegistry.cs (1)
1546throw new InvalidOperationException(AssemblyResources.GetString("TaskFactoryTaskTypeIsNotSet"));
Logging\BinaryLogger\BinaryLogReplayEventSource.cs (2)
70public int FileFormatVersion => _fileFormatVersion ?? throw new InvalidOperationException(ResourceUtilities.GetResourceString("Binlog_Source_VersionUninitialized")); 71public 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)
113throw new InvalidOperationException(); 123throw new InvalidOperationException();
src\5057ed6cf5d6323b\ImmutableSegmentedDictionary`2+ValueBuilder.cs (1)
102throw new InvalidOperationException($"Unexpected concurrent access to {GetType()}");
src\5057ed6cf5d6323b\ImmutableSegmentedHashSet`1+ValueBuilder.cs (1)
68throw new InvalidOperationException($"Unexpected concurrent access to {GetType()}");
src\5057ed6cf5d6323b\ImmutableSegmentedList`1+ValueBuilder.cs (1)
78throw new InvalidOperationException($"Unexpected concurrent access to {GetType()}");
src\8b3a4ac2431f87ea\SpecializedCollections.Empty.Enumerator.cs (2)
24public object? Current => throw new InvalidOperationException(); 33throw new InvalidOperationException();
src\8b3a4ac2431f87ea\SpecializedCollections.Empty.Enumerator`1.cs (1)
24public new T Current => throw new InvalidOperationException();
src\msbuild\artifacts\.packages\microsoft.codeanalysis.collections\5.0.0-1.25277.114\contentFiles\cs\net9.0\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\msbuild\src\Shared\ErrorUtilities.cs (1)
57throw new InvalidOperationException(ResourceUtilities.FormatResourceStringStripCodeAndKeyword(resourceName, args));
Microsoft.Build.Framework (29)
BackEnd\InterningBinaryReader.cs (1)
60throw new InvalidOperationException();
BinaryTranslator.cs (2)
825throw new InvalidOperationException("Cannot enter recursive intern block."); 1680throw new InvalidOperationException("Cannot enter recursive intern block.");
BuildCheck\BuildCheckRuleTelemetryData.cs (1)
52throw new InvalidOperationException("Cannot merge telemetry data for different rules.");
Collections\ReadOnlyCollection.cs (3)
100throw new InvalidOperationException(SR.CollectionIsReadOnly); 108throw new InvalidOperationException(SR.CollectionIsReadOnly); 154throw new InvalidOperationException(SR.CollectionIsReadOnly);
Collections\ReadOnlyEmptyCollection.cs (3)
86throw new InvalidOperationException(SR.CollectionIsReadOnly); 94throw new InvalidOperationException(SR.CollectionIsReadOnly); 117throw new InvalidOperationException(SR.CollectionIsReadOnly);
Collections\ReadOnlyEmptyDictionary.cs (6)
165throw new InvalidOperationException(SR.CollectionIsReadOnly); 174throw new InvalidOperationException(SR.CollectionIsReadOnly); 190throw new InvalidOperationException(SR.CollectionIsReadOnly); 207throw new InvalidOperationException(SR.CollectionIsReadOnly); 215throw new InvalidOperationException(SR.CollectionIsReadOnly); 238throw new InvalidOperationException(SR.CollectionIsReadOnly);
Collections\RefArrayBuilder.cs (1)
856=> throw new InvalidOperationException(message);
InterningReadTranslator.cs (1)
29throw new InvalidOperationException(
InterningWriteTranslator.cs (1)
160throw new InvalidOperationException(
ItemSpecModifiers.cs (1)
474throw new InvalidOperationException(SR.FormatInvalidFilespecForTransform(modifier, itemSpec, e.Message));
LazyFormattedBuildEventArgs.cs (1)
196throw new InvalidOperationException($"Invalid type for message formatting argument, was {param.GetType().FullName}");
src\msbuild\artifacts\.packages\microsoft.codeanalysis.contracts\5.0.0-1.25277.114\contentFiles\cs\net9.0\Contract.cs (1)
161throw new InvalidOperationException($"{message} - file {fileName} line {lineNumber}");
src\msbuild\artifacts\.packages\microsoft.codeanalysis.contracts\5.0.0-1.25277.114\contentFiles\cs\net9.0\ExceptionUtilities.cs (2)
27return new InvalidOperationException(output); 31=> new InvalidOperationException($"This program location is thought to be unreachable. File='{path}' Line={line}");
TaskItemData.cs (4)
57=> throw new InvalidOperationException($"{nameof(TaskItemData)} does not support write operations"); 75throw new InvalidOperationException($"{nameof(TaskItemData)} does not support write operations"); 86throw new InvalidOperationException($"{nameof(TaskItemData)} does not support write operations"); 91throw new InvalidOperationException($"{nameof(TaskItemData)} does not support write operations");
Utilities\FrameworkLocationHelper.cs (1)
1048throw new InvalidOperationException(SR.FormatCouldNotGenerateReferenceAssemblyDirectory(targetFrameworkRootPath, frameworkName.ToString(), e.Message));
Microsoft.Build.NuGetSdkResolver (3)
src\nuget-client\build\Shared\SharedExtensions.cs (3)
140throw new InvalidOperationException(); 149throw new InvalidOperationException(); 166throw new InvalidOperationException();
Microsoft.Build.Tasks.CodeAnalysis (11)
src\roslyn\src\Compilers\Core\MSBuildTask\Csc.cs (1)
260throw new InvalidOperationException(string.Format(ErrorString.General_IncorrectHostObject, "Csc", "ICscHostObject"));
src\roslyn\src\Compilers\Core\MSBuildTask\ManagedToolTask.cs (1)
315throw new InvalidOperationException("Unable to determine the location of the build task assembly.");
src\roslyn\src\Compilers\Core\MSBuildTask\Vbc.cs (1)
557throw new InvalidOperationException(string.Format(ErrorString.General_IncorrectHostObject, "Vbc", "IVbcHostObject"));
src\roslyn\src\Compilers\Shared\BuildProtocol.cs (1)
356throw new InvalidOperationException("Received invalid response type from server.");
src\roslyn\src\Compilers\Shared\BuildServerConnection.cs (3)
823throw new InvalidOperationException("Unable to acquire guard"); 892throw new InvalidOperationException("Lock already held"); 1004throw new InvalidOperationException("Lock already held");
src\roslyn\src\Compilers\Shared\ConsoleUtil.cs (1)
47throw new InvalidOperationException("Utf8Output is only supported when writing to Console.Out");
src\roslyn\src\Dependencies\Contracts\Contract.cs (1)
161throw new InvalidOperationException($"{message} - file {fileName} line {lineNumber}");
src\roslyn\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.Core (8)
AssemblyDependency\Node\OutOfProcRarNode.cs (1)
52shutdownException = new InvalidOperationException("RAR node is already running.", ex);
BootstrapperUtil\Product.cs (1)
35throw new InvalidOperationException();
GenerateResource.cs (1)
3549_ => throw new InvalidOperationException($"Unknown SkipReason {skipped.Reason}"),
ManifestUtil\Manifest.cs (3)
405throw new InvalidOperationException(String.Format(System.Globalization.CultureInfo.InvariantCulture, "XPath not found: {0}", XPaths.codebasePaths[0])); 414throw new InvalidOperationException(String.Format(System.Globalization.CultureInfo.InvariantCulture, "XPath not found: {0}", XPaths.dependencyPublicKeyTokenAttribute)); 433throw new InvalidOperationException(String.Format(System.Globalization.CultureInfo.InvariantCulture, "XPath not found: {0}", XPaths.fileSizeAttribute));
ManifestUtil\SecurityUtil.cs (1)
691throw new InvalidOperationException(resources.GetString("SignFile.CertNotInStore"));
src\msbuild\src\Shared\ErrorUtilities.cs (1)
57throw new InvalidOperationException(ResourceUtilities.FormatResourceStringStripCodeAndKeyword(resourceName, args));
Microsoft.Build.Tasks.Git (4)
GitDataReader\GitReferenceResolver.cs (2)
313_ => throw new InvalidOperationException(), 321_ => throw new InvalidOperationException()
GitDataReader\GitRepository.cs (1)
198=> WorkingDirectory ?? throw new InvalidOperationException(Resources.RepositoryDoesNotHaveWorkingDirectory);
GitDataReader\ObjectNameFormat.cs (1)
28_ => throw new InvalidOperationException()
Microsoft.Build.Utilities.Core (6)
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.");
src\msbuild\src\Shared\ErrorUtilities.cs (1)
57throw new InvalidOperationException(ResourceUtilities.FormatResourceStringStripCodeAndKeyword(resourceName, args));
Microsoft.CodeAnalysis (85)
CodeGen\PrivateImplementationDetails.cs (1)
158throw new InvalidOperationException();
Collections\SmallDictionary.cs (2)
193throw new InvalidOperationException(); 460throw new InvalidOperationException();
Compilation\Compilation.cs (1)
276throw 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)
239throw new InvalidOperationException($"Unable to load {assemblyName.Name}: {ex.Message}", ex);
DiagnosticAnalyzer\AnalyzerDriver.cs (1)
1755throw 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)
1697public Compilation Compilation => _semanticModel?.Compilation ?? throw new InvalidOperationException();
DiagnosticAnalyzer\DiagnosticQueue.cs (1)
106throw new InvalidOperationException();
DiagnosticAnalyzer\ShadowCopyAnalyzerPathResolver.cs (1)
105throw new InvalidOperationException("ShadowCopyAnalyzerPathResolver is only supported on Windows.");
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)
242throw new InvalidOperationException(); 309throw new InvalidOperationException(); 365throw 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)
216throw new InvalidOperationException(string.Format(CodeAnalysisResources.Single_type_per_generator_0, typeName ?? typeof(T).Name));
SourceGeneration\Nodes\SharedInputNodes.cs (1)
39throw new UserFunctionException(new InvalidOperationException(
SourceGeneration\Nodes\SyntaxInputNode.cs (1)
38throw new UserFunctionException(new InvalidOperationException(
src\roslyn\src\Dependencies\CodeAnalysis.Debugging\CustomDebugInfoReader.cs (13)
77throw new InvalidOperationException("Invalid header."); 93throw new InvalidOperationException("Invalid header."); 111throw new InvalidOperationException("Invalid header."); 365throw new InvalidOperationException(string.Format("Expected at most one Using record for method {0}", FormatMethodToken(methodToken))); 374throw new InvalidOperationException(string.Format("Did not expect both Forward and ForwardToModule records for method {0}", FormatMethodToken(methodToken))); 392throw new InvalidOperationException(string.Format("Expected at most one ForwardToModule record for method {0}", FormatMethodToken(methodToken))); 434throw new InvalidOperationException(string.Format("Group size indicates more imports than there are import strings (method {0}).", FormatMethodToken(methodToken))); 440throw new InvalidOperationException(string.Format("Encountered extern alias info before all import strings were consumed (method {0}).", FormatMethodToken(methodToken))); 460throw new InvalidOperationException(string.Format("Expected only extern alias info strings after consuming the indicated number of imports (method {0}).", FormatMethodToken(methodToken))); 474throw new InvalidOperationException(string.Format("Group size indicates fewer imports than there are import strings (method {0}).", FormatMethodToken(methodToken))); 525throw new InvalidOperationException("Read out of buffer."); 537throw new InvalidOperationException("Read out of buffer."); 549throw new InvalidOperationException("Read out of buffer.");
src\roslyn\src\Dependencies\Collections\Extensions\FixedSizeArrayBuilder.cs (1)
61throw new InvalidOperationException($"Unexpected true - file {fileName} line {lineNumber}");
src\roslyn\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\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (1)
102throw new InvalidOperationException($"Unexpected concurrent access to {GetType()}");
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+ValueBuilder.cs (1)
68throw new InvalidOperationException($"Unexpected concurrent access to {GetType()}");
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+ValueBuilder.cs (1)
78throw new InvalidOperationException($"Unexpected concurrent access to {GetType()}");
src\roslyn\src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Enumerator.cs (2)
24public object? Current => throw new InvalidOperationException(); 33throw new InvalidOperationException();
src\roslyn\src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Enumerator`1.cs (1)
24public new T Current => throw new InvalidOperationException();
src\roslyn\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)
377throw new InvalidOperationException(); 392throw 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)
185throw new InvalidOperationException();
Text\TextChangeRangeExtensions.cs (1)
323throw new InvalidOperationException();
Microsoft.CodeAnalysis.Analyzers (53)
MetaAnalyzers\Fixers\CompareSymbolsCorrectlyFix.cs (1)
235throw new InvalidOperationException("Invocation contains conditional expression but we could not detect the parts.");
MetaAnalyzers\Fixers\DefineDiagnosticDescriptorArgumentsCorrectlyFix.cs (1)
63_ => throw new InvalidOperationException()
src\roslyn\src\Compilers\Core\Portable\Collections\SmallDictionary.cs (2)
193throw new InvalidOperationException(); 460throw new InvalidOperationException();
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\ReaderWriterLockSlimExtensions.cs (2)
93throw new InvalidOperationException(); 101throw new InvalidOperationException();
src\roslyn\src\Compilers\Core\Portable\Text\TextChangeRangeExtensions.cs (1)
323throw new InvalidOperationException();
src\roslyn\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\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (1)
102throw new InvalidOperationException($"Unexpected concurrent access to {GetType()}");
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+ValueBuilder.cs (1)
68throw new InvalidOperationException($"Unexpected concurrent access to {GetType()}");
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+ValueBuilder.cs (1)
78throw new InvalidOperationException($"Unexpected concurrent access to {GetType()}");
src\roslyn\src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Enumerator.cs (2)
24public object? Current => throw new InvalidOperationException(); 33throw new InvalidOperationException();
src\roslyn\src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Enumerator`1.cs (1)
24public new T Current => throw new InvalidOperationException();
src\roslyn\src\Dependencies\Contracts\Contract.cs (1)
161throw new InvalidOperationException($"{message} - file {fileName} line {lineNumber}");
src\roslyn\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\roslyn\src\Dependencies\Threading\ParallelExtensions.NetFramework.cs (2)
592Enumerator = source.GetEnumerator() ?? throw new InvalidOperationException(); 618Enumerator = source.GetAsyncEnumerator(Cancellation.Token) ?? throw new InvalidOperationException();
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Extensions\IOperationExtensions.cs (1)
520throw new InvalidOperationException();
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\SmallDictionary.cs (2)
306throw new InvalidOperationException(); 573throw new InvalidOperationException();
src\roslyn\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\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (1)
24=> node.Parent ?? throw new InvalidOperationException("Node's parent was null");
src\roslyn\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\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser.cs (1)
89trimmedDictionary[key.Trim()] = allRawConventions.TryGetValue(key, out var value) ? value : throw new InvalidOperationException();
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\NamingStyle.cs (2)
83throw new InvalidOperationException(); 170default: throw new InvalidOperationException();
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (1)
482throw new InvalidOperationException();
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Serialization\ObjectWriter.cs (1)
286throw new InvalidOperationException($"Unsupported object type: {value.GetType()}");
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\BKTree.Builder.cs (1)
201throw new InvalidOperationException();
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\StringEscapeEncoder.cs (1)
138throw new InvalidOperationException();
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\TaskExtensions.cs (1)
36throw new InvalidOperationException($"{nameof(WaitAndGetResult)} cannot be called from a thread pool thread.");
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationConstructedMethodSymbol.cs (1)
85=> throw new System.InvalidOperationException();
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationMethodSymbol.cs (1)
110=> throw new InvalidOperationException();
src\roslyn\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\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\ISolutionExtensions.cs (3)
37=> solution.GetDocument(syntaxTree) ?? throw new InvalidOperationException(); 44throw new InvalidOperationException(string.Format(WorkspaceExtensionsResources.Project_of_ID_0_is_required_to_accomplish_the_task_but_is_not_available_from_the_solution, projectId)); 128=> new InvalidOperationException(string.Format(WorkspaceExtensionsResources.The_solution_does_not_contain_the_specified_document, debugName ?? "Unknown"));
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\ProjectExtensions.cs (1)
99throw new InvalidOperationException(string.Format(WorkspaceExtensionsResources.Compilation_is_required_to_accomplish_the_task_but_is_not_supported_by_project_0, project.Name));
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\AddImports\AbstractAddImportsService.cs (1)
123throw new InvalidOperationException();
Microsoft.CodeAnalysis.AnalyzerUtilities (44)
src\a172c07bebba4cd8\DisposeAnalysis.DisposeDataFlowOperationVisitor.cs (1)
53throw new InvalidOperationException();
src\roslyn\src\Compilers\Core\Portable\Collections\SmallDictionary.cs (2)
193throw new InvalidOperationException(); 460throw new InvalidOperationException();
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\ReaderWriterLockSlimExtensions.cs (2)
93throw new InvalidOperationException(); 101throw new InvalidOperationException();
src\roslyn\src\Compilers\Core\Portable\Text\TextChangeRangeExtensions.cs (1)
323throw new InvalidOperationException();
src\roslyn\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\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (1)
102throw new InvalidOperationException($"Unexpected concurrent access to {GetType()}");
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+ValueBuilder.cs (1)
68throw new InvalidOperationException($"Unexpected concurrent access to {GetType()}");
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+ValueBuilder.cs (1)
78throw new InvalidOperationException($"Unexpected concurrent access to {GetType()}");
src\roslyn\src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Enumerator.cs (2)
24public object? Current => throw new InvalidOperationException(); 33throw new InvalidOperationException();
src\roslyn\src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Enumerator`1.cs (1)
24public new T Current => throw new InvalidOperationException();
src\roslyn\src\Dependencies\Contracts\Contract.cs (1)
161throw new InvalidOperationException($"{message} - file {fileName} line {lineNumber}");
src\roslyn\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\roslyn\src\Dependencies\Threading\ParallelExtensions.NetFramework.cs (2)
592Enumerator = source.GetEnumerator() ?? throw new InvalidOperationException(); 618Enumerator = source.GetAsyncEnumerator(Cancellation.Token) ?? throw new InvalidOperationException();
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Extensions\IOperationExtensions.cs (1)
520throw new InvalidOperationException();
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\SmallDictionary.cs (2)
306throw new InvalidOperationException(); 573throw new InvalidOperationException();
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\AnalysisEntityDataFlowOperationVisitor.cs (1)
170=> throw new InvalidOperationException("Unreachable");
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\DataFlowOperationVisitor.cs (1)
1076throw new InvalidOperationException();
src\roslyn\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\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (1)
24=> node.Parent ?? throw new InvalidOperationException("Node's parent was null");
src\roslyn\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\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser.cs (1)
89trimmedDictionary[key.Trim()] = allRawConventions.TryGetValue(key, out var value) ? value : throw new InvalidOperationException();
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\NamingStyle.cs (2)
83throw new InvalidOperationException(); 170default: throw new InvalidOperationException();
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (1)
482throw new InvalidOperationException();
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Serialization\ObjectWriter.cs (1)
286throw new InvalidOperationException($"Unsupported object type: {value.GetType()}");
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\BKTree.Builder.cs (1)
201throw new InvalidOperationException();
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\StringEscapeEncoder.cs (1)
138throw new InvalidOperationException();
src\roslyn\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 (38)
src\roslyn\src\Compilers\Core\Portable\Collections\SmallDictionary.cs (2)
193throw new InvalidOperationException(); 460throw new InvalidOperationException();
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\ReaderWriterLockSlimExtensions.cs (2)
93throw new InvalidOperationException(); 101throw new InvalidOperationException();
src\roslyn\src\Compilers\Core\Portable\Text\TextChangeRangeExtensions.cs (1)
323throw new InvalidOperationException();
src\roslyn\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\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (1)
102throw new InvalidOperationException($"Unexpected concurrent access to {GetType()}");
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+ValueBuilder.cs (1)
68throw new InvalidOperationException($"Unexpected concurrent access to {GetType()}");
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+ValueBuilder.cs (1)
78throw new InvalidOperationException($"Unexpected concurrent access to {GetType()}");
src\roslyn\src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Enumerator.cs (2)
24public object? Current => throw new InvalidOperationException(); 33throw new InvalidOperationException();
src\roslyn\src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Enumerator`1.cs (1)
24public new T Current => throw new InvalidOperationException();
src\roslyn\src\Dependencies\Contracts\Contract.cs (1)
161throw new InvalidOperationException($"{message} - file {fileName} line {lineNumber}");
src\roslyn\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\roslyn\src\Dependencies\Threading\ParallelExtensions.NetFramework.cs (2)
592Enumerator = source.GetEnumerator() ?? throw new InvalidOperationException(); 618Enumerator = source.GetAsyncEnumerator(Cancellation.Token) ?? throw new InvalidOperationException();
src\roslyn\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\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (1)
24=> node.Parent ?? throw new InvalidOperationException("Node's parent was null");
src\roslyn\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\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser.cs (1)
89trimmedDictionary[key.Trim()] = allRawConventions.TryGetValue(key, out var value) ? value : throw new InvalidOperationException();
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\NamingStyle.cs (2)
83throw new InvalidOperationException(); 170default: throw new InvalidOperationException();
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (1)
482throw new InvalidOperationException();
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Serialization\ObjectWriter.cs (1)
286throw new InvalidOperationException($"Unsupported object type: {value.GetType()}");
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\BKTree.Builder.cs (1)
201throw new InvalidOperationException();
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\StringEscapeEncoder.cs (1)
138throw new InvalidOperationException();
src\roslyn\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\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationConstructedMethodSymbol.cs (1)
85=> throw new System.InvalidOperationException();
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationMethodSymbol.cs (1)
110=> throw new InvalidOperationException();
src\roslyn\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\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\ISolutionExtensions.cs (3)
37=> solution.GetDocument(syntaxTree) ?? throw new InvalidOperationException(); 44throw new InvalidOperationException(string.Format(WorkspaceExtensionsResources.Project_of_ID_0_is_required_to_accomplish_the_task_but_is_not_available_from_the_solution, projectId)); 128=> new InvalidOperationException(string.Format(WorkspaceExtensionsResources.The_solution_does_not_contain_the_specified_document, debugName ?? "Unknown"));
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\ProjectExtensions.cs (1)
99throw new InvalidOperationException(string.Format(WorkspaceExtensionsResources.Compilation_is_required_to_accomplish_the_task_but_is_not_supported_by_project_0, project.Name));
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\AddImports\AbstractAddImportsService.cs (1)
123throw new InvalidOperationException();
Microsoft.CodeAnalysis.CSharp (22)
Compilation\CSharpSemanticModel.cs (1)
1399throw new InvalidOperationException(CSharpResources.ChainingSpeculativeModelIsNotSupported);
Emitter\Model\PEModuleBuilder.cs (1)
1282throw new InvalidOperationException(string.Format(CSharpResources.GenericParameterDefinition, param.Name));
Lowering\LocalRewriter\LocalRewriter_BasePatternSwitchLocalRewriter.cs (1)
34throw new InvalidOperationException();
Symbols\MethodSymbol.cs (2)
850throw new InvalidOperationException(); 878throw new InvalidOperationException();
Symbols\NamedTypeSymbol.cs (2)
1506throw new InvalidOperationException(CSharpResources.CannotCreateConstructedFromConstructed); 1511throw new InvalidOperationException(CSharpResources.CannotCreateConstructedFromNongeneric);
Symbols\NamespaceExtent.cs (3)
49throw new InvalidOperationException(); 66throw new InvalidOperationException(); 83throw new InvalidOperationException();
Symbols\ParameterSymbol.cs (1)
241throw new InvalidOperationException();
Symbols\PublicModel\TypeSymbol.cs (1)
227throw new InvalidOperationException(CSharpResources.GetClosedDerivedTypeInfoMustBeClosed);
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(); 811throw new InvalidOperationException(); 827throw new InvalidOperationException(); 844throw new InvalidOperationException();
Syntax\SyntaxReplacer.cs (2)
329return new InvalidOperationException(CodeAnalysisResources.MissingListItem); 334return new InvalidOperationException(CodeAnalysisResources.MissingTokenListItem);
Microsoft.CodeAnalysis.CSharp.CodeStyle (11)
src\roslyn\src\Analyzers\CSharp\Analyzers\UseExpressionBody\Helpers\UseExpressionBodyForIndexersHelper.cs (1)
60throw new InvalidOperationException();
src\roslyn\src\Analyzers\CSharp\Analyzers\UseExpressionBody\Helpers\UseExpressionBodyForPropertiesHelper.cs (1)
63throw new InvalidOperationException();
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SemanticModelExtensions.cs (8)
462?? throw new InvalidOperationException(); 468?? throw new InvalidOperationException(); 474?? throw new InvalidOperationException(); 480?? throw new InvalidOperationException(); 486?? throw new InvalidOperationException(); 492?? throw new InvalidOperationException(); 498?? throw new InvalidOperationException(); 504?? throw new InvalidOperationException();
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxTriviaExtensions.cs (1)
115throw new InvalidOperationException();
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (4)
src\roslyn\src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpCollectionExpressionRewriter.cs (1)
884_ => throw new InvalidOperationException(),
src\roslyn\src\Analyzers\CSharp\CodeFixes\UseCollectionInitializer\CSharpUseCollectionInitializerCodeFixProvider_CollectionInitializer.cs (1)
103_ => throw new InvalidOperationException(),
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\ExpressionGenerator.cs (1)
246tokenFactory, isNegative: x => false, negate: t => throw new InvalidOperationException(), integerMinValueString: null);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ITypeSymbolExtensions.TypeSyntaxGeneratorVisitor.cs (1)
58throw new InvalidOperationException("This symbol cannot be converted into a NameSyntax");
Microsoft.CodeAnalysis.CSharp.Features (7)
IntroduceVariable\CSharpIntroduceVariableService_IntroduceLocal.cs (1)
106throw new InvalidOperationException();
InvertIf\CSharpInvertIfCodeRefactoringProvider.cs (1)
72=> ifNode.Else?.Statement ?? throw new InvalidOperationException();
ReverseForStatement\CSharpReverseForStatementCodeRefactoringProvider.cs (1)
299throw new InvalidOperationException();
src\roslyn\src\Analyzers\CSharp\Analyzers\UseExpressionBody\Helpers\UseExpressionBodyForIndexersHelper.cs (1)
60throw new InvalidOperationException();
src\roslyn\src\Analyzers\CSharp\Analyzers\UseExpressionBody\Helpers\UseExpressionBodyForPropertiesHelper.cs (1)
63throw new InvalidOperationException();
src\roslyn\src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpCollectionExpressionRewriter.cs (1)
884_ => throw new InvalidOperationException(),
src\roslyn\src\Analyzers\CSharp\CodeFixes\UseCollectionInitializer\CSharpUseCollectionInitializerCodeFixProvider_CollectionInitializer.cs (1)
103_ => throw new InvalidOperationException(),
Microsoft.CodeAnalysis.CSharp.NetAnalyzers (3)
Microsoft.NetCore.Analyzers\Performance\CSharpPreferHashDataOverComputeHash.Fixer.cs (1)
112throw new InvalidOperationException("there is only 3 type of ComputeHash");
Microsoft.NetCore.Analyzers\Performance\CSharpUseAsSpanInsteadOfRangeIndexer.Fixer.cs (1)
43throw new InvalidOperationException(node.GetType().FullName);
Microsoft.NetCore.Analyzers\Performance\CSharpUseSearchValues.Fixer.cs (1)
60throw new InvalidOperationException($"Expected 'VariableDeclaratorSyntax' or 'PropertyDeclarationSyntax', got {syntax.GetType().Name}");
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.Workspaces (17)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SemanticModelExtensions.cs (8)
462?? throw new InvalidOperationException(); 468?? throw new InvalidOperationException(); 474?? throw new InvalidOperationException(); 480?? throw new InvalidOperationException(); 486?? throw new InvalidOperationException(); 492?? throw new InvalidOperationException(); 498?? throw new InvalidOperationException(); 504?? throw new InvalidOperationException();
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxTriviaExtensions.cs (1)
115throw new InvalidOperationException();
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\ExpressionGenerator.cs (1)
246tokenFactory, isNegative: x => false, negate: t => throw new InvalidOperationException(), integerMinValueString: null);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ITypeSymbolExtensions.TypeSyntaxGeneratorVisitor.cs (1)
58throw new InvalidOperationException("This symbol cannot be converted into a NameSyntax");
SyncedSource\FileBasedPrograms\FileLevelDirectiveHelpers.cs (5)
556?? throw new InvalidOperationException($"Source file path '{sourcePath}' does not have a containing directory."); 664?? throw new InvalidOperationException($"Source file path '{sourcePath}' does not have a containing directory."); 801_ => throw new InvalidOperationException($"Unexpected include/exclude directive kind '{kind}'."), 811_ => throw new InvalidOperationException($"Unexpected {nameof(IncludeOrExcludeKind)} value '{Kind}'."), 821_ => throw new InvalidOperationException($"Unexpected {nameof(IncludeOrExcludeKind)} value '{Kind}'."),
SyncedSource\FileBasedPrograms\VirtualProjectBuilder.cs (1)
160throw new InvalidOperationException(FileBasedProgramsResources.EmptyTempPath);
Microsoft.CodeAnalysis.Extensions.Package (13)
src\roslyn\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\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (1)
102throw new InvalidOperationException($"Unexpected concurrent access to {GetType()}");
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+ValueBuilder.cs (1)
68throw new InvalidOperationException($"Unexpected concurrent access to {GetType()}");
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+ValueBuilder.cs (1)
78throw new InvalidOperationException($"Unexpected concurrent access to {GetType()}");
src\roslyn\src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Enumerator.cs (2)
24public object? Current => throw new InvalidOperationException(); 33throw new InvalidOperationException();
src\roslyn\src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Enumerator`1.cs (1)
24public new T Current => throw new InvalidOperationException();
src\roslyn\src\Dependencies\Contracts\Contract.cs (1)
161throw new InvalidOperationException($"{message} - file {fileName} line {lineNumber}");
src\roslyn\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.Features (92)
CodeFixes\Service\CodeFixService.cs (1)
894throw new InvalidOperationException(
CodeRefactorings\SyncNamespace\AbstractChangeNamespaceService.cs (1)
795?? 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)
190throw new InvalidOperationException($"Pending update has not been committed or discarded."); 207throw new InvalidOperationException($"Previous update has not been committed or discarded."); 216throw 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)
1237throw new InvalidOperationException(); 1453throw new InvalidOperationException();
EmbeddedLanguages\StackFrame\StackFrameCompilationUnit.cs (1)
49_ => throw new InvalidOperationException()
EmbeddedLanguages\StackFrame\StackFrameLexer.cs (2)
516'\n' => throw new InvalidOperationException(), 517'\r' => throw new InvalidOperationException(),
EmbeddedLanguages\StackFrame\StackFrameNodeDefinitions.cs (11)
53_ => throw new InvalidOperationException(), 126_ => throw new InvalidOperationException() 144_ => throw new InvalidOperationException() 159_ => throw new InvalidOperationException() 196_ => throw new InvalidOperationException() 243_ => throw new InvalidOperationException() 297_ => throw new InvalidOperationException() 335_ => throw new InvalidOperationException() 464throw new InvalidOperationException(); 505_ => throw new InvalidOperationException() 581_ => 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()}");
MetadataAsSource\MetadataAsSourceFileService.cs (1)
233throw new InvalidOperationException(
MoveToNamespace\AbstractMoveToNamespaceService.cs (1)
182_ => throw new InvalidOperationException(),
src\roslyn\src\Dependencies\CodeAnalysis.Debugging\CustomDebugInfoReader.cs (13)
77throw new InvalidOperationException("Invalid header."); 93throw new InvalidOperationException("Invalid header."); 111throw new InvalidOperationException("Invalid header."); 365throw new InvalidOperationException(string.Format("Expected at most one Using record for method {0}", FormatMethodToken(methodToken))); 374throw new InvalidOperationException(string.Format("Did not expect both Forward and ForwardToModule records for method {0}", FormatMethodToken(methodToken))); 392throw new InvalidOperationException(string.Format("Expected at most one ForwardToModule record for method {0}", FormatMethodToken(methodToken))); 434throw new InvalidOperationException(string.Format("Group size indicates more imports than there are import strings (method {0}).", FormatMethodToken(methodToken))); 440throw new InvalidOperationException(string.Format("Encountered extern alias info before all import strings were consumed (method {0}).", FormatMethodToken(methodToken))); 460throw new InvalidOperationException(string.Format("Expected only extern alias info strings after consuming the indicated number of imports (method {0}).", FormatMethodToken(methodToken))); 474throw new InvalidOperationException(string.Format("Group size indicates fewer imports than there are import strings (method {0}).", FormatMethodToken(methodToken))); 525throw new InvalidOperationException("Read out of buffer."); 537throw new InvalidOperationException("Read out of buffer."); 549throw new InvalidOperationException("Read out of buffer.");
Microsoft.CodeAnalysis.NetAnalyzers (15)
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\OperatorsShouldHaveSymmetricalOverloads.Fixer.cs (1)
112_ => throw new InvalidOperationException(),
Microsoft.NetCore.Analyzers\Performance\AvoidSingleUseOfLocalJsonSerializerOptions.cs (1)
285_ => throw new InvalidOperationException()
Microsoft.NetCore.Analyzers\Performance\ConstantExpectedAnalyzer.UnmanagedHelper.cs (1)
18private static ConstantExpectedParameterFactory Instance => _instance ?? throw new InvalidOperationException("unsupported type");
Microsoft.NetCore.Analyzers\Tasks\DoNotUseWhenAllOrWaitAllWithSingleArgument.cs (1)
77throw new InvalidOperationException($"Unexpected method name: {invocation.TargetMethod.Name}");
src\9382845807600969\AnalysisEntityDataFlowOperationVisitor.cs (1)
169=> throw new InvalidOperationException("Unreachable");
src\afc74d572e54ec72\DisposeAnalysis.DisposeDataFlowOperationVisitor.cs (1)
50throw new InvalidOperationException();
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\Compiler\Extensions\IOperationExtensions.cs (1)
880throw new InvalidOperationException();
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\Compiler\Lightup\LightupHelpers.cs (2)
163throw new InvalidOperationException(); 179throw new InvalidOperationException();
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\Compiler\SmallDictionary.cs (2)
304throw new InvalidOperationException(); 571throw new InvalidOperationException();
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\DataFlowOperationVisitor.cs (1)
1073throw new InvalidOperationException();
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\Workspaces\DocumentExtensions.cs (3)
21return semanticModel ?? throw new InvalidOperationException("SyntaxTree is required to accomplish the task but is not supported by document"); 30return syntaxTree ?? throw new InvalidOperationException("SyntaxTree is required to accomplish the task but is not supported by document"); 39return root ?? throw new InvalidOperationException("SyntaxTree is required to accomplish the task but is not supported by document");
Microsoft.CodeAnalysis.Razor.Compiler (60)
Language\Components\ComponentNodeWriter.cs (2)
261throw new InvalidOperationException($"Not implemented: type inference method parameter from source {parameter.Source}"); 1227throw new InvalidOperationException($"Not implemented: type inference method parameter from source {parameter.Source}");
Language\DefaultRazorCSharpLoweringPhase.cs (1)
25throw new InvalidOperationException(message);
Language\DefaultRazorIntermediateNodeLoweringPhase.cs (1)
253throw new InvalidOperationException(Resources.FormatUnexpectedDirectiveKind(typeof(DirectiveKind).FullName));
Language\DirectiveDescriptor.cs (3)
207throw new InvalidOperationException(Resources.FormatDirectiveDescriptor_InvalidDirectiveKeyword(Directive)); 214throw new InvalidOperationException(Resources.FormatDirectiveDescriptor_InvalidDirectiveKeyword(Directive)); 226throw new InvalidOperationException(Resources.DirectiveDescriptor_InvalidNonOptionalToken);
Language\DocumentClassifierPassBase.cs (1)
49throw new InvalidOperationException($"{nameof(CreateTarget)} must return a non-null {nameof(CodeTarget)}.");
Language\Extensions\DefaultTagHelperTargetExtension.cs (7)
83throw new InvalidOperationException(message); 119throw new InvalidOperationException(message); 138throw new InvalidOperationException(message); 181throw new InvalidOperationException(message); 258throw new InvalidOperationException(message); 476throw new InvalidOperationException(); 493throw new InvalidOperationException();
Language\Extensions\PreallocatedAttributeTargetExtension.cs (3)
60throw new InvalidOperationException(message); 92throw new InvalidOperationException(message); 153throw new InvalidOperationException();
Language\Intermediate\ComponentAttributeIntermediateNode.cs (1)
210throw new InvalidOperationException("This attribute is not an EventCallback attribute.");
Language\Intermediate\DefaultRazorIntermediateNodeBuilder.cs (1)
72throw new InvalidOperationException(Resources.FormatIntermediateNodeBuilder_PopInvalid(nameof(Pop)));
Language\Intermediate\IntermediateNodeReference.cs (3)
35throw new InvalidOperationException(Resources.IntermediateNodeReference_NotInitialized); 40throw new InvalidOperationException(Resources.FormatIntermediateNodeReference_CollectionIsReadOnly(Parent)); 46throw new InvalidOperationException(Resources.FormatIntermediateNodeReference_NodeNotFound(Node, Parent));
Language\IntermediateNodePassBase.cs (1)
31throw new InvalidOperationException(Resources.PhaseMustBeInitialized);
Language\Legacy\CSharpCodeParser.cs (1)
270throw new InvalidOperationException(Resources.Parser_Context_Not_Set);
Language\Legacy\HtmlMarkupParser.cs (3)
69throw new InvalidOperationException(Resources.Parser_Context_Not_Set); 127throw new InvalidOperationException(Resources.Parser_Context_Not_Set); 192throw new InvalidOperationException(Resources.Parser_Context_Not_Set);
Language\Legacy\RoslynCSharpTokenizer.cs (2)
372_ => throw new InvalidOperationException($"Unexpected expectedStringKind: {expectedStringKind}."), 642throw new InvalidOperationException($"Unexpected trivia kind: {kind}.");
Language\Legacy\TokenizerBackedParser.cs (2)
365throw new InvalidOperationException(Resources.Language_Does_Not_Support_RazorComment); 621throw new InvalidOperationException("No tokens to output.");
Language\RazorCSharpDocumentWriter.cs (1)
141throw new InvalidOperationException(message);
Language\RazorEngineFeatureBase.cs (3)
26throw new InvalidOperationException(Resources.FeatureAlreadyInitialized); 40throw new InvalidOperationException( 48throw new InvalidOperationException(
Language\RazorEnginePhaseBase.cs (3)
26throw new InvalidOperationException(Resources.PhaseAlreadyInitialized); 48throw new InvalidOperationException( 56throw new InvalidOperationException(
Language\RazorProjectEngineFeatureBase.cs (1)
25throw new InvalidOperationException(Resources.FeatureAlreadyInitialized);
Language\RazorProjectFileSystem.cs (1)
104throw new InvalidOperationException($"Cannot find file name in path '{path}'");
Language\SourceChange.cs (1)
92throw new InvalidOperationException(Resources.FormatInvalidOperation_SpanIsNotChangeOwner(node, this));
Language\Syntax\ChildSyntaxList.cs (2)
364throw new InvalidOperationException(); 381throw new InvalidOperationException();
Language\Syntax\InternalSyntax\SyntaxListOfT.cs (1)
54throw new InvalidOperationException("This program location is thought to be unreachable.");
Language\Syntax\InternalSyntax\SyntaxToken.cs (1)
40throw new InvalidOperationException("Tokens don't have slots.");
Language\Syntax\SpecializedCollections.cs (3)
49public new T Current => throw new InvalidOperationException(); 64public object Current => throw new InvalidOperationException(); 73throw new InvalidOperationException();
Language\Syntax\SyntaxNode.Iterators.cs (1)
237: throw new InvalidOperationException(); // unreachable: (null, null) handled by caller
Language\Syntax\SyntaxReplacer.cs (2)
288throw new InvalidOperationException("Expecting a list"); 338throw new InvalidOperationException("Expecting a list");
Language\Syntax\SyntaxTokenList.cs (2)
122public SyntaxToken First() => Any() ? this[0] : throw new InvalidOperationException(); 123public SyntaxToken Last() => Any() ? this[^1] : throw new InvalidOperationException();
Language\Syntax\SyntaxTokenList.Enumerator.cs (1)
100throw new InvalidOperationException();
Language\Syntax\SyntaxTokenList.Reversed.cs (1)
91throw new InvalidOperationException();
Language\TagHelperObjectBuilder`1.cs (1)
27throw new InvalidOperationException();
Language\VirtualRazorProjectFileSystem.cs (3)
50throw new InvalidOperationException(message); 65throw new InvalidOperationException(message); 91throw new InvalidOperationException(Resources.FormatVirtualFileSystem_FileDoesNotBelongToDirectory(path, Path));
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)
71throw new InvalidOperationException(RebuildResources.Does_not_contain_metadata_compilation_options); 220using var algorithm = CryptographicHashProvider.TryGetAlgorithm(sourceTextInfo.HashAlgorithm) ?? throw new InvalidOperationException(); 316throw new InvalidOperationException(); 335throw new InvalidOperationException(); 343throw new InvalidOperationException(); 357throw new InvalidOperationException();
MetadataCompilationOptions.cs (1)
54throw new InvalidOperationException(string.Format(RebuildResources._0_exists_1_times_in_compilation_options, optionName, optionValues.Length));
Microsoft.CodeAnalysis.ResxSourceGenerator (46)
AbstractResxGenerator.cs (5)
532throw new InvalidOperationException(); 607throw new InvalidOperationException(); 631throw new InvalidOperationException(); 656throw new InvalidOperationException(); 732throw new InvalidOperationException();
src\roslyn\src\Compilers\Core\Portable\Collections\SmallDictionary.cs (2)
193throw new InvalidOperationException(); 460throw new InvalidOperationException();
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\ReaderWriterLockSlimExtensions.cs (2)
93throw new InvalidOperationException(); 101throw new InvalidOperationException();
src\roslyn\src\Compilers\Core\Portable\Text\TextChangeRangeExtensions.cs (1)
323throw new InvalidOperationException();
src\roslyn\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\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (1)
102throw new InvalidOperationException($"Unexpected concurrent access to {GetType()}");
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+ValueBuilder.cs (1)
68throw new InvalidOperationException($"Unexpected concurrent access to {GetType()}");
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+ValueBuilder.cs (1)
78throw new InvalidOperationException($"Unexpected concurrent access to {GetType()}");
src\roslyn\src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Enumerator.cs (2)
24public object? Current => throw new InvalidOperationException(); 33throw new InvalidOperationException();
src\roslyn\src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Enumerator`1.cs (1)
24public new T Current => throw new InvalidOperationException();
src\roslyn\src\Dependencies\Contracts\Contract.cs (1)
161throw new InvalidOperationException($"{message} - file {fileName} line {lineNumber}");
src\roslyn\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\roslyn\src\Dependencies\Threading\ParallelExtensions.NetFramework.cs (2)
592Enumerator = source.GetEnumerator() ?? throw new InvalidOperationException(); 618Enumerator = source.GetAsyncEnumerator(Cancellation.Token) ?? throw new InvalidOperationException();
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Extensions\IOperationExtensions.cs (1)
520throw new InvalidOperationException();
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\SmallDictionary.cs (2)
306throw new InvalidOperationException(); 573throw new InvalidOperationException();
src\roslyn\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\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (1)
24=> node.Parent ?? throw new InvalidOperationException("Node's parent was null");
src\roslyn\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\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser.cs (1)
89trimmedDictionary[key.Trim()] = allRawConventions.TryGetValue(key, out var value) ? value : throw new InvalidOperationException();
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\NamingStyle.cs (2)
83throw new InvalidOperationException(); 170default: throw new InvalidOperationException();
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (1)
482throw new InvalidOperationException();
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Serialization\ObjectWriter.cs (1)
286throw new InvalidOperationException($"Unsupported object type: {value.GetType()}");
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\BKTree.Builder.cs (1)
201throw new InvalidOperationException();
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\StringEscapeEncoder.cs (1)
138throw new InvalidOperationException();
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\TaskExtensions.cs (1)
36throw new InvalidOperationException($"{nameof(WaitAndGetResult)} cannot be called from a thread pool thread.");
Microsoft.CodeAnalysis.Scripting (2)
ScriptVariable.cs (2)
62throw new InvalidOperationException(ScriptingResources.CannotSetReadOnlyVariable); 67throw new InvalidOperationException(ScriptingResources.CannotSetConstantVariable);
Microsoft.CodeAnalysis.Workspaces (106)
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)
1466=> root.RemoveNode(node, options) ?? throw new InvalidOperationException($"Can't remove root node.");
FindSymbols\SymbolTree\SymbolTreeInfo.cs (1)
160_ => throw new InvalidOperationException(),
FindSymbols\TopLevelSyntaxTree\DeclaredSymbolInfo.cs (1)
242FatalError.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(
Serialization\SerializerService.cs (1)
74throw new InvalidOperationException("Clients can already get a checksum directly from a SerializableSourceText");
Shared\TestHooks\AsynchronousOperationListener+AsyncToken.cs (1)
34throw new InvalidOperationException("Double disposing of an async token");
src\roslyn\src\Compilers\Core\Portable\Collections\SmallDictionary.cs (2)
193throw new InvalidOperationException(); 460throw new InvalidOperationException();
src\roslyn\src\Compilers\Core\Portable\DiagnosticAnalyzer\AnalyzerAssemblyLoader.cs (1)
239throw new InvalidOperationException($"Unable to load {assemblyName.Name}: {ex.Message}", ex);
src\roslyn\src\Compilers\Core\Portable\DiagnosticAnalyzer\ShadowCopyAnalyzerPathResolver.cs (1)
105throw new InvalidOperationException("ShadowCopyAnalyzerPathResolver is only supported on Windows.");
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\ReaderWriterLockSlimExtensions.cs (2)
93throw new InvalidOperationException(); 101throw new InvalidOperationException();
src\roslyn\src\Compilers\Core\Portable\Text\TextChangeRangeExtensions.cs (1)
323throw new InvalidOperationException();
src\roslyn\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\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (1)
102throw new InvalidOperationException($"Unexpected concurrent access to {GetType()}");
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+ValueBuilder.cs (1)
68throw new InvalidOperationException($"Unexpected concurrent access to {GetType()}");
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+ValueBuilder.cs (1)
78throw new InvalidOperationException($"Unexpected concurrent access to {GetType()}");
src\roslyn\src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Enumerator.cs (2)
24public object? Current => throw new InvalidOperationException(); 33throw new InvalidOperationException();
src\roslyn\src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Enumerator`1.cs (1)
24public new T Current => throw new InvalidOperationException();
src\roslyn\src\Dependencies\Contracts\Contract.cs (1)
161throw new InvalidOperationException($"{message} - file {fileName} line {lineNumber}");
src\roslyn\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\roslyn\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\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (1)
24=> node.Parent ?? throw new InvalidOperationException("Node's parent was null");
src\roslyn\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\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser.cs (1)
89trimmedDictionary[key.Trim()] = allRawConventions.TryGetValue(key, out var value) ? value : throw new InvalidOperationException();
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\NamingStyle.cs (2)
83throw new InvalidOperationException(); 170default: throw new InvalidOperationException();
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (1)
482throw new InvalidOperationException();
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Serialization\ObjectWriter.cs (1)
286throw new InvalidOperationException($"Unsupported object type: {value.GetType()}");
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\BKTree.Builder.cs (1)
201throw new InvalidOperationException();
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\StringEscapeEncoder.cs (1)
138throw new InvalidOperationException();
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\TaskExtensions.cs (1)
36throw new InvalidOperationException($"{nameof(WaitAndGetResult)} cannot be called from a thread pool thread.");
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationConstructedMethodSymbol.cs (1)
85=> throw new System.InvalidOperationException();
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationMethodSymbol.cs (1)
110=> throw new InvalidOperationException();
src\roslyn\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\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\ISolutionExtensions.cs (4)
37=> solution.GetDocument(syntaxTree) ?? throw new InvalidOperationException(); 44throw new InvalidOperationException(string.Format(WorkspaceExtensionsResources.Project_of_ID_0_is_required_to_accomplish_the_task_but_is_not_available_from_the_solution, projectId)); 114throw new InvalidOperationException($"Use {nameof(GetRequiredTextDocumentAsync)} to get the {nameof(TextDocument)} for a `.{nameof(DocumentId.IsSourceGenerated)}=true` {nameof(DocumentId)}"); 128=> new InvalidOperationException(string.Format(WorkspaceExtensionsResources.The_solution_does_not_contain_the_specified_document, debugName ?? "Unknown"));
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\ProjectExtensions.cs (1)
99throw new InvalidOperationException(string.Format(WorkspaceExtensionsResources.Compilation_is_required_to_accomplish_the_task_but_is_not_supported_by_project_0, project.Name));
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\AddImports\AbstractAddImportsService.cs (1)
123throw new InvalidOperationException();
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)
396throw new InvalidOperationException($"The file '{filePath}' does not exist in the project.");
Workspace\ProjectSystem\ProjectSystemProject.cs (4)
1015throw new InvalidOperationException($"Multiple redirectors disagree on the path to redirect '{fullPath}' to ('{redirectedPath}' vs '{currentlyRedirectedPath}')."); 1069throw new InvalidOperationException("The metadata reference has already been added to the project."); 1115throw new InvalidOperationException("The metadata reference does not exist in this project."); 1221throw 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 (13)
671throw new InvalidOperationException(WorkspacesResources.The_project_already_references_the_target_project); 767throw new InvalidOperationException(WorkspacesResources.The_project_already_contains_the_specified_reference); 791throw new InvalidOperationException(WorkspacesResources.Project_does_not_contain_specified_reference); 849throw new InvalidOperationException(WorkspacesResources.The_project_already_contains_the_specified_reference); 878throw new InvalidOperationException(WorkspacesResources.Project_does_not_contain_specified_reference); 934throw new InvalidOperationException(WorkspacesResources.The_solution_already_contains_the_specified_reference); 953throw new InvalidOperationException(WorkspacesResources.Solution_does_not_contain_specified_reference); 1166=> this.SolutionState.GetProjectState(projectId) ?? throw new InvalidOperationException(string.Format(WorkspacesResources._0_is_not_part_of_the_workspace, projectId)); 1776throw new InvalidOperationException(WorkspacesResources.The_solution_does_not_contain_the_specified_project); 1885throw new InvalidOperationException(WorkspacesResources.A_project_may_not_reference_itself); 1890throw new InvalidOperationException( 1919throw new InvalidOperationException(WorkspacesResources.Only_submission_project_can_reference_submission_projects); 1924throw 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)
857throw new InvalidOperationException($"The document '{id}' does not exist in the project."); 1390throw new InvalidOperationException(WorkspacesResources.The_solution_already_contains_the_specified_project); 1398throw new InvalidOperationException(WorkspacesResources.The_solution_does_not_contain_the_specified_project);
Workspace\Solution\SourceGeneratorExecutionVersion.cs (1)
84=> throw new InvalidOperationException();
Workspace\Solution\StateChecksums.cs (2)
451var 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."); 457var 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 (4)
MSBuild\BuildHostProcessManager.cs (2)
188static string GetProcessPath() => Environment.ProcessPath ?? throw new InvalidOperationException("Unable to determine the path of the current process."); 500public RemoteBuildHost BuildHost => _buildHost ?? throw new InvalidOperationException("Build host is not connected.");
MSBuild\DiagnosticReporter.cs (1)
33throw new InvalidOperationException(message);
MSBuild\MSBuildWorkspace.cs (1)
588return s_frameworkRoot ?? throw new InvalidOperationException($"Unable to get {nameof(FrameworkRoot)}");
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (5)
AbstractBuildHost.cs (2)
91throw new InvalidOperationException($"{nameof(ConfigureGlobalState)} should have been called first to set up global state."); 125throw new InvalidOperationException($"{nameof(_buildManager)} has already been initialized and cannot be changed");
MSBuild\ProjectFile\ProjectFile.cs (1)
167throw new InvalidOperationException($"Unable to find reference item '{shortAssemblyName}'");
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\ReaderWriterLockSlimExtensions.cs (2)
93throw new InvalidOperationException(); 101throw new InvalidOperationException();
Microsoft.CodeAnalysis.Workspaces.MSBuild.Contracts (3)
src\roslyn\src\Dependencies\Contracts\Contract.cs (1)
161throw new InvalidOperationException($"{message} - file {fileName} line {lineNumber}");
src\roslyn\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.CSharp (5)
Microsoft\CSharp\RuntimeBinder\ComInterop\ComTypeDesc.cs (1)
43throw new InvalidOperationException(SR.UnsupportedEnum);
Microsoft\CSharp\RuntimeBinder\ComInterop\Errors.cs (4)
18return new InvalidOperationException(SR.COMSetComObjectDataFailed); 26return new InvalidOperationException(SR.Format(SR.COMUnexpectedVarEnum, p0)); 82return new InvalidOperationException(SR.COMCannotRetrieveTypeInfo); 98return new InvalidOperationException(SR.COMUnsupportedEventHandlerType);
Microsoft.Data.Analysis (3)
DataFrame.cs (1)
788throw new InvalidOperationException(Strings.NoValueColumnsRemaining);
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.Diagnostics.DataContractReader (9)
_generated\13\ContractDescriptorContext.g.cs (2)
89throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 97throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
ContractDescriptorTarget.cs (7)
528throw new InvalidOperationException($"Failed to write {typeof(T)} at 0x{address:x8}."); 591throw new InvalidOperationException($"Failed to write {buffer.Length} bytes at 0x{address:x8}."); 598throw Marshal.GetExceptionForHR(hr) ?? new InvalidOperationException($"Failed to allocate {size} bytes in the target process (HRESULT: 0x{hr:x8})."); 852throw new InvalidOperationException($"Failed to read global {typeof(T)} '{name}'."); 880throw new InvalidOperationException($"Failed to read global pointer '{name}'."); 891throw new InvalidOperationException($"Failed to read string global '{name}'."); 932throw new InvalidOperationException($"Failed to get type info for '{type}'");
Microsoft.Diagnostics.DataContractReader.Contracts (108)
_generated\0\LayoutSet.g.cs (2)
34throw new InvalidOperationException("No layout source has a known instance size."); 60throw new InvalidOperationException(FormatMissing(names));
_generated\1\TypeNameResolver.g.cs (3)
18throw new InvalidOperationException( 25throw new InvalidOperationException( 62throw new InvalidOperationException(
Contracts\CallingConvention\CallingConvention_1.cs (4)
66throw new InvalidOperationException("Method has no signature."); 119throw new InvalidOperationException("Type has no module."); 127?? throw new InvalidOperationException("Cannot read metadata for module."); 259ArgLocDesc loc = argit.GetArgLoc(argOffset) ?? throw new InvalidOperationException("ArgIterator returned null ArgLocDesc for struct-in-registers argument");
Contracts\CodeVersions_1.cs (3)
295throw new InvalidOperationException($"Unknown ILCodeVersionKind {ilState.ActiveVersionKind}"); 363throw new InvalidOperationException("Synthetic ILCodeVersion does not have a backing node."); 373throw new InvalidOperationException("Synthetic NativeCodeVersion does not have a backing node.");
Contracts\ComWrappers_1.cs (2)
114?? throw new InvalidOperationException("Failed to resolve ComWrappers.s_allManagedObjectWrapperTable static field."); 151?? throw new InvalidOperationException("Failed to resolve ComWrappers.s_nativeObjectWrapperTable static field.");
Contracts\Debugger\Debugger_1.cs (2)
412throw new InvalidOperationException($"Cannot set register '{register}' to value {value.Value}: value exceeds 32-bit range."); 416throw new InvalidOperationException($"Failed to set register '{register}' on context.");
Contracts\DebugInfo\DebugInfo_1.cs (4)
46throw new InvalidOperationException($"No CodeBlockHandle found for native code {pCode}."); 123throw new InvalidOperationException($"No CodeBlockHandle found for native code {pCode}."); 134throw new InvalidOperationException($"No NativeCodeVersion found for native code {pCode}."); 156throw new InvalidOperationException($"No CodeBlockHandle found for native code {pCode}.");
Contracts\EcmaMetadata_1.cs (2)
43throw new InvalidOperationException("Module is not loaded."); 442throw new InvalidOperationException($"Unexpected metadata table count {tableCount}.");
Contracts\Exception_1.cs (1)
66throw new InvalidOperationException($"Stack trace object 0x{stackTraceObj.Value:x} has no MethodTable.");
Contracts\ExecutionManager\ExecutionManagerCore.cs (10)
242throw new InvalidOperationException($"{nameof(CodeBlock)} not found for {codeInfoHandle.Address}"); 250throw new InvalidOperationException($"{nameof(CodeBlock)} not found for {codeInfoHandle.Address}"); 259throw new InvalidOperationException("Unable to get runtime function address"); 265throw new InvalidOperationException("Unable to get runtime function address"); 284throw new InvalidOperationException("Unable to get runtime function address"); 342throw new InvalidOperationException($"{nameof(CodeBlock)} not found for {codeInfoHandle.Address}"); 377throw new InvalidOperationException($"{nameof(RangeSection)} not found for {codeInfoHandle.Address}"); 410throw new InvalidOperationException($"{nameof(CodeBlock)} not found for {codeInfoHandle.Address}"); 440throw new InvalidOperationException($"GC info not available for {codeInfoHandle.Address}"); 543throw new InvalidOperationException($"{nameof(CodeBlock)} not found for {codeInfoHandle.Address}");
Contracts\ExecutionManager\ExecutionManagerCore.EEJitManager.cs (1)
156throw new InvalidOperationException("RangeSection is not a code heap");
Contracts\ExecutionManager\ExecutionManagerCore.InterpreterJitManager.cs (1)
134throw new InvalidOperationException("RangeSection is not a code heap");
Contracts\ExecutionManager\Helpers\RangeSectionMap.cs (1)
131throw new InvalidOperationException("Invalid pointer size");
Contracts\GC\GC_1.cs (8)
166throw new InvalidOperationException("GetHeapData() is only valid for Workstation GC."); 174throw new InvalidOperationException("GetHeapData(TargetPointer heap) is only valid for Server GC."); 263throw new InvalidOperationException("GetOomData() is only valid for Workstation GC."); 273throw new InvalidOperationException("GetOomData(TargetPointer heap) is only valid for Server GC."); 383throw new InvalidOperationException($"Expected at least 5 generations in the generation table, got {gens.Count}."); 453throw new InvalidOperationException($"Segment list exceeded {MaxSegmentListIterations} iterations; possible cycle."); 742throw new InvalidOperationException("BookkeepingStart global pointer is null"); 746throw new InvalidOperationException("bookkeeping_start is null");
Contracts\GCInfo\X86\GCInfo.cs (2)
305throw new InvalidOperationException("Unsupported gc transition type"); 848throw new InvalidOperationException($"Unsupported x86 GC transition: {transition.GetType().Name}");
Contracts\GCInfo\X86\GCInfoTargetExtensions.cs (2)
22throw new InvalidOperationException("Invalid variable-length integer encoding."); 46throw new InvalidOperationException("Invalid variable-length integer encoding.");
Contracts\GCInfo\X86\InfoHdr.cs (1)
160throw new InvalidOperationException("Table encoding is invalid.");
Contracts\Loader_1.cs (9)
68throw new InvalidOperationException("Assembly does not have a module associated with it."); 291throw new InvalidOperationException("Failed to read from image."); 301throw new InvalidOperationException("Negative RVA in Webcil image."); 308throw new InvalidOperationException("Invalid Webcil section count."); 311throw new InvalidOperationException("Unsupported Webcil version."); 330throw new InvalidOperationException("Failed to resolve RVA in Webcil image."); 339throw new InvalidOperationException("PEAssembly does not have a PEImage associated with it."); 342throw new InvalidOperationException("PEImage does not have a usable image layout associated with it."); 774throw new InvalidOperationException("Cycle detected while enumerating loader heap blocks.");
Contracts\ManagedTypeSource_1.cs (4)
47throw new InvalidOperationException($"Managed type '{fullyQualifiedName}' is not resolvable through {nameof(ManagedTypeSource_1)}."); 91throw new InvalidOperationException($"Managed type '{fullyQualifiedName}' is not resolvable through {nameof(ManagedTypeSource_1)}."); 118throw new InvalidOperationException($"Static field '{fieldName}' on managed type '{fullyQualifiedName}' is not resolvable through {nameof(ManagedTypeSource_1)}."); 153throw new InvalidOperationException($"Thread-static field '{fieldName}' on managed type '{fullyQualifiedName}' is not resolvable through {nameof(ManagedTypeSource_1)}.");
Contracts\PrecodeStubs_Common.cs (3)
140throw new InvalidOperationException($"Invalid precode type 0x{instrPointer:x16}"); 166throw new InvalidOperationException("FixupPrecode size not available"); 172throw new InvalidOperationException("StubPrecode size not available");
Contracts\ReJIT_1.cs (2)
59_ => throw new InvalidOperationException($"Unknown ReJIT state: {ilCodeVersionNode.RejitState}"), 88throw new InvalidOperationException("Synthetic ILCodeVersion does not have a backing node.");
Contracts\RuntimeTypeSystem_1.cs (4)
283throw new InvalidOperationException("Invalid method classification"); 590throw new InvalidOperationException(); 1749_ => throw new InvalidOperationException() 1909throw new InvalidOperationException($"nameof{typeHandle} is not a MethodTable");
Contracts\StackWalk\Context\AMD64\AMD64Unwinder.cs (3)
1125throw new InvalidOperationException("This unwind info does not contain a chained entry."); 1191_ => throw new InvalidOperationException($"Unsupported unwind operation: {UnwindOp}"), 1283throw new InvalidOperationException(message);
Contracts\StackWalk\Context\ARM64\ARM64Unwinder.cs (1)
1211throw new InvalidOperationException(message);
Contracts\StackWalk\Context\IPlatformAgnosticContext.cs (2)
54RuntimeInfoArchitecture.Unknown => throw new InvalidOperationException($"Processor architecture is required for creating a platform specific context and is not provided by the target"), 55_ => throw new InvalidOperationException($"Unsupported architecture {runtimeInfo.GetTargetArchitecture()}"),
Contracts\StackWalk\Context\Wasm\WasmUnwinder.cs (1)
192throw new InvalidOperationException("Malformed ULEB128 value in WASM unwind data.");
Contracts\StackWalk\Context\X86\X86Unwinder.cs (1)
57throw new InvalidOperationException("Unwind failed, unable to find code block for the instruction pointer.");
Contracts\StackWalk\FrameHandling\ARMFrameHandler.cs (1)
42throw new InvalidOperationException("ARM InlinedCallFrame does not have SPAfterProlog set");
Contracts\StackWalk\FrameHandling\BaseFrameHandler.cs (4)
80throw new InvalidOperationException("TailCallFrame handling is not implemented on the target platform."); 89throw new InvalidOperationException($"Unexpected register {name} found when trying to update context"); 100throw new InvalidOperationException($"Unexpected register {name} in callee saved registers"); 104throw new InvalidOperationException($"Unexpected register {name} in callee saved registers");
Contracts\StackWalk\FrameHandling\FrameHelpers.cs (3)
370_ => throw new InvalidOperationException("Unsupported context type"), 551throw new InvalidOperationException( 562throw new InvalidOperationException(
Contracts\StackWalk\FrameHandling\WasmFrameHandler.cs (1)
42throw new InvalidOperationException($"Failed to set WASM interpreter frame-pointer register '{WasmContext.InterpreterWalkFramePointerRegister}'.");
Contracts\StackWalk\GC\GcScanner.cs (3)
79_ => throw new InvalidOperationException($"Unknown stack slot base: {slot.SpBase}"), 86: throw new InvalidOperationException($"Failed to read register {stackBaseRegister}"), 88_ => throw new InvalidOperationException($"Unknown stack slot base: {slot.SpBase}"),
Contracts\StackWalk\StackWalk_1.cs (6)
311throw new InvalidOperationException("Expected managed code"); 417throw new InvalidOperationException($"Found a cycle when processing ExInfo."); 440throw new InvalidOperationException($"Found a cycle when processing ThreadData.GCFrame list."); 1046var arch => throw new InvalidOperationException( 1083_ => throw new InvalidOperationException($"GetRuntimeFramePointer is not supported on {arch}"), 1187throw new InvalidOperationException($"Unsupported generic context storage kind {storage.Kind}");
Contracts\StressLog.cs (2)
104throw new InvalidOperationException("StressLogModuleTable is not set and StressLog is not available, but StressLogHasModuleTable is set to 1."); 107moduleTable = stressLog.Modules ?? throw new InvalidOperationException("StressLogModuleTable is not set and StressLog does not contain a ModuleTable offset, but StressLogHasModuleTable is set to 1.");
PrintfStressMessageFormatter.cs (1)
322throw new InvalidOperationException($"Unknown format specifier '{specifier}' in string '{formatString}'");
RuntimeTypeSystemHelpers\MethodDescOptionalSlots.cs (5)
66_ => throw new InvalidOperationException($"Unexpected method classification 0x{classification:x2} for MethodDesc") 74throw new InvalidOperationException("no non-vtable slot"); 82throw new InvalidOperationException("no method impl slot"); 90throw new InvalidOperationException("no native code slot"); 105throw new InvalidOperationException("no async method data");
RuntimeTypeSystemHelpers\TypeValidation.cs (3)
83internal TargetPointer EEClass => MethodTableFlags_1.GetEEClassOrCanonMTBits(EEClassOrCanonMT) == MethodTableFlags_1.EEClassOrCanonMTBits.EEClass ? EEClassOrCanonMT : throw new InvalidOperationException("not an EEClass"); 94throw new InvalidOperationException("not a canonical method table"); 253throw new InvalidOperationException("canon MT is not readable");
Microsoft.Diagnostics.DataContractReader.DataGenerator (2)
Parser.cs (2)
458_ => throw new InvalidOperationException($"Unsupported descriptor field read kind '{readKind}'."), 505_ => throw new InvalidOperationException($"Unsupported boolean descriptor storage type '{type}'."),
Microsoft.Diagnostics.DataContractReader.Legacy (15)
ClrDataMethodDefinition.cs (1)
122?? throw new InvalidOperationException("Failed to get metadata reader");
ClrDataMethodInstance.cs (1)
567throw new InvalidOperationException($"No code block found for native code address {code.ToClrDataAddress(_target):x} (the address may be invalid or the corresponding module may not be loaded).");
Dbi\DacDbiImpl.cs (5)
2528throw new InvalidOperationException($"No code block found for controlPC 0x{controlPC:x}"); 2815?? throw new InvalidOperationException("Module has no metadata."); 2910?? throw new InvalidOperationException("Unable to find native code."); 2968?? throw new InvalidOperationException("Unable to find native code."); 6546throw new InvalidOperationException($"Unexpected generic context location: {rts.GetGenericContextLoc(md)}");
SigFormat.cs (1)
131throw new InvalidOperationException("Invalid signature without metadata reader");
SOSDacImpl.cs (4)
127throw new InvalidOperationException(); 412throw new InvalidOperationException(); 2420throw new InvalidOperationException("No active native code version found"); 3937_ => throw new InvalidOperationException(),
SOSDacImpl.IXCLRDataProcess.cs (1)
1658?? throw new InvalidOperationException($"Failed to get metadata reader for module {module.Address}");
TypeNameBuilder.cs (2)
125ITypeHandle methodType = th ?? throw new InvalidOperationException("Metadata-backed method has no declaring type."); 181throw new InvalidOperationException("Invalid parent type");
Microsoft.Diagnostics.NETCore.Client (3)
DiagnosticsServerRouter\DiagnosticsServerRouterFactory.cs (1)
1476throw new InvalidOperationException();
ReversedServer\ReversedDiagnosticsServer.cs (2)
169throw new InvalidOperationException(nameof(ReversedDiagnosticsServer.Start) + " method can only be called once."); 240throw new InvalidOperationException(nameof(ReversedDiagnosticsServer.Start) + " method must be called before invoking this operation.");
Microsoft.DiaSymReader (4)
Extensions\SymUnmanagedExtensions.Reader.cs (2)
134throw new InvalidOperationException(); 159throw new InvalidOperationException();
Utilities\InteropUtilities.cs (1)
101throw new InvalidOperationException(string.Format("Read only {0} of {1} items.", actualCount, bufferLength));
Writer\SymUnmanagedWriterImpl.cs (1)
42=> _symWriter ?? throw (_disposed ? new ObjectDisposedException(nameof(SymUnmanagedWriterImpl)) : new InvalidOperationException());
Microsoft.DotNet.ApiCompatibility (1)
Rules\AttributesMustMatch.cs (1)
63_ => throw new InvalidOperationException($"Unreachable DifferenceType '{dt}' encountered."),
Microsoft.DotNet.ApiSymbolExtensions (1)
Filtering\CompositeSymbolFilter.cs (1)
38_ => throw new InvalidOperationException()
Microsoft.DotNet.Arcade.Sdk (5)
src\GenerateResxSource.cs (5)
181throw new InvalidOperationException(); 233throw new InvalidOperationException(); 258throw new InvalidOperationException(); 307throw new InvalidOperationException(); 361throw new InvalidOperationException();
Microsoft.DotNet.Build.Tasks.FileCatalog (1)
CatalogBuilder.cs (1)
88throw new InvalidOperationException("Catalog must contain at least one entry.");
Microsoft.DotNet.Build.Tasks.Installers (14)
src\CreateWixBuildWixpack.cs (7)
119throw new InvalidOperationException("ProjectPath not defined in DefineConstants. Task cannot proceed."); 505throw new InvalidOperationException("Task not initialized. Run Execute() first."); 794throw new InvalidOperationException("Malformed <?if?> block."); 807throw new InvalidOperationException("Missing <?endif?> for <?if?> block."); 828throw new InvalidOperationException("Malformed <?elseif?> block."); 887if (tagEnd == -1) throw new InvalidOperationException($"Malformed <?{blockType}?> block."); 912throw new InvalidOperationException($"Missing <?endif?> for <?{blockType}?> block.");
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")
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.Build.Tasks.Workloads (6)
Msi\WixDocument.cs (1)
95throw new InvalidOperationException($"The specified component does not exist: {componentId}");
Msi\WixXmlExtensions.cs (5)
66throw new InvalidOperationException(string.Format(Strings.InvalidChildElement, "RegistryValue", element.Name.LocalName)); 99throw new InvalidOperationException(string.Format(Strings.InvalidChildElement, "RegistryKey", element.Name.LocalName)); 120throw new InvalidOperationException(string.Format(Strings.InvalidChildElement, "ComponentGroupRef", element.Name.LocalName)); 144throw new InvalidOperationException(string.Format(Strings.InvalidChildElement, "Directory", element.Name.LocalName)); 156throw new InvalidOperationException(string.Format(Strings.InvalidChildElement, "Directory", element.Name.LocalName));
Microsoft.DotNet.Cli.Definitions (5)
_generated\3\GlobalJsonSerializerContext.g.cs (2)
77throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 85throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
Commands\Test\TestCommandDefinition.cs (1)
64?? throw new InvalidOperationException(string.Format(CommandDefinitionStrings.CmdUnsupportedTestRunnerDescription, globalJsonRunnerName));
Help\HelpBuilder.Default.cs (2)
28_ => throw new InvalidOperationException("Symbol must be an Argument or Option.") 55_ => throw new InvalidOperationException()
Microsoft.DotNet.Cli.Telemetry (2)
_generated\21\TelemetryJsonContext.g.cs (2)
72throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 80throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
Microsoft.DotNet.Cli.Utils (5)
Command.cs (1)
231throw new InvalidOperationException(string.Format(
FileAccessRetrier.cs (1)
25throw new InvalidOperationException(errorMessage);
Muxer.cs (1)
31throw new InvalidOperationException(LocalizableStrings.UnableToLocateDotnetMultiplexer);
StreamForwarder.cs (2)
117throw new InvalidOperationException(LocalizableStrings.WriteLineForwarderSetPreviously); 125throw new InvalidOperationException(LocalizableStrings.AlreadyCapturingStream);
Microsoft.DotNet.HotReload.Watch (21)
AppModels\WebApplicationAppModel.cs (1)
46var targetFramework = clientProject.GetTargetFrameworkVersion() ?? throw new InvalidOperationException($"Project doesn't define {PropertyNames.TargetFrameworkMoniker}");
Aspire\AspireServiceFactory.cs (1)
244WorkingDirectory = Path.GetDirectoryName(projectLaunchInfo.ProjectPath) ?? throw new InvalidOperationException(),
Build\ProjectGraphFactory.cs (1)
46var attribute = typeof(VirtualProjectBuilder).Assembly.GetCustomAttribute<TargetFrameworkAttribute>() ?? throw new InvalidOperationException();
Context\EnvironmentOptions.cs (1)
78=> _muxerPath ?? throw new InvalidOperationException("SDK directory is required to determine muxer path.");
FileWatcher\ChangeKind.cs (1)
23_ => throw new InvalidOperationException()
HotReload\HotReloadDotNetWatcher.cs (3)
904throw new InvalidOperationException($"Unexpected change kind: {item.Kind}"); 939_ => throw new InvalidOperationException() 948_ => throw new InvalidOperationException()
HotReload\ProjectUpdatesBuilder.cs (4)
61throw new InvalidOperationException(); 210throw new InvalidOperationException($"Project '{project.FilePath}' (id = '{project.Id}') not found in project graph"); 301=> (Solution.GetProject(projectId) ?? throw new InvalidOperationException()).FilePath ?? throw new InvalidOperationException();
HotReload\RunningProjectsManager.cs (1)
394throw new InvalidOperationException("Main project can't be restarted.");
Process\ProcessRunner.cs (1)
213throw new InvalidOperationException("Process can't be started.");
src\sdk\src\Dotnet.Watch\HotReloadClient\DefaultHotReloadClient.cs (1)
139=> _capabilitiesTask ?? throw new InvalidOperationException();
src\sdk\src\Dotnet.Watch\HotReloadClient\Web\AbstractBrowserRefreshServer.cs (2)
71throw new InvalidOperationException("Server already started"); 82throw new InvalidOperationException("Server not started");
src\sdk\src\Dotnet.Watch\HotReloadClient\WebSocketClientTransport.cs (1)
171throw new InvalidOperationException("No active WebSocket connection from the client.");
UI\IReporter.cs (1)
52_ => throw new InvalidOperationException()
UI\PhysicalConsole.cs (1)
82throw new InvalidOperationException(error);
UI\RestartPrompt.cs (1)
43throw new InvalidOperationException();
Microsoft.DotNet.HotReload.WebAssembly.Browser (4)
_generated\9\WebAssemblyHotReloadJsonSerializerContext.g.cs (2)
84throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 92throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
WebAssemblyHotReload.cs (2)
78throw new InvalidOperationException("Hot Reload agent already initialized"); 132=> s_hotReloadAgent ?? (s_initialized ? throw new InvalidOperationException("Hot Reload agent not initialized") : null);
Microsoft.DotNet.InternalAbstractions (1)
DirectoryPath.cs (1)
52throw new InvalidOperationException(Value + " does not have parent directory.");
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.ProjectTools (8)
_generated\5\LaunchProfileJsonSerializerContext.g.cs (2)
76throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 84throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
src\sdk\src\Cli\Microsoft.DotNet.FileBasedPrograms\FileLevelDirectiveHelpers.cs (5)
556?? throw new InvalidOperationException($"Source file path '{sourcePath}' does not have a containing directory."); 664?? throw new InvalidOperationException($"Source file path '{sourcePath}' does not have a containing directory."); 801_ => throw new InvalidOperationException($"Unexpected include/exclude directive kind '{kind}'."), 811_ => throw new InvalidOperationException($"Unexpected {nameof(IncludeOrExcludeKind)} value '{Kind}'."), 821_ => throw new InvalidOperationException($"Unexpected {nameof(IncludeOrExcludeKind)} value '{Kind}'."),
src\sdk\src\Cli\Microsoft.DotNet.FileBasedPrograms\VirtualProjectBuilder.cs (1)
160throw new InvalidOperationException(FileBasedProgramsResources.EmptyTempPath);
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.TemplateLocator (8)
_generated\11\InstallStateJsonSerializerContext.g.cs (2)
77throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 85throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
_generated\3\WorkloadSetJsonSerializerContext.g.cs (2)
77throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 85throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
src\sdk\src\Resolvers\Microsoft.NET.Sdk.WorkloadManifestReader\SdkDirectoryWorkloadManifestProvider.cs (2)
278throw new InvalidOperationException(string.Format(Strings.WorkloadSetHasMissingManifests, _workloadSet.Version)); 334throw new InvalidOperationException(string.Format(Strings.WorkloadSetHasMissingManifests, _workloadSet.Version));
src\sdk\src\Resolvers\Microsoft.NET.Sdk.WorkloadManifestReader\WorkloadResolver.cs (1)
106throw new InvalidOperationException("Resolver was created without provider and cannot be refreshed");
src\sdk\src\Resolvers\Microsoft.NET.Sdk.WorkloadManifestReader\WorkloadSet.cs (1)
88throw new InvalidOperationException($"Workload set files in {path} defined the same manifest ({kvp.Key}) multiple times");
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.Extensions.AI (23)
ChatCompletion\ChatResponse{T}.cs (3)
63FailureReason.ResultDidNotContainJson => throw new InvalidOperationException("The response did not contain JSON to be deserialized."), 64FailureReason.DeserializationProducedNull => throw new InvalidOperationException("The deserialized response is null."), 65FailureReason.ResultDidNotContainDataProperty => throw new InvalidOperationException("The response did not contain the expected 'data' property."),
ChatRouting\FailoverChatClient.cs (2)
110throw new InvalidOperationException($"{nameof(SelectClientAsync)} returned null."); 179throw new InvalidOperationException($"{nameof(SelectClientAsync)} returned null.");
ChatRouting\SemanticRoutingChatClient.cs (7)
189throw new InvalidOperationException("The embedding generator returned null."); 192throw new InvalidOperationException("The embedding generator did not return one query embedding."); 198throw new InvalidOperationException( 320throw new InvalidOperationException("The embedding generator returned null."); 323throw new InvalidOperationException( 330throw new InvalidOperationException("Profile embeddings must not be empty."); 338throw new InvalidOperationException(
EmptyServiceProvider.cs (1)
24throw new InvalidOperationException($"No service for type '{serviceType}' and key '{serviceKey}' has been registered.");
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\OtelContext.g.cs (2)
77throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 85throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
Image\ImageGeneratorBuilder.cs (1)
55throw new InvalidOperationException(
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\EmptyCollections\EmptyReadOnlyList.cs (2)
55public T Current => throw new InvalidOperationException(); 56object IEnumerator.Current => throw new InvalidOperationException();
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (2)
398=> throw new InvalidOperationException(message); 410=> throw new InvalidOperationException(message, innerException);
SpeechToText\SpeechToTextClientBuilder.cs (1)
53throw new InvalidOperationException(
TextToSpeech\TextToSpeechClientBuilder.cs (1)
53throw new InvalidOperationException(
Throw.cs (1)
12new InvalidOperationException(serviceKey is null ?
Microsoft.Extensions.AI.Abstractions (13)
ChatRouting\RoutingChatClient.cs (2)
71throw new InvalidOperationException($"{nameof(SelectClientAsync)} returned null."); 88throw new InvalidOperationException($"{nameof(SelectClientAsync)} returned null.");
Contents\FunctionCallContent.cs (1)
97parsingException = new InvalidOperationException("Error parsing function call arguments.", ex);
Functions\AIFunctionFactory.cs (1)
1205static object ThrowIfNullResult(object? result) => result ?? throw new InvalidOperationException("Function returned null unexpectedly.");
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\JsonContext.g.cs (2)
78throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 86throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\JsonContextNoIndentation.g.cs (2)
78throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 86throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\EmptyCollections\EmptyReadOnlyList.cs (2)
55public T Current => throw new InvalidOperationException(); 56object IEnumerator.Current => throw new InvalidOperationException();
parent\parent\parent\eng\MSBuild\parent\parent\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 (39)
ChatCompletion\DelegatingChatClientTests.cs (1)
143: throw new InvalidOperationException("Unexpected call")
ChatRouting\RoutingChatClientTests.cs (1)
63var expected = new InvalidOperationException("failed");
Contents\FunctionCallContentTests.cs (1)
163var 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")
Files\DelegatingHostedFileClientTests.cs (2)
191: throw new InvalidOperationException("Unexpected call") 207: throw new InvalidOperationException("Unexpected call")
Generated\361d1da7f942c932\TestTypesContext.PocoWithRecursiveMembers.g.cs (2)
61Setter = static (obj, value) => throw new global::System.InvalidOperationException("Setting init-only properties is not supported in source generation mode."), 81Setter = static (obj, value) => throw new global::System.InvalidOperationException("Setting init-only properties is not supported in source generation mode."),
Generated\361d1da7f942c932\TestTypesContext.RecordWithOptionalParameters.g.cs (10)
61Setter = static (obj, value) => throw new global::System.InvalidOperationException("Setting init-only properties is not supported in source generation mode."), 81Setter = static (obj, value) => throw new global::System.InvalidOperationException("Setting init-only properties is not supported in source generation mode."), 103Setter = static (obj, value) => throw new global::System.InvalidOperationException("Setting init-only properties is not supported in source generation mode."), 123Setter = static (obj, value) => throw new global::System.InvalidOperationException("Setting init-only properties is not supported in source generation mode."), 143Setter = static (obj, value) => throw new global::System.InvalidOperationException("Setting init-only properties is not supported in source generation mode."), 163Setter = static (obj, value) => throw new global::System.InvalidOperationException("Setting init-only properties is not supported in source generation mode."), 183Setter = static (obj, value) => throw new global::System.InvalidOperationException("Setting init-only properties is not supported in source generation mode."), 205Setter = static (obj, value) => throw new global::System.InvalidOperationException("Setting init-only properties is not supported in source generation mode."), 225Setter = static (obj, value) => throw new global::System.InvalidOperationException("Setting init-only properties is not supported in source generation mode."), 245Setter = static (obj, value) => throw new global::System.InvalidOperationException("Setting init-only properties is not supported in source generation mode."),
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\Context.g.cs (2)
77throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 85throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\JsonContext.g.cs (2)
74throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 82throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\JsonContext.MyPoco.g.cs (3)
61Setter = static (obj, value) => throw new global::System.InvalidOperationException("Setting init-only properties is not supported in source generation mode."), 81Setter = static (obj, value) => throw new global::System.InvalidOperationException("Setting init-only properties is not supported in source generation mode."), 101Setter = static (obj, value) => throw new global::System.InvalidOperationException("Setting init-only properties is not supported in source generation mode."),
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\TestJsonSerializerContext.g.cs (2)
76throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 84throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\TestTypesContext.g.cs (2)
74throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 82throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\TestTypesContext.PocoWithEnums.g.cs (2)
61Setter = static (obj, value) => throw new global::System.InvalidOperationException("Setting init-only properties is not supported in source generation mode."), 81Setter = static (obj, value) => throw new global::System.InvalidOperationException("Setting init-only properties is not supported in source generation mode."),
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\TestTypesContext.SimpleRecord.g.cs (4)
61Setter = static (obj, value) => throw new global::System.InvalidOperationException("Setting init-only properties is not supported in source generation mode."), 81Setter = static (obj, value) => throw new global::System.InvalidOperationException("Setting init-only properties is not supported in source generation mode."), 103Setter = static (obj, value) => throw new global::System.InvalidOperationException("Setting init-only properties is not supported in source generation mode."), 123Setter = static (obj, value) => throw new global::System.InvalidOperationException("Setting init-only properties is not supported in source generation mode."),
Image\DelegatingImageGeneratorTests.cs (1)
102: throw new InvalidOperationException("Unexpected call")
SpeechToText\DelegatingSpeechToTextClientTests.cs (1)
144: throw new InvalidOperationException("Unexpected call")
TextToSpeech\DelegatingTextToSpeechClientTests.cs (1)
141: throw new InvalidOperationException("Unexpected call")
Microsoft.Extensions.AI.Evaluation (4)
CompositeEvaluator.cs (2)
53throw new InvalidOperationException( 150throw new InvalidOperationException(
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (2)
398=> throw new InvalidOperationException(message); 410=> throw new InvalidOperationException(message, innerException);
Microsoft.Extensions.AI.Evaluation.Console (7)
Commands\CleanCacheCommand.cs (1)
58throw new InvalidOperationException("Either --path or --endpoint must be specified");
Commands\CleanResultsCommand.cs (1)
62throw new InvalidOperationException("Either --path or --endpoint must be specified");
Commands\ReportCommand.cs (1)
72throw new InvalidOperationException("Either --path or --endpoint must be specified");
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (2)
398=> throw new InvalidOperationException(message); 410=> throw new InvalidOperationException(message, innerException);
Telemetry\DeviceIdHelper.cs (2)
132throw new InvalidOperationException(); 155throw new InvalidOperationException();
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)
234throw new InvalidOperationException($"Account number {accountNumber} is not valid."); 253throw new InvalidOperationException($"Order with ID {orderId} not found.");
ResultsTests.cs (2)
59throw new InvalidOperationException(); 99throw new InvalidOperationException();
Microsoft.Extensions.AI.Evaluation.NLP (2)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (2)
398=> throw new InvalidOperationException(message); 410=> throw new InvalidOperationException(message, innerException);
Microsoft.Extensions.AI.Evaluation.Quality (4)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\SerializerContext.g.cs (2)
77throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 85throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (2)
398=> throw new InvalidOperationException(message); 410=> throw new InvalidOperationException(message, innerException);
Microsoft.Extensions.AI.Evaluation.Reporting (8)
Formats\Html\HtmlReportWriter.cs (2)
79?? throw new InvalidOperationException("Failed to load HTML template."); 91throw new InvalidOperationException($"Placeholder '{SearchString}' not found in the HTML template.");
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\JsonContext.g.cs (2)
87throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 95throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
parent\parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (2)
398=> throw new InvalidOperationException(message); 410=> throw new InvalidOperationException(message, innerException);
ScenarioRun.cs (1)
151throw new InvalidOperationException(
Utilities\PathValidation.cs (1)
81throw new InvalidOperationException(
Microsoft.Extensions.AI.Evaluation.Reporting.Azure (4)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\JsonContext.g.cs (2)
87throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 95throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
parent\parent\parent\eng\MSBuild\parent\parent\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( 260throw new InvalidOperationException( 287throw new InvalidOperationException( 318throw new InvalidOperationException( 338throw new InvalidOperationException( 376throw new InvalidOperationException(
GroundednessProEvaluator.cs (1)
89throw new InvalidOperationException(
parent\parent\parent\eng\MSBuild\parent\parent\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 (4)
ImageGeneratingChatClientIntegrationTests.cs (1)
71chatClient ??= ChatClient ?? throw new InvalidOperationException("ChatClient is not initialized.");
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (2)
398=> throw new InvalidOperationException(message); 410=> throw new InvalidOperationException(message, innerException);
VerbatimMultiPartHttpHandler.cs (1)
68throw new InvalidOperationException("Boundary not found.");
Microsoft.Extensions.AI.OpenAI (9)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\OpenAIJsonContext.g.cs (2)
76throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 84throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
OpenAIHostedFileClient.cs (3)
131?? throw new InvalidOperationException("The container file upload response did not include a valid file ID."); 363throw new InvalidOperationException( 369throw new InvalidOperationException(
OpenAIImageGenerator.cs (1)
128throw new InvalidOperationException("Generated image does not contain a valid URI or byte array.");
OpenAIResponsesChatClient.cs (1)
2044throw new InvalidOperationException("Messages are not allowed when continuing a background response using a continuation token.");
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (2)
398=> throw new InvalidOperationException(message); 410=> throw new InvalidOperationException(message, innerException);
Microsoft.Extensions.AI.OpenAI.Tests (3)
IntegrationTestHelpers.cs (1)
28?? throw new InvalidOperationException("To use AzureOpenAI, set a value for OpenAI:Endpoint");
OpenAIRequestPoliciesTests.cs (1)
169throw new InvalidOperationException("captured");
ThrowUserAgentExceptionHandler.cs (1)
14throw new InvalidOperationException($"User-Agent header: {request.Headers.UserAgent}");
Microsoft.Extensions.AI.Stabilization.Tests (2)
Generated\361d1da7f942c932\AIContentSerializationRegressionContext.g.cs (2)
72throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 80throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
Microsoft.Extensions.AI.Templates.Tests (5)
DotNetNewCommand.cs (1)
34throw new InvalidOperationException($"A {nameof(DotNetNewCommand)} should specify a custom hive with '{nameof(WithCustomHive)}()'.");
TemplateExecutionTestClassFixtureBase.cs (1)
151throw new InvalidOperationException(
TestCommand.cs (1)
30throw new InvalidOperationException($"The {nameof(TestCommand)} did not specify an executable file name.");
WellKnownPaths.cs (2)
57throw new InvalidOperationException("Failed to establish root of the repository"); 70throw new InvalidOperationException($"Expected to find '{dotNetExeName}' at '{dotNetExePath}', but it was not found.");
Microsoft.Extensions.AI.Tests (68)
ChatCompletion\FunctionInvokingChatClientApprovalsTests.cs (2)
1432throw new InvalidOperationException("The inner client must not be called after the approved function requests termination."), 1443throw new InvalidOperationException("The inner client must not be called after the approved function requests termination."),
ChatCompletion\FunctionInvokingChatClientTests.cs (2)
1014AIFunctionFactory.Create(string () => throw new InvalidOperationException("Oh no!"), "Func1"), 1424throw new InvalidOperationException("Unexpected iteration");
ChatCompletion\OpenTelemetryChatClientTests.cs (1)
1017var expectedException = new InvalidOperationException("test exception message");
ChatRouting\FailoverChatClientTests.cs (23)
46var expected = new InvalidOperationException("selection failed"); 75var selectionException = new InvalidOperationException("selection failed"); 118var invocationException = new InvalidOperationException("invocation failed"); 119var selectionException = new InvalidOperationException("selection failed"); 147var invocationException = new InvalidOperationException("invocation failed"); 148var completionException = new InvalidOperationException("completion failed"); 173var invocationException = new InvalidOperationException("invocation failed"); 174var updateException = new InvalidOperationException("update failed"); 249throw new InvalidOperationException("failed"); 334var expected = new InvalidOperationException("failed"); 365GetResponseAsyncCallback = (_, _, _) => throw new InvalidOperationException("failed"), 417? throw new InvalidOperationException("transient") 437? throw new InvalidOperationException("transient") 460throw new InvalidOperationException($"failure {++calls}"), 540var failure = new InvalidOperationException("failed"); 569GetResponseAsyncCallback = (_, _, _) => throw new InvalidOperationException("failed"), 851GetStreamingResponseAsyncCallback = (_, _, _) => throw new InvalidOperationException("failed"), 874new ThrowingGetAsyncEnumeratorEnumerable(new InvalidOperationException("failed")), 894var currentException = new InvalidOperationException("current failed"); 930var failedStream = new ThrowingCurrentAsyncEnumerable(new InvalidOperationException("current failed")); 977var disposalException = new InvalidOperationException("dispose failed"); 1020exception: new InvalidOperationException("mid-stream")); 1178throw new InvalidOperationException(message);
ChatRouting\OrderedFailoverChatClientTests.cs (10)
35throw new InvalidOperationException("first failed"); 66? throw new InvalidOperationException("first failed") 75throw new InvalidOperationException("second failed"); 95throw new InvalidOperationException($"failure {calls}"); 112GetResponseAsyncCallback = (_, _, _) => throw new InvalidOperationException("first"), 116GetResponseAsyncCallback = (_, _, _) => throw new InvalidOperationException("second"), 135throw new InvalidOperationException("failed"); 167throw new InvalidOperationException("failed"); 240throw new InvalidOperationException("failed"); 301GetResponseAsyncCallback = (_, _, _) => throw new InvalidOperationException("failed"),
Embeddings\OpenTelemetryEmbeddingGeneratorTests.cs (1)
111var expectedException = new InvalidOperationException("test exception message");
EnumeratedOnceEnumerable.cs (1)
19throw new InvalidOperationException("This enumerable can only be enumerated once.");
Files\LoggingHostedFileClientTests.cs (5)
337throw new InvalidOperationException("upload failed"), 393throw new InvalidOperationException("download failed"), 422throw new InvalidOperationException("get failed"), 451throw new InvalidOperationException("delete failed"), 511throw new InvalidOperationException("iteration failed");
Files\OpenTelemetryHostedFileClientTests.cs (5)
271throw new InvalidOperationException("upload failed"), 313throw new InvalidOperationException("iteration failed"); 397throw new InvalidOperationException("download failed"), 432throw new InvalidOperationException("delete failed"), 467throw new InvalidOperationException("get info failed"),
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\CustomAIContentJsonContext.g.cs (2)
72throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 80throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\JsonContext.g.cs (2)
74throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 82throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\JsonContext2.g.cs (2)
77throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 85throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\TestJsonSerializerContext.g.cs (2)
72throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 80throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
Image\OpenTelemetryImageGeneratorTests.cs (1)
184var expectedException = new InvalidOperationException("test exception message");
Realtime\FunctionInvokingRealtimeClientTests.cs (3)
286new Func<string>(() => throw new InvalidOperationException("Something broke")), 324new Func<string>(() => throw new InvalidOperationException("Secret error info")), 519throw new InvalidOperationException($"Error #{callCount}");
Realtime\LoggingRealtimeClientTests.cs (3)
247throw new InvalidOperationException("Test error"); 324throw new InvalidOperationException("Test error"); 412throw new InvalidOperationException("Inject error");
Realtime\OpenTelemetryRealtimeClientTests.cs (1)
219throw new InvalidOperationException("Streaming error");
SpeechToText\OpenTelemetrySpeechToTextClientTests.cs (1)
168var expectedException = new InvalidOperationException("test exception message");
TextToSpeech\OpenTelemetryTextToSpeechClientTests.cs (1)
148var expectedException = new InvalidOperationException("test exception message");
Microsoft.Extensions.AmbientMetadata.Application (3)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\BindingExtensions.g.cs (1)
146throw new InvalidOperationException($"'ErrorOnUnknownConfiguration' was set on the provided BinderOptions, but the following properties were not found on the instance of {type}: {string.Join(", ", temp)}");
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (2)
398=> throw new InvalidOperationException(message); 410=> throw new InvalidOperationException(message, innerException);
Microsoft.Extensions.AmbientMetadata.Build (3)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\BindingExtensions.g.cs (1)
184throw new InvalidOperationException($"'ErrorOnUnknownConfiguration' was set on the provided BinderOptions, but the following properties were not found on the instance of {type}: {string.Join(", ", temp)}");
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (2)
398=> throw new InvalidOperationException(message); 410=> throw new InvalidOperationException(message, innerException);
Microsoft.Extensions.AsyncState (3)
AsyncState.cs (1)
74throw new InvalidOperationException("Context is not initialized");
parent\parent\parent\eng\MSBuild\parent\parent\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)
255throw new InvalidOperationException($"Maximum cache length ({MaximumPayloadBytes} bytes) exceeded");
Internal\DefaultHybridCache.Serialization.cs (1)
45throw 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)
130new InvalidOperationException("Task should not be accessed for non-shared instances")); 158private static CacheItem<T> ThrowUnexpectedCacheItem() => throw new InvalidOperationException("Unexpected cache item"); 403throw 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");
parent\parent\parent\eng\MSBuild\parent\parent\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)
133throw 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)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (2)
398=> throw new InvalidOperationException(message); 410=> throw new InvalidOperationException(message, innerException);
Microsoft.Extensions.Compliance.Redaction (10)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\BindingExtensions.g.cs (2)
122throw new InvalidOperationException($"'ErrorOnUnknownConfiguration' was set on the provided BinderOptions, but the following properties were not found on the instance of {type}: {string.Join(", ", temp)}"); 171throw new InvalidOperationException($"Failed to convert configuration value at '{getPath()}' to type '{typeof(int)}'.", exception);
parent\parent\parent\eng\MSBuild\parent\parent\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()})");
parent\parent\parent\eng\MSBuild\parent\parent\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()})");
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (2)
398=> throw new InvalidOperationException(message); 410=> throw new InvalidOperationException(message, innerException);
RedactorProvider.cs (1)
73throw new InvalidOperationException($"Couldn't find redactor of type {defaultRedactorType} in the dependency injection container.");
Microsoft.Extensions.Compliance.Testing (3)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\BindingExtensions.g.cs (1)
117throw new InvalidOperationException($"'ErrorOnUnknownConfiguration' was set on the provided BinderOptions, but the following properties were not found on the instance of {type}: {string.Join(", ", temp)}");
parent\parent\parent\eng\MSBuild\parent\parent\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)
240throw new InvalidOperationException(SR.Format(SR.Error_MissingConfig, 508throw new InvalidOperationException(SR.Format(SR.Error_FailedBinding, configValue, section.Path, type)); 563throw new InvalidOperationException(SR.Format(SR.Error_CannotActivateAbstractOrInterface, type)); 573throw new InvalidOperationException(SR.Format(SR.Error_MissingPublicInstanceConstructor, type)); 578throw new InvalidOperationException(SR.Format(SR.Error_MultipleParameterizedConstructors, type)); 588throw new InvalidOperationException(SR.Format(SR.Error_CannotBindToConstructorParameter, type, nameOfInvalidParameter)); 596throw new InvalidOperationException(SR.Format(SR.Error_ConstructorParametersDoNotMatchProperties, type, nameOfInvalidParameters)); 618throw new InvalidOperationException(SR.Format(SR.Error_FailedToActivate, type), ex); 621return instance ?? throw new InvalidOperationException(SR.Format(SR.Error_FailedToActivate, type)); 803throw new InvalidOperationException(SR.Format(SR.Error_GeneralErrorWhenBinding, 842throw new InvalidOperationException(SR.Format(SR.Error_GeneralErrorWhenBinding, 859throw new InvalidOperationException(SR.Format(SR.Error_UnsupportedMultidimensionalArray, type)); 898throw new InvalidOperationException(SR.Format(SR.Error_GeneralErrorWhenBinding, 969throw new InvalidOperationException(SR.Format(SR.Error_GeneralErrorWhenBinding, 1012error = new InvalidOperationException(SR.Format(SR.Error_FailedBinding, value, path, type), ex); 1028error = new InvalidOperationException(SR.Format(SR.Error_FailedBinding, value, path, type), ex); 1151throw new InvalidOperationException(SR.Format(SR.Error_ParameterBeingBoundToIsUnnamed, type)); 1172throw new InvalidOperationException(SR.Format(SR.Error_ParameterHasNoMatchingConfig, type, parameterName));
Microsoft.Extensions.Configuration.Binder.SourceGeneration (8)
Emitter\CoreBindingHelpers.cs (1)
345_ => throw new InvalidOperationException()
Parser\ConfigurationBinder.cs (2)
78_ => throw new InvalidOperationException() 130throw new InvalidOperationException();
Parser\DiagnosticDescriptors.cs (1)
77_ => throw new InvalidOperationException()
Specs\TypeIndex.cs (3)
20_ => throw new InvalidOperationException(), 28_ => throw new InvalidOperationException(), 37_ => throw new InvalidOperationException(),
src\runtime\src\libraries\Common\src\Roslyn\GetBestTypeByMetadataName.cs (1)
184_ => throw new InvalidOperationException("Unreachable"),
Microsoft.Extensions.Configuration.EnvironmentVariables (1)
EnvironmentVariablesConfigurationProvider.cs (1)
180throw new InvalidOperationException($"The variable name transformation returned null for environment variable name '{key}'.");
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.DataIngestion (4)
Chunkers\ElementsChunker.cs (1)
218=> throw new InvalidOperationException("Can't fit in the current chunk. Consider increasing max tokens per chunk.");
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (2)
398=> throw new InvalidOperationException(message); 410=> throw new InvalidOperationException(message, innerException);
Writers\VectorStoreWriter.cs (1)
56=> _vectorStoreCollection ?? throw new InvalidOperationException("The collection has not been initialized yet. Call WriteAsync first.");
Microsoft.Extensions.DataIngestion.Abstractions (2)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (2)
398=> throw new InvalidOperationException(message); 410=> throw new InvalidOperationException(message, innerException);
Microsoft.Extensions.DataIngestion.Markdig (2)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (2)
398=> throw new InvalidOperationException(message); 410=> throw new InvalidOperationException(message, innerException);
Microsoft.Extensions.DataIngestion.MarkItDown (4)
MarkItDownMcpReader.cs (1)
107throw new InvalidOperationException("Failed to convert document to markdown: unexpected response format from MCP server.");
MarkItDownReader.cs (1)
88throw new InvalidOperationException($"MarkItDown process failed with exit code {process.ExitCode}.");
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (2)
398=> throw new InvalidOperationException(message); 410=> throw new InvalidOperationException(message, innerException);
Microsoft.Extensions.DataIngestion.Tests (2)
Chunkers\SemanticSimilarityChunkerTests.cs (2)
91_ => throw new InvalidOperationException("Unexpected call count") 167_ => throw new InvalidOperationException($"Unexpected index: {index}")
Microsoft.Extensions.DependencyInjection (19)
ServiceLookup\CallSiteChain.cs (1)
24throw new InvalidOperationException(CreateCircularDependencyExceptionMessage(serviceIdentifier));
ServiceLookup\CallSiteFactory.cs (9)
279throw new InvalidOperationException(SR.Format(SR.AotCannotCreateEnumerableValueType, itemType)); 505throw new InvalidOperationException(SR.InvalidServiceDescriptor); 585throw new InvalidOperationException(SR.Format(SR.NoConstructorMatch, implementationType)); 691throw new InvalidOperationException(string.Join( 702throw new InvalidOperationException( 772throw new InvalidOperationException(SR.InvalidServiceKeyType); 812throw new InvalidOperationException(SR.Format(SR.CannotResolveService, 835throw new InvalidOperationException(SR.Format(SR.AotCannotCreateGenericValueType, serviceType, typeArg)); 957throw new InvalidOperationException(SR.ServiceDescriptorNotExist);
ServiceLookup\CallSiteRuntimeResolver.cs (1)
104throw new InvalidOperationException(
ServiceLookup\CallSiteValidator.cs (3)
26throw new InvalidOperationException( 31throw new InvalidOperationException( 56throw new InvalidOperationException(SR.Format(SR.ScopedInSingletonException,
ServiceLookup\ServiceProviderEngineScope.cs (1)
150throw new InvalidOperationException(SR.Format(SR.AsyncDisposableServiceDispose, TypeNameHelper.GetTypeDisplayName(disposableEntry)));
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)
253throw new InvalidOperationException($"Error while validating the service descriptor '{descriptor}': {e.Message}", e);
Microsoft.Extensions.DependencyInjection.Abstractions (21)
ActivatorUtilities.cs (11)
61throw new InvalidOperationException(SR.CannotCreateAbstractClasses); 167throw new InvalidOperationException(SR.Format(SR.MultipleCtorsFoundWithBestLength, instanceType, bestLength)); 394throw new InvalidOperationException(SR.Format(SR.UnableToResolveService, type, requiredBy)); 574throw new InvalidOperationException(SR.Format(SR.CtorNotLocated, instanceType)); 612throw new InvalidOperationException(SR.Format(SR.MultipleCtorsFound, instanceType)); 768throw new InvalidOperationException(SR.KeyedServicesNotSupported); 788throw new InvalidOperationException(SR.KeyedServicesNotSupported); 869throw new InvalidOperationException(SR.Format(SR.UnableToResolveService, _constructor.Parameters[index].ParameterType, _constructor.Info.DeclaringType)); 913throw new InvalidOperationException(SR.Format(SR.MultipleCtorsMarkedWithAttribute, nameof(ActivatorUtilitiesConstructorAttribute))); 918throw new InvalidOperationException(SR.Format(SR.MarkedCtorMissingArgumentTypes, nameof(ActivatorUtilitiesConstructorAttribute))); 1221throw new InvalidOperationException(SR.KeyedServicesNotSupported);
EmptyServiceProvider.cs (4)
102throw new InvalidOperationException(SR.Format(SR.KeyedServiceAnyKeyUsedToResolveService, nameof(IServiceProvider), nameof(IServiceScopeFactory))); 139throw new InvalidOperationException(SR.Format(SR.AotCannotCreateEnumerableValueType, itemType)); 149? new InvalidOperationException(SR.Format(SR.NoServiceRegistered, serviceType)) 150: new InvalidOperationException(SR.Format(SR.NoKeyedServiceRegistered, serviceType, serviceKey.GetType()));
ServiceCollection.cs (1)
124throw new InvalidOperationException(SR.ServiceCollectionReadOnly);
ServiceDescriptor.cs (1)
1077private 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)
parent\parent\parent\eng\MSBuild\parent\parent\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)
776throw 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)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (2)
398=> throw new InvalidOperationException(message); 410=> throw new InvalidOperationException(message, innerException);
Microsoft.Extensions.Diagnostics.HealthChecks (1)
src\aspnetcore\src\Shared\ValueStopwatch\ValueStopwatch.cs (1)
43throw new InvalidOperationException("An uninitialized, or 'default', ValueStopwatch cannot be used to get elapsed time.");
Microsoft.Extensions.Diagnostics.HealthChecks.Common (4)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\BindingExtensions.g.cs (2)
124throw new InvalidOperationException($"'ErrorOnUnknownConfiguration' was set on the provided BinderOptions, but the following properties were not found on the instance of {type}: {string.Join(", ", temp)}"); 173throw new InvalidOperationException($"Failed to convert configuration value at '{getPath()}' to type '{typeof(bool)}'.", exception);
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (2)
398=> throw new InvalidOperationException(message); 410=> throw new InvalidOperationException(message, innerException);
Microsoft.Extensions.Diagnostics.HealthChecks.ResourceUtilization (16)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\BindingExtensions.g.cs (4)
217throw new InvalidOperationException($"'ErrorOnUnknownConfiguration' was set on the provided BinderOptions, but the following properties were not found on the instance of {type}: {string.Join(", ", temp)}"); 266throw new InvalidOperationException($"Failed to convert configuration value '{value ?? "null"}' at '{path}' to type '{typeof(double)}'.", exception); 278throw new InvalidOperationException($"Failed to convert configuration value '{value ?? "null"}' at '{path}' to type '{typeof(global::System.TimeSpan)}'.", exception); 290throw new InvalidOperationException($"Failed to convert configuration value '{value ?? "null"}' at '{path}' to type '{typeof(bool)}'.", exception);
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\Validators.g.cs (5)
174throw new global::System.InvalidOperationException(MinMaxError); 179Minimum = ConvertValue(Minimum, culture) ?? throw new global::System.InvalidOperationException(MinMaxError); 180Maximum = ConvertValue(Maximum, culture) ?? throw new global::System.InvalidOperationException(MinMaxError); 185throw new global::System.InvalidOperationException("The maximum value '{Maximum}' must be greater than or equal to the minimum value '{Minimum}'."); 189throw new global::System.InvalidOperationException("Cannot use exclusive bounds when the maximum value is equal to the minimum value.");
parent\parent\parent\eng\MSBuild\parent\parent\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()})");
parent\parent\parent\eng\MSBuild\parent\parent\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()})");
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (2)
398=> throw new InvalidOperationException(message); 410=> throw new InvalidOperationException(message, innerException);
Microsoft.Extensions.Diagnostics.Probes (15)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\BindingExtensions.g.cs (3)
199throw new InvalidOperationException($"'ErrorOnUnknownConfiguration' was set on the provided BinderOptions, but the following properties were not found on the instance of {type}: {string.Join(", ", temp)}"); 248throw new InvalidOperationException($"Failed to convert configuration value at '{getPath()}' to type '{typeof(int)}'.", exception); 260throw new InvalidOperationException($"Failed to convert configuration value at '{getPath()}' to type '{typeof(global::System.TimeSpan)}'.", exception);
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\Validators.g.cs (5)
129throw new global::System.InvalidOperationException(MinMaxError); 134Minimum = ConvertValue(Minimum, culture) ?? throw new global::System.InvalidOperationException(MinMaxError); 135Maximum = ConvertValue(Maximum, culture) ?? throw new global::System.InvalidOperationException(MinMaxError); 140throw new global::System.InvalidOperationException("The maximum value '{Maximum}' must be greater than or equal to the minimum value '{Minimum}'."); 144throw new global::System.InvalidOperationException("Cannot use exclusive bounds when the maximum value is equal to the minimum value.");
parent\parent\parent\eng\MSBuild\parent\parent\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()})");
parent\parent\parent\eng\MSBuild\parent\parent\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()})");
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (2)
398=> throw new InvalidOperationException(message); 410=> throw new InvalidOperationException(message, innerException);
Microsoft.Extensions.Diagnostics.ResourceMonitoring (12)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\BindingExtensions.g.cs (3)
229throw new InvalidOperationException($"'ErrorOnUnknownConfiguration' was set on the provided BinderOptions, but the following properties were not found on the instance of {type}: {string.Join(", ", temp)}"); 278throw new InvalidOperationException($"Failed to convert configuration value at '{getPath()}' to type '{typeof(global::System.TimeSpan)}'.", exception); 290throw new InvalidOperationException($"Failed to convert configuration value at '{getPath()}' to type '{typeof(bool)}'.", exception);
parent\parent\parent\eng\MSBuild\parent\parent\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()})");
parent\parent\parent\eng\MSBuild\parent\parent\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()})");
parent\parent\parent\eng\MSBuild\parent\parent\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.Kubernetes (5)
KubernetesMetadata.cs (3)
40throw new InvalidOperationException($"Environment variable '{environmentVariablePrefix}LIMITS_MEMORY' is required and cannot be zero or missing."); 45throw new InvalidOperationException($"Environment variable '{environmentVariablePrefix}LIMITS_CPU' is required and cannot be zero or missing."); 67throw new InvalidOperationException($"Environment variable '{variableName}' contains invalid value '{value}'. Expected a non-negative integer.");
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (2)
398=> throw new InvalidOperationException(message); 410=> throw new InvalidOperationException(message, innerException);
Microsoft.Extensions.Diagnostics.ResourceMonitoring.Tests (4)
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.");
Microsoft.Extensions.Diagnostics.Testing (86)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\BindingExtensions.g.cs (80)
185throw new InvalidOperationException("Cannot create instance of type 'System.Reflection.Assembly' because it is missing a public instance constructor."); 211throw new InvalidOperationException("Cannot create instance of type 'System.Type' because it is missing a public instance constructor."); 224throw new InvalidOperationException("Cannot create instance of type 'System.Reflection.Module' because it is missing a public instance constructor."); 237throw new InvalidOperationException("Cannot create instance of type 'System.Type' because it is missing a public instance constructor."); 267throw new InvalidOperationException("Cannot create instance of type 'System.Reflection.MethodInfo' because it is missing a public instance constructor."); 280throw new InvalidOperationException("Cannot create instance of type 'System.Type' because it is missing a public instance constructor."); 293throw new InvalidOperationException("Cannot create instance of type 'System.Reflection.MethodInfo' because it is missing a public instance constructor."); 306throw new InvalidOperationException("Cannot create instance of type 'System.Reflection.MethodInfo' because it is missing a public instance constructor."); 319throw new InvalidOperationException("Cannot create instance of type 'System.Type' because it is missing a public instance constructor."); 332throw new InvalidOperationException("Cannot create instance of type 'System.Reflection.Module' because it is missing a public instance constructor."); 345throw new InvalidOperationException("Cannot create instance of type 'System.Type' because it is missing a public instance constructor."); 388throw new InvalidOperationException("Cannot create instance of type 'System.Type' because it is missing a public instance constructor."); 401throw new InvalidOperationException("Cannot create instance of type 'System.Type' because it is missing a public instance constructor."); 414throw new InvalidOperationException("Cannot create instance of type 'System.Reflection.Module' because it is missing a public instance constructor."); 427throw new InvalidOperationException("Cannot create instance of type 'System.Type' because it is missing a public instance constructor."); 457throw new InvalidOperationException("Cannot create instance of type 'System.Type' because it is missing a public instance constructor."); 470throw new InvalidOperationException("Cannot create instance of type 'System.Reflection.Module' because it is missing a public instance constructor."); 483throw new InvalidOperationException("Cannot create instance of type 'System.Type' because it is missing a public instance constructor."); 537throw new InvalidOperationException("Cannot create instance of type 'System.Reflection.MethodInfo' because it is missing a public instance constructor."); 550throw new InvalidOperationException("Cannot create instance of type 'System.Type' because it is missing a public instance constructor."); 563throw new InvalidOperationException("Cannot create instance of type 'System.Reflection.MethodInfo' because it is missing a public instance constructor."); 576throw new InvalidOperationException("Cannot create instance of type 'System.Type' because it is missing a public instance constructor."); 589throw new InvalidOperationException("Cannot create instance of type 'System.Reflection.Module' because it is missing a public instance constructor."); 602throw new InvalidOperationException("Cannot create instance of type 'System.Type' because it is missing a public instance constructor."); 661throw new InvalidOperationException("Cannot create instance of type 'System.Type' because it is missing a public instance constructor."); 674throw new InvalidOperationException("Cannot create instance of type 'System.Reflection.Module' because it is missing a public instance constructor."); 687throw new InvalidOperationException("Cannot create instance of type 'System.Type' because it is missing a public instance constructor."); 726throw new InvalidOperationException("Cannot create instance of type 'System.Reflection.Assembly' because it is missing a public instance constructor."); 739throw new InvalidOperationException("Cannot create instance of type 'System.Type' because it is missing a public instance constructor."); 752throw new InvalidOperationException("Cannot create instance of type 'System.Reflection.MethodBase' because it is missing a public instance constructor."); 765throw new InvalidOperationException("Cannot create instance of type 'System.Type' because it is missing a public instance constructor."); 771throw new InvalidOperationException("Cannot create instance of type 'System.Reflection.Binder' because it is missing a public instance constructor."); 790throw new InvalidOperationException("Cannot create instance of type 'System.Reflection.Module' because it is missing a public instance constructor."); 803throw new InvalidOperationException("Cannot create instance of type 'System.Type' because it is missing a public instance constructor."); 816throw new InvalidOperationException("Cannot create instance of type 'System.Runtime.InteropServices.StructLayoutAttribute' because one or more parameters cannot be bound to. Constructor parameters must have corresponding properties. Fields are not supported. Missing properties are: 'layoutKind'"); 833throw new InvalidOperationException("Cannot create instance of type 'System.Reflection.ConstructorInfo' because it is missing a public instance constructor."); 846throw new InvalidOperationException("Cannot create instance of type 'System.Type' because it is missing a public instance constructor."); 876throw new InvalidOperationException("Cannot create instance of type 'System.Reflection.MethodInfo' because it is missing a public instance constructor."); 889throw new InvalidOperationException("Cannot create instance of type 'System.Reflection.Module' because it is missing a public instance constructor."); 907throw new InvalidOperationException("Cannot create instance of type 'System.Reflection.Assembly' because it is missing a public instance constructor."); 920throw new InvalidOperationException("Cannot create instance of type 'System.Type' because it is missing a public instance constructor."); 933throw new InvalidOperationException("Cannot create instance of type 'System.Reflection.MethodBase' because it is missing a public instance constructor."); 946throw new InvalidOperationException("Cannot create instance of type 'System.Type' because it is missing a public instance constructor."); 952throw new InvalidOperationException("Cannot create instance of type 'System.Reflection.Binder' because it is missing a public instance constructor."); 971throw new InvalidOperationException("Cannot create instance of type 'System.Reflection.Module' because it is missing a public instance constructor."); 984throw new InvalidOperationException("Cannot create instance of type 'System.Type' because it is missing a public instance constructor."); 997throw new InvalidOperationException("Cannot create instance of type 'System.Runtime.InteropServices.StructLayoutAttribute' because one or more parameters cannot be bound to. Constructor parameters must have corresponding properties. Fields are not supported. Missing properties are: 'layoutKind'"); 1014throw new InvalidOperationException("Cannot create instance of type 'System.Reflection.ConstructorInfo' because it is missing a public instance constructor."); 1027throw new InvalidOperationException("Cannot create instance of type 'System.Type' because it is missing a public instance constructor."); 1045throw new InvalidOperationException("Cannot create instance of type 'System.Type' because it is missing a public instance constructor."); 1073throw new InvalidOperationException("Cannot create instance of type 'System.Reflection.MemberInfo' because it is missing a public instance constructor."); 1105throw new InvalidOperationException("Cannot create instance of type 'System.Type' because it is missing a public instance constructor."); 1118throw new InvalidOperationException("Cannot create instance of type 'System.Reflection.ConstructorInfo' because it is missing a public instance constructor."); 1150throw new InvalidOperationException("Cannot create instance of type 'System.Reflection.MemberInfo' because it is missing a public instance constructor."); 1163throw new InvalidOperationException("Cannot create instance of type 'System.Type' because it is missing a public instance constructor."); 1181throw new InvalidOperationException("Cannot create instance of type 'System.Reflection.ParameterInfo' because it is missing a public instance constructor."); 1194throw new InvalidOperationException("Cannot create instance of type 'System.Type' because it is missing a public instance constructor."); 1200throw new InvalidOperationException("Cannot create instance of type 'System.Reflection.ICustomAttributeProvider' because it is missing a public instance constructor."); 1216throw new InvalidOperationException("Cannot create instance of type 'System.Type' because it is missing a public instance constructor."); 1229throw new InvalidOperationException("Cannot create instance of type 'System.Reflection.Module' because it is missing a public instance constructor."); 1242throw new InvalidOperationException("Cannot create instance of type 'System.Type' because it is missing a public instance constructor."); 1260throw new InvalidOperationException("Cannot create instance of type 'System.Reflection.MethodInfo' because it is missing a public instance constructor."); 1278throw new InvalidOperationException("Cannot create instance of type 'System.TimeZoneInfo' because it is missing a public instance constructor."); 1291throw new InvalidOperationException("Cannot create instance of type 'System.TimeZoneInfo' because it is missing a public instance constructor."); 1309throw new InvalidOperationException("Cannot create instance of type 'System.TimeProvider' because it is missing a public instance constructor."); 1322throw new InvalidOperationException("Cannot create instance of type 'System.TimeZoneInfo' because it is missing a public instance constructor."); 1340throw new InvalidOperationException("Cannot create instance of type 'System.Reflection.MethodInfo' because it is missing a public instance constructor."); 1358throw new InvalidOperationException("Cannot create instance of type 'System.Reflection.MethodInfo' because it is missing a public instance constructor."); 1393throw new InvalidOperationException("Cannot create instance of type 'System.Func<FakeLogRecord, bool>' because one or more parameters cannot be bound to. Constructor parameters must have corresponding properties. Fields are not supported. Missing properties are: 'object'"); 1416throw new InvalidOperationException("Cannot create instance of type 'System.TimeProvider' because it is missing a public instance constructor."); 1430throw new InvalidOperationException("Cannot create instance of type 'System.Action<string>' because one or more parameters cannot be bound to. Constructor parameters must have corresponding properties. Fields are not supported. Missing properties are: 'object'"); 1444throw new InvalidOperationException("Cannot create instance of type 'System.Func<FakeLogRecord, string>' because one or more parameters cannot be bound to. Constructor parameters must have corresponding properties. Fields are not supported. Missing properties are: 'object'"); 1453throw new InvalidOperationException("Cannot create instance of type 'System.Reflection.CustomAttributeTypedArgument' because parameter 'value' has no matching config. Each parameter in the constructor that does not have a default value must have a corresponding config entry."); 1477throw new InvalidOperationException($"'ErrorOnUnknownConfiguration' was set on the provided BinderOptions, but the following properties were not found on the instance of {type}: {string.Join(", ", temp)}"); 1530throw new InvalidOperationException($"Failed to convert configuration value at '{getPath()}' to type '{typeof(T)}'.", exception); 1546throw new InvalidOperationException($"Failed to convert configuration value at '{getPath()}' to type '{typeof(bool)}'.", exception); 1558throw new InvalidOperationException($"Failed to convert configuration value at '{getPath()}' to type '{typeof(int)}'.", exception); 1571throw new InvalidOperationException($"Failed to convert configuration value at '{getPath()}' to type '{typeof(Guid)}'.", exception); 1589throw new InvalidOperationException($"Failed to convert configuration value at '{getPath()}' to type '{typeof(long)}'.", exception); 1602throw new InvalidOperationException($"Failed to convert configuration value at '{getPath()}' to type '{typeof(TimeSpan)}'.", exception);
Logging\FakeLogCollector.LogEnumeration.cs (2)
99get => field ?? throw new InvalidOperationException("Enumeration not started."); 107throw new InvalidOperationException("MoveNextAsync is already in progress. Concurrent calls are not allowed.");
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}.");
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (2)
398=> throw new InvalidOperationException(message); 410=> throw new InvalidOperationException(message, innerException);
Microsoft.Extensions.Diagnostics.Testing.Tests (1)
Logging\FakeLogCollectorTests.LogEnumeration.cs (1)
208throw new InvalidOperationException("Enumeration was supposed to be unbound.");
Microsoft.Extensions.DotNetDeltaApplier (1)
src\sdk\src\Dotnet.Watch\HotReloadAgent.Host\Listener.cs (1)
111throw new InvalidOperationException($"Unexpected payload type: {payloadType}");
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)
91throw 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.Embedded.Manifest.Task (4)
Entry.cs (4)
35throw new InvalidOperationException("Tried to add children to a file."); 40throw new InvalidOperationException($"An item with the name '{child.Name}' already exists."); 50throw new InvalidOperationException("Tried to get a directory from a file."); 59throw new InvalidOperationException("Tried to find a directory but found a file instead");
Microsoft.Extensions.FileProviders.Physical (3)
PhysicalDirectoryInfo.cs (2)
68throw new InvalidOperationException(SR.CannotCreateStream); 97_ => throw new InvalidOperationException(SR.UnexpectedFileSystemInfo)
PhysicalFileProvider.cs (1)
99throw new InvalidOperationException(SR.Format(SR.CannotModifyWhenFileWatcherInitialized, nameof(UsePollingFileWatcher)));
Microsoft.Extensions.FileSystemGlobbing (10)
Internal\PathSegments\WildcardPathSegment.cs (1)
27_ => throw new InvalidOperationException(SR.Format(SR.StringComparisonTypeShouldBeOrdinal, comparisonType)),
Internal\PatternContexts\PatternContextLinear.cs (1)
24throw new InvalidOperationException(SR.CannotTestFile);
Internal\PatternContexts\PatternContextLinearExclude.cs (1)
20throw new InvalidOperationException(SR.CannotTestDirectory);
Internal\PatternContexts\PatternContextLinearInclude.cs (2)
20throw new InvalidOperationException(SR.CannotDeclarePathSegment); 38throw new InvalidOperationException(SR.CannotTestDirectory);
Internal\PatternContexts\PatternContextRagged.cs (1)
23throw new InvalidOperationException(SR.CannotTestFile);
Internal\PatternContexts\PatternContextRaggedExclude.cs (1)
20throw new InvalidOperationException(SR.CannotTestDirectory);
Internal\PatternContexts\PatternContextRaggedInclude.cs (2)
21throw new InvalidOperationException(SR.CannotDeclarePathSegment); 43throw new InvalidOperationException(SR.CannotTestDirectory);
Util\StringComparisonHelper.cs (1)
18_ => throw new InvalidOperationException(SR.Format(SR.UnexpectedStringComparisonType, comparisonType))
Microsoft.Extensions.Hosting (5)
HostApplicationBuilder.cs (1)
236throw new InvalidOperationException(SR.BuildCalled);
HostBuilder.cs (2)
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)
parent\parent\parent\eng\MSBuild\parent\parent\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)
49throw 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 (10)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\BindingExtensions.g.cs (2)
124throw new InvalidOperationException($"'ErrorOnUnknownConfiguration' was set on the provided BinderOptions, but the following properties were not found on the instance of {type}: {string.Join(", ", temp)}"); 173throw new InvalidOperationException($"Failed to convert configuration value at '{getPath()}' to type '{typeof(bool)}'.", exception);
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\Validators.g.cs (5)
177throw new global::System.InvalidOperationException(MinMaxError); 182Minimum = ConvertValue(Minimum, culture) ?? throw new global::System.InvalidOperationException(MinMaxError); 183Maximum = ConvertValue(Maximum, culture) ?? throw new global::System.InvalidOperationException(MinMaxError); 188throw new global::System.InvalidOperationException("The maximum value '{Maximum}' must be greater than or equal to the minimum value '{Minimum}'."); 192throw new global::System.InvalidOperationException("Cannot use exclusive bounds when the maximum value is equal to the minimum value.");
Logging\Internal\LoggingOptionsConfigureOptions.cs (1)
138=> new($"Failed to convert configuration value at '{path}' to type '{type}'.", innerException);
parent\parent\parent\eng\MSBuild\parent\parent\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)
524var exception = new InvalidOperationException("test"); 981var exception = new InvalidOperationException("Test exception"); 1014Assert.Throws<NotSupportedException>(() => logger.LogRequestFailed(null, httpRequestMessage, null, new InvalidOperationException(), TimeSpan.Zero));
Microsoft.Extensions.Http.Polly (2)
PolicyHttpMessageHandler.cs (1)
183throw new InvalidOperationException(message);
src\aspnetcore\src\Shared\ValueStopwatch\ValueStopwatch.cs (1)
43throw new InvalidOperationException("An uninitialized, or 'default', ValueStopwatch cannot be used to get elapsed time.");
Microsoft.Extensions.Http.Resilience (23)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\BindingExtensions.g.cs (7)
602throw new InvalidOperationException($"'ErrorOnUnknownConfiguration' was set on the provided BinderOptions, but the following properties were not found on the instance of {type}: {string.Join(", ", temp)}"); 651throw new InvalidOperationException($"Failed to convert configuration value at '{getPath()}' to type '{typeof(global::System.TimeSpan)}'.", exception); 663throw new InvalidOperationException($"Failed to convert configuration value at '{getPath()}' to type '{typeof(int)}'.", exception); 679throw new InvalidOperationException($"Failed to convert configuration value at '{getPath()}' to type '{typeof(T)}'.", exception); 691throw new InvalidOperationException($"Failed to convert configuration value at '{getPath()}' to type '{typeof(double)}'.", exception); 704throw new InvalidOperationException($"Failed to convert configuration value at '{getPath()}' to type '{typeof(bool)}'.", exception); 717throw new InvalidOperationException($"Failed to convert configuration value at '{getPath()}' to type '{typeof(global::System.Uri)}'.", exception);
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\Validators.g.cs (7)
831throw new global::System.InvalidOperationException(MinMaxError); 841throw new global::System.InvalidOperationException(MinMaxError); 848Minimum = ConvertValue(Minimum, culture) ?? throw new global::System.InvalidOperationException(MinMaxError); 849Maximum = ConvertValue(Maximum, culture) ?? throw new global::System.InvalidOperationException(MinMaxError); 855throw new global::System.InvalidOperationException("The maximum value '{Maximum}' must be greater than or equal to the minimum value '{Minimum}'."); 859throw new global::System.InvalidOperationException("Cannot use exclusive bounds when the maximum value is equal to the minimum value."); 890throw new global::System.InvalidOperationException($"A value type {value.GetType()} that is not a TimeSpan or a string has been given. This might indicate a problem with the source generator.");
parent\parent\parent\eng\MSBuild\parent\parent\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()})");
parent\parent\parent\eng\MSBuild\parent\parent\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()})");
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (2)
398=> throw new InvalidOperationException(message); 410=> throw new InvalidOperationException(message, innerException);
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.");
Microsoft.Extensions.Http.Resilience.Tests (7)
BuildTransitive\GrpcNetClientFactoryVersionTargetTests.cs (2)
301using var process = Process.Start(processStartInfo) ?? throw new InvalidOperationException("Failed to start dotnet."); 435throw new InvalidOperationException("Failed to locate the repository root.");
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 (14)
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);
src\aspnetcore\src\Shared\ValueStopwatch\ValueStopwatch.cs (1)
43throw new InvalidOperationException("An uninitialized, or 'default', ValueStopwatch cannot be used to get elapsed time.");
UserManager.cs (4)
130throw new InvalidOperationException(Resources.StoreNotIProtectedUserStore); 134throw new InvalidOperationException(Resources.NoPersonalDataProtector); 976throw new InvalidOperationException(Resources.NullSecurityStamp); 2927throw new InvalidOperationException(Resources.NullSecurityStamp);
Microsoft.Extensions.Logging (1)
LoggerRuleSelector.cs (1)
58throw new InvalidOperationException(SR.MoreThanOneWildcard);
Microsoft.Extensions.Logging.Configuration (2)
_generated\0\BindingExtensions.g.cs (1)
80throw new InvalidOperationException($"Failed to convert configuration value '{value ?? "null"}' at '{path}' to type '{typeof(bool)}'.", exception);
LoggerFilterConfigureOptions.cs (1)
85throw new InvalidOperationException(SR.Format(SR.ValueNotSupported, value));
Microsoft.Extensions.Logging.Console (10)
_generated\0\BindingExtensions.g.cs (8)
280throw new InvalidOperationException("Cannot create instance of type 'System.Text.Encodings.Web.JavaScriptEncoder' because it is missing a public instance constructor."); 297throw new InvalidOperationException("Cannot create instance of type 'System.Text.Encodings.Web.JavaScriptEncoder' because it is missing a public instance constructor."); 318throw new InvalidOperationException("Cannot create instance of type 'System.Text.Encodings.Web.JavaScriptEncoder' because it is missing a public instance constructor."); 548throw new InvalidOperationException($"'ErrorOnUnknownConfiguration' was set on the provided BinderOptions, but the following properties were not found on the instance of {type}: {string.Join(", ", temp)}"); 570throw new InvalidOperationException($"Failed to convert configuration value '{value ?? "null"}' at '{path}' to type '{typeof(T)}'.", exception); 582throw new InvalidOperationException($"Failed to convert configuration value '{value ?? "null"}' at '{path}' to type '{typeof(bool)}'.", exception); 594throw new InvalidOperationException($"Failed to convert configuration value '{value ?? "null"}' at '{path}' to type '{typeof(int)}'.", exception); 606throw new InvalidOperationException($"Failed to convert configuration value '{value ?? "null"}' at '{path}' to type '{typeof(char)}'.", exception);
ConfigurationConsoleLoggerSettings.cs (2)
55throw new InvalidOperationException(message); 99throw new InvalidOperationException(message);
Microsoft.Extensions.Logging.EventLog (1)
_generated\0\BindingExtensions.g.cs (1)
130throw new InvalidOperationException($"'ErrorOnUnknownConfiguration' was set on the provided BinderOptions, but the following properties were not found on the instance of {type}: {string.Join(", ", temp)}");
Microsoft.Extensions.Logging.Generators (1)
src\runtime\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)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (2)
398=> throw new InvalidOperationException(message); 410=> throw new InvalidOperationException(message, innerException);
Microsoft.Extensions.Options (2)
OptionsBuilderExtensions.cs (1)
91throw new InvalidOperationException(
OptionsServiceCollectionExtensions.cs (1)
201throw new InvalidOperationException(
Microsoft.Extensions.Options.Contextual (2)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (2)
398=> throw new InvalidOperationException(message); 410=> throw new InvalidOperationException(message, innerException);
Microsoft.Extensions.Options.SourceGeneration (1)
src\runtime\src\libraries\Common\src\Roslyn\GetBestTypeByMetadataName.cs (1)
184_ => throw new InvalidOperationException("Unreachable"),
Microsoft.Extensions.Primitives (6)
ChangeToken.cs (2)
156throw new InvalidOperationException(SR.InvalidOperation_ConcurrentDisposableSet); 246throw new InvalidOperationException(SR.InvalidOperation_NullConsumerTask);
InplaceStringBuilder.cs (4)
47throw new InvalidOperationException(SR.Capacity_CannotChangeAfterWriteStarted); 91throw new InvalidOperationException(SR.Format(SR.Capacity_NotEnough, count, Capacity - _offset)); 113throw new InvalidOperationException(SR.Format(SR.Capacity_NotEnough, 1, Capacity - _offset)); 130throw new InvalidOperationException(SR.Format(SR.Capacity_NotUsedEntirely, Capacity, _offset));
Microsoft.Extensions.Resilience (2)
parent\parent\parent\eng\MSBuild\parent\parent\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.ServiceDiscovery (11)
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");
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (2)
398=> throw new InvalidOperationException(message); 410=> throw new InvalidOperationException(message, innerException);
parent\parent\Shared\FxPolyfills\Task.cs (1)
45throw new InvalidOperationException();
ServiceEndpointResolver.cs (1)
63throw new InvalidOperationException($"Unable to resolve endpoints for service {resolver.ServiceName}");
ServiceEndpointWatcher.cs (1)
325private 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.Abstractions (3)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (2)
398=> throw new InvalidOperationException(message); 410=> throw new InvalidOperationException(message, innerException);
parent\parent\Shared\FxPolyfills\Task.cs (1)
45throw new InvalidOperationException();
Microsoft.Extensions.ServiceDiscovery.Dns (5)
DnsServiceEndpointProvider.cs (1)
46throw new InvalidOperationException($"No DNS records were found for service '{ServiceName}' (DNS name: '{hostName}').");
FallbackDnsResolver.cs (1)
100return new InvalidOperationException(msg);
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (2)
398=> throw new InvalidOperationException(message); 410=> throw new InvalidOperationException(message, innerException);
Resolver\DnsResolver.cs (1)
859throw 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)
229throw new InvalidOperationException("throwing");
Microsoft.Extensions.ServiceDiscovery.Yarp (3)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (2)
398=> throw new InvalidOperationException(message); 410=> throw new InvalidOperationException(message, innerException);
ServiceDiscoveryDestinationResolver.cs (1)
121throw new InvalidOperationException($"None of the specified schemes ('{string.Join(", ", specifiedSchemes)}') are allowed by configuration.");
Microsoft.Extensions.Telemetry (22)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\BindingExtensions.g.cs (6)
386throw new InvalidOperationException("Cannot create instance of type 'Microsoft.Extensions.Diagnostics.Sampling.RandomProbabilisticSamplerFilterRule' because parameter 'probability' has no matching config. Each parameter in the constructor that does not have a default value must have a corresponding config entry."); 434throw new InvalidOperationException($"'ErrorOnUnknownConfiguration' was set on the provided BinderOptions, but the following properties were not found on the instance of {type}: {string.Join(", ", temp)}"); 483throw new InvalidOperationException($"Failed to convert configuration value at '{getPath()}' to type '{typeof(bool)}'.", exception); 495throw new InvalidOperationException($"Failed to convert configuration value at '{getPath()}' to type '{typeof(int)}'.", exception); 507throw new InvalidOperationException($"Failed to convert configuration value at '{getPath()}' to type '{typeof(double)}'.", exception); 523throw new InvalidOperationException($"Failed to convert configuration value at '{getPath()}' to type '{typeof(T)}'.", exception);
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\Validators.g.cs (5)
185throw new global::System.InvalidOperationException(MinMaxError); 190Minimum = ConvertValue(Minimum, culture) ?? throw new global::System.InvalidOperationException(MinMaxError); 191Maximum = ConvertValue(Maximum, culture) ?? throw new global::System.InvalidOperationException(MinMaxError); 196throw new global::System.InvalidOperationException("The maximum value '{Maximum}' must be greater than or equal to the minimum value '{Minimum}'."); 200throw new global::System.InvalidOperationException("Cannot use exclusive bounds when the maximum value is equal to the minimum value.");
Http\HttpRouteFormatter.cs (1)
151throw new InvalidOperationException(TelemetryCommonExtensions.UnsupportedEnumValueExceptionMessage);
Http\HttpRouteParser.cs (1)
259_ => throw new InvalidOperationException(TelemetryCommonExtensions.UnsupportedEnumValueExceptionMessage)
Logging\Import\LoggerRuleSelector.cs (1)
62throw new InvalidOperationException("Only one wildcard character is allowed in category name.");
parent\parent\parent\eng\MSBuild\parent\parent\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()})");
parent\parent\parent\eng\MSBuild\parent\parent\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()})");
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (2)
398=> throw new InvalidOperationException(message); 410=> throw new InvalidOperationException(message, innerException);
Sampling\LogSamplingRuleSelector.cs (1)
43throw new InvalidOperationException("Only one wildcard character is allowed in category name.");
Microsoft.Extensions.Telemetry.Abstractions (2)
parent\parent\parent\eng\MSBuild\parent\parent\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"); 845var exception = logException ? new InvalidOperationException() : null; 885var exception = logException ? new InvalidOperationException() : null; 914throw new InvalidOperationException($"Uknown state type: {stateType}"); 1075throw new InvalidOperationException($"{_name}-Error occurred while creating scope."); 1087throw new InvalidOperationException($"{_name}-Error occurred while checking if logger is enabled."); 1107throw 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)
parent\parent\parent\eng\MSBuild\parent\parent\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.ValidationsGenerator (3)
Emitters\ValidationsGenerator.InfoClasses.Emitter.cs (1)
47?? throw new InvalidOperationException($"Embedded template '{template}' was not found in the generator assembly.");
src\aspnetcore\src\Shared\RoslynUtils\SymbolExtensions.cs (1)
210_ => throw new InvalidOperationException("Unexpected symbol type: " + symbol)
src\aspnetcore\src\Shared\RoslynUtils\WellKnownTypes.cs (1)
104throw new InvalidOperationException($"Failed to resolve well-known type '{WellKnownTypeData.WellKnownTypeNames[index]}'.");
Microsoft.Extensions.VectorData.Abstractions (36)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (2)
398=> throw new InvalidOperationException(message); 410=> throw new InvalidOperationException(message, innerException);
ProviderServices\CollectionJsonModelBuilder.cs (1)
80throw new InvalidOperationException($"The key property for your provider must always have the reserved name '{Options.ReservedKeyStorageName}' and cannot be changed.");
ProviderServices\CollectionModel.cs (9)
134{ Count: 0 } => throw new InvalidOperationException($"The '{_recordType.Name}' type does not have any vector properties."), 135_ => throw new InvalidOperationException($"The '{_recordType.Name}' type has multiple vector properties, please specify your chosen property via options."), 159: throw new InvalidOperationException($"The property '{property.ModelName}' on '{_recordType.Name}' must have full text search indexing enabled."); 173{ Count: 0 } => throw new InvalidOperationException($"The '{_recordType.Name}' type does not have any text data properties that have full text indexing enabled."), 174_ => throw new InvalidOperationException($"The '{_recordType.Name}' type has multiple text data properties that have full text indexing enabled, please specify your chosen property via options."), 219_ => throw new InvalidOperationException("Invalid dictionary key expression") 222_ => throw new InvalidOperationException("Property selector lambda is invalid") 227throw new InvalidOperationException($"Property '{propertyName}' could not be found."); 232: throw new InvalidOperationException($"Property '{propertyName}' isn't of type '{typeof(TProperty).Name}'.");
ProviderServices\CollectionModelBuilder.cs (13)
125?? throw new InvalidOperationException($"Property '{property.ModelName}' not found on CLR type '{recordType.FullName}'."); 130throw new InvalidOperationException( 201throw new InvalidOperationException( 225throw new InvalidOperationException( 233?? throw new InvalidOperationException(VectorDataStrings.MissingTypeOnPropertyDefinition(definitionProperty!)); 437throw new InvalidOperationException(VectorDataStrings.DifferentEmbeddingTypeSpecifiedForNativelySupportedType(vectorProperty, userRequestedEmbeddingType)); 504throw new InvalidOperationException($"Property '{property.ModelName}' is being mapped to storage name '{property.StorageName}', but property '{otherproperty.ModelName}' is already mapped to the same storage name."); 554throw new InvalidOperationException(VectorDataStrings.UnsupportedVectorPropertyWithoutEmbeddingGenerator(vectorProperty)); 562throw new InvalidOperationException(IsVectorPropertyTypeValid(userRequestedEmbeddingType, out _) 567throw new InvalidOperationException(VectorDataStrings.IncompatibleEmbeddingGenerator(vectorProperty, vectorProperty.EmbeddingGenerator, supportedVectorTypes)); 573throw new InvalidOperationException($"Property '{vectorProperty.ModelName}' has unsupported embedding type '{vectorProperty.EmbeddingType.Name}'. Vector properties must be one of the supported types: {supportedVectorTypes2}."); 578throw new InvalidOperationException($"Vector property '{propertyModel.ModelName}' must have a positive number of dimensions."); 608throw new InvalidOperationException(
ProviderServices\Filter\FilterTranslatorBase.cs (2)
214throw new InvalidOperationException($"Property name '{modelName}' provided as part of the filter clause is not a valid property name."); 317throw new InvalidOperationException($"Cannot access member '{propertyInfo.Name}' on null object.");
ProviderServices\VectorPropertyModel.cs (6)
136? throw new InvalidOperationException($"No embedding generation is configured for property '{ModelName}'.") 146? throw new InvalidOperationException($"No embedding generation is configured for property '{ModelName}'.") 160: throw new InvalidOperationException($"Property '{ModelName}' was configured with an embedding generator accepting a string, but {v?.GetType().Name ?? "null"} was provided.")), 167: throw new InvalidOperationException($"Property '{ModelName}' was configured with an embedding generator accepting a {nameof(DataContent)}, but {v?.GetType().Name ?? "null"} was provided.")), 172_ => throw new InvalidOperationException( 191_ => throw new InvalidOperationException(
ProviderServices\VectorPropertyModel{TInput}.cs (2)
43: throw new InvalidOperationException($"Property '{ModelName}' was configured with an embedding generator accepting a {typeof(TInput).Name}, but {v?.GetType().Name ?? "null"} was provided.")), 46_ => throw new InvalidOperationException(
RecordDefinition\VectorStoreVectorProperty.cs (1)
100=> new(Name, Type ?? throw new InvalidOperationException(VectorDataStrings.MissingTypeOnPropertyDefinition(this)))
Microsoft.Extensions.VectorData.ConformanceTests (7)
ModelTests\NoVectorModelTests.cs (1)
98throw new InvalidOperationException("Data did not appear in the collection within the expected time.");
Support\TestStore.cs (2)
39get => _defaultVectorStore ?? throw new InvalidOperationException("Not initialized"); 161throw new InvalidOperationException("Data did not appear in the collection within the expected time.");
TypeTests\DataTypeTests.cs (4)
178TRecord result = await fixture.Collection.GetAsync(fixture.MainRecordKey) ?? throw new InvalidOperationException($"Record with key '{fixture.MainRecordKey}' was not found."); 211var dynamicResult = await dynamicCollection.GetAsync(fixture.MainRecordKey) ?? throw new InvalidOperationException($"Record with key '{fixture.MainRecordKey}' was not found."); 274?? throw new InvalidOperationException($"Property '{property.Name}' not found on record type '{typeof(TRecord).Name}'."); 330null => throw new InvalidOperationException($"Property '{property.Name}' has no type defined."),
Microsoft.Gen.BuildMetadata (1)
RoslynExtensions.cs (1)
111_ => throw new InvalidOperationException("Unreachable"),
Microsoft.Gen.BuildMetadata.Unit.Tests (2)
parent\parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\EmptyCollections\EmptyReadOnlyList.cs (2)
55public T Current => throw new InvalidOperationException(); 56object IEnumerator.Current => throw new InvalidOperationException();
Microsoft.Gen.ComplianceReports.Unit.Tests (2)
parent\parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\EmptyCollections\EmptyReadOnlyList.cs (2)
55public T Current => throw new InvalidOperationException(); 56object IEnumerator.Current => throw new InvalidOperationException();
Microsoft.Gen.ContextualOptions.Unit.Tests (2)
parent\parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\EmptyCollections\EmptyReadOnlyList.cs (2)
55public T Current => throw new InvalidOperationException(); 56object IEnumerator.Current => throw new InvalidOperationException();
Microsoft.Gen.Logging (1)
RoslynExtensions.cs (1)
111_ => throw new InvalidOperationException("Unreachable"),
Microsoft.Gen.Logging.Generated.Tests (6)
LogMethodTests.cs (6)
29=> throw new InvalidOperationException("Provider failed."); 167ArgTestExtensions.Method4(logger, new InvalidOperationException("A")); 173ArgTestExtensions.Method5(logger, new InvalidOperationException("A"), new InvalidOperationException("B")); 179ArgTestExtensions.Method6(logger, new InvalidOperationException("A"), 2); 185ArgTestExtensions.Method7(logger, 1, new InvalidOperationException("B"));
Microsoft.Gen.Logging.Unit.Tests (3)
CompilationHelper.cs (1)
60throw new InvalidOperationException();
parent\parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\EmptyCollections\EmptyReadOnlyList.cs (2)
55public T Current => throw new InvalidOperationException(); 56object IEnumerator.Current => throw new InvalidOperationException();
Microsoft.Gen.MetadataExtractor (1)
MetricDefinitionEmitter.cs (1)
143throw new InvalidOperationException($"An exception occurred during metric report generation {e.GetType()}:{e.Message}.");
Microsoft.Gen.MetadataExtractor.Unit.Tests (2)
parent\parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\EmptyCollections\EmptyReadOnlyList.cs (2)
55public T Current => throw new InvalidOperationException(); 56object IEnumerator.Current => throw new InvalidOperationException();
Microsoft.Gen.Metrics (1)
RoslynExtensions.cs (1)
111_ => throw new InvalidOperationException("Unreachable"),
Microsoft.Gen.Metrics.Unit.Tests (2)
parent\parent\parent\parent\eng\MSBuild\parent\parent\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)
parent\parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\EmptyCollections\EmptyReadOnlyList.cs (2)
55public T Current => throw new InvalidOperationException(); 56object IEnumerator.Current => throw new InvalidOperationException();
Microsoft.Interop.ComInterfaceGenerator (3)
ComMethodContext.cs (2)
86throw new InvalidOperationException("Cannot generate stubs for non-source available methods."); 106throw new InvalidOperationException("Cannot generate stubs for non-source available methods.");
src\runtime\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\runtime\src\libraries\Common\src\Roslyn\GetBestTypeByMetadataName.cs (1)
184_ => throw new InvalidOperationException("Unreachable"),
Microsoft.Interop.LibraryImportGenerator.Downlevel (1)
src\runtime\src\libraries\Common\src\Roslyn\GetBestTypeByMetadataName.cs (1)
184_ => throw new InvalidOperationException("Unreachable"),
Microsoft.Interop.SourceGeneration (10)
DiagnosticOr.cs (2)
36public override T Value => throw new InvalidOperationException(); 47public override ImmutableArray<DiagnosticInfo> Diagnostics => throw new InvalidOperationException();
GeneratorDiagnosticsBag.cs (1)
101throw new InvalidOperationException();
ManualTypeMarshallingHelper.cs (1)
57throw 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\runtime\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)
364throw new InvalidOperationException($"{dotNetObjectReference.GetType().Name} is already being tracked by a different instance of {nameof(JSRuntime)}." +
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 (6)
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 (4)
167throw new InvalidOperationException("Pixel data is unavailable."); 283throw new InvalidOperationException("Unsupported image format."); 306throw new InvalidOperationException($"Couldn't resize the image"); 452throw 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 (23)
Model\BpeOptions.cs (2)
54throw new InvalidOperationException($"The content of the vocabulary file '{vocabFile}' is not valid."); 86throw new InvalidOperationException($"Invalid merge file format at line: {lineNumber}");
Model\BPETokenizer.cs (13)
62throw new InvalidOperationException($"Unknown Token '{value}' was not present in '{nameof(Vocabulary)}'."); 161throw new InvalidOperationException("The vocabulary cannot be empty."); 173throw new InvalidOperationException("The merge entries cannot be null."); 179throw new InvalidOperationException($"Invalid merger file format"); 325throw new InvalidOperationException($"The beginning of sentence token '{beginningOfSentenceToken}' was not present in the vocabulary."); 336throw new InvalidOperationException($"The end of sentence token '{endOfSentenceToken}' was not present in the vocabulary."); 370throw new InvalidOperationException($"Trying to merge a token '{mergeValues.a}' which not exist in the vocabulary."); 375throw new InvalidOperationException($"Trying to merge a token '{mergeValues.b}' which not exist in the vocabulary."); 380throw 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."); 386throw new InvalidOperationException($"Trying to merge a token '{newToken}' which not exist in the vocabulary."); 1167throw new InvalidOperationException($"Invalid merger file format at line: {lineNumber}"); 1278throw new InvalidOperationException($"Unknown Token Out Of Vocabulary."); 1287throw 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); 1319throw new InvalidOperationException($"The tokenizer data file {tiktokenConfiguration.PackageName}.dll could not be loaded. Please reference the package {tiktokenConfiguration.PackageName} in your project.");
ModelSourceGenerationContext.g.cs (2)
67throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 75throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
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)
964throw 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.Build.Containers (3)
ImageConfig.cs (1)
348throw new InvalidOperationException("Base image configuration should contain a 'rootfs' node.");
Layer.cs (1)
289throw new InvalidOperationException("The previous pax header has not been completely written.");
LocalDaemons\ContainerArchive.cs (1)
261=> image.ImageSha ?? throw new InvalidOperationException("An image SHA is required to create a local container archive.");
Microsoft.NET.Build.Tasks (15)
_generated\13\WorkloadSetJsonSerializerContext.g.cs (2)
77throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 85throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
_generated\21\InstallStateJsonSerializerContext.g.cs (2)
77throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 85throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
_generated\7\SdkVulnerabilitySummaryContext.g.cs (2)
72throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 80throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
NugetContentAssetPreprocessor.cs (1)
26throw new InvalidOperationException(Strings.AssetPreprocessorMustBeConfigured);
ProcessFrameworkReferences.cs (1)
1111throw new InvalidOperationException();
ResolveAppHosts.cs (1)
99throw new InvalidOperationException("Multiple KnownAppHostPack items applied to the specified target framework, which is not supposed to happen");
ResolvedFile.cs (1)
82throw new InvalidOperationException($"Unrecognized AssetType '{assetType}' for {SourcePath}");
RuntimePackAssetInfo.cs (1)
51throw new InvalidOperationException("Unexpected asset type: " + item.GetMetadata(MetadataKeys.AssetType));
src\sdk\src\Resolvers\Microsoft.NET.Sdk.WorkloadManifestReader\SdkDirectoryWorkloadManifestProvider.cs (2)
278throw new InvalidOperationException(string.Format(Strings.WorkloadSetHasMissingManifests, _workloadSet.Version)); 334throw new InvalidOperationException(string.Format(Strings.WorkloadSetHasMissingManifests, _workloadSet.Version));
src\sdk\src\Resolvers\Microsoft.NET.Sdk.WorkloadManifestReader\WorkloadResolver.cs (1)
106throw new InvalidOperationException("Resolver was created without provider and cannot be refreshed");
src\sdk\src\Resolvers\Microsoft.NET.Sdk.WorkloadManifestReader\WorkloadSet.cs (1)
88throw new InvalidOperationException($"Workload set files in {path} defined the same manifest ({kvp.Key}) multiple times");
Microsoft.NET.HostModel (10)
Bundle\Bundler.cs (1)
394throw new InvalidOperationException("The single-file bundle was unable to be created. This is likely because the bundled content is too large.");
Bundle\Manifest.cs (1)
99throw new InvalidOperationException("It is forbidden to change Manifest state after it was written or BundleId was obtained.");
MachO\BinaryFormat\Blobs\EmbeddedSignatureBlob.cs (1)
165throw new InvalidOperationException($"{magic} blob not found.");
MachO\BinaryFormat\Blobs\SuperBlob.cs (3)
68throw new InvalidOperationException("Blobs and blob indices count must match."); 78throw new InvalidOperationException("Blob size cannot be zero."); 82throw new InvalidOperationException($"Blob index offset {blobidx.Offset} does not match expected offset {expectedBlobOffset}.");
MachO\MachObjectFile.cs (2)
177throw new InvalidOperationException("Cannot adjust headers for a Mach-O file with an existing code signature."); 456throw new InvalidOperationException("Mach Object does not have enough space for the code signature load command");
ResourceUpdater.cs (2)
212throw new InvalidOperationException("Cannot add section header"); 330throw new InvalidOperationException(
Microsoft.Net.Http.Headers (1)
HeaderUtilities.cs (1)
724throw new InvalidOperationException("The object cannot be modified because it is read-only.");
Microsoft.NET.Sdk.BlazorWebAssembly.Tasks (26)
BrotliCompress.cs (1)
47throw new InvalidOperationException("DOTNET_HOST_PATH is not set");
src\sdk\src\StaticWebAssetsSdk\Tasks\Data\StaticWebAsset.cs (17)
481throw new InvalidOperationException( 938throw new InvalidOperationException($"Unknown source type '{SourceType}' for '{Identity}'."); 943throw new InvalidOperationException($"The '{nameof(SourceId)}' for the asset must be defined for '{Identity}'."); 948throw new InvalidOperationException($"The '{nameof(ContentRoot)}' for the asset must be defined for '{Identity}'."); 953throw new InvalidOperationException($"The '{nameof(BasePath)}' for the asset must be defined for '{Identity}'."); 958throw new InvalidOperationException($"The '{nameof(RelativePath)}' for the asset must be defined for '{Identity}'."); 963throw new InvalidOperationException($"The '{nameof(OriginalItemSpec)}' for the asset must be defined for '{Identity}'."); 973throw new InvalidOperationException($"Unknown Asset kind '{AssetKind}' for '{Identity}'."); 983throw new InvalidOperationException($"Unknown Asset mode '{AssetMode}' for '{Identity}'."); 993throw new InvalidOperationException($"Unknown Asset role '{AssetRole}' for '{Identity}'."); 998throw new InvalidOperationException($"Related asset for '{AssetRole}' asset '{Identity}' is not defined."); 1003throw new InvalidOperationException($"Alternative asset '{Identity}' does not define an asset trait name or value."); 1008throw new InvalidOperationException($"Fingerprint for '{Identity}' is not defined."); 1013throw new InvalidOperationException($"Integrity for '{Identity}' is not defined."); 1018throw new InvalidOperationException($"File length for '{Identity}' is not defined."); 1023throw new InvalidOperationException($"Last write time for '{Identity}' is not defined."); 1703throw new InvalidOperationException($"No file exists for the asset at either location '{identity}' or '{originalItemSpec}'.");
src\sdk\src\StaticWebAssetsSdk\Tasks\Data\StaticWebAssetGroup.cs (2)
52throw new InvalidOperationException("A StaticWebAssetGroup is missing a required Name."); 57throw new InvalidOperationException($"Group '{group.Name}' is missing a required SourceId.");
src\sdk\src\StaticWebAssetsSdk\Tasks\Data\StaticWebAssetPathPattern.cs (6)
114throw new InvalidOperationException($"Invalid relative path '{rawPathMemory}' for asset '{assetIdentity}'. Missing ']' token."); 118throw new InvalidOperationException($"Invalid token expression '{rawPathMemory}'. Missing ']' token."); 189throw new InvalidOperationException($"Invalid token expression '{tokenExpression}'. Missing '}}' token."); 307throw new InvalidOperationException($"Token '{missingValue}' not provided for '{RawPattern}'."); 608throw new InvalidOperationException($"Token 'fingerprint' not provided for '{fileNamePattern}'."); 632throw new InvalidOperationException($"Unsupported token '{tokenName}' in '{fileNamePattern}'.");
Microsoft.NET.Sdk.Publish.Tasks (3)
MsDeploy\CommonUtility.cs (2)
1161throw new InvalidOperationException(errMessage); 1847throw new InvalidOperationException(string.Format(CultureInfo.CurrentCulture, Resources.VSMSDEPLOY_MSDEPLOYASSEMBLYLOAD_FAIL, task.ToString()));
MsDeploy\VsMSDeployObject.cs (1)
212throw new InvalidOperationException("UnknowLinkExtension");
Microsoft.NET.Sdk.Razor.Tasks (1)
src\sdk\src\RazorSdk\Tool\ServerProtocol\ServerResponse.cs (1)
122throw new InvalidOperationException("Received invalid response type from server.");
Microsoft.NET.Sdk.StaticWebAssets.Tasks (49)
_generated\29\StaticWebAssetsJsonSerializerContext.g.cs (2)
75throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 83throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
_generated\42\DefineStaticWebAssetsSerializerContext.g.cs (2)
89throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 97throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
_generated\49\ImportMapSerializerContext.g.cs (2)
72throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 80throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
ApplyCompressionNegotiation.cs (3)
333throw new InvalidOperationException($"Related asset not found for compressed asset: {compressedAsset.Identity}"); 339throw new InvalidOperationException($"Endpoints not found for compressed asset: {compressedAsset.Identity}"); 345throw new InvalidOperationException($"Endpoints not found for related asset: {relatedAsset.Identity}");
Compression\BrotliCompress.cs (1)
38throw new InvalidOperationException("DOTNET_HOST_PATH is not set");
Data\ContentTypeProvider.cs (1)
469throw new InvalidOperationException("Matched pattern but no mapping found.");
Data\StaticAssetsManifest.cs (3)
91throw new InvalidOperationException($"Invalid manifest version. Expected manifest version '1' and found version '{manifest.Version}'."); 106throw new InvalidOperationException($"Invalid manifest version. Expected manifest version '1' and found version '{manifest.Version}'."); 117throw new InvalidOperationException($"Invalid manifest version. Expected manifest version '1' and found version '{manifest.Version}'.");
Data\StaticWebAsset.cs (17)
481throw new InvalidOperationException( 938throw new InvalidOperationException($"Unknown source type '{SourceType}' for '{Identity}'."); 943throw new InvalidOperationException($"The '{nameof(SourceId)}' for the asset must be defined for '{Identity}'."); 948throw new InvalidOperationException($"The '{nameof(ContentRoot)}' for the asset must be defined for '{Identity}'."); 953throw new InvalidOperationException($"The '{nameof(BasePath)}' for the asset must be defined for '{Identity}'."); 958throw new InvalidOperationException($"The '{nameof(RelativePath)}' for the asset must be defined for '{Identity}'."); 963throw new InvalidOperationException($"The '{nameof(OriginalItemSpec)}' for the asset must be defined for '{Identity}'."); 973throw new InvalidOperationException($"Unknown Asset kind '{AssetKind}' for '{Identity}'."); 983throw new InvalidOperationException($"Unknown Asset mode '{AssetMode}' for '{Identity}'."); 993throw new InvalidOperationException($"Unknown Asset role '{AssetRole}' for '{Identity}'."); 998throw new InvalidOperationException($"Related asset for '{AssetRole}' asset '{Identity}' is not defined."); 1003throw new InvalidOperationException($"Alternative asset '{Identity}' does not define an asset trait name or value."); 1008throw new InvalidOperationException($"Fingerprint for '{Identity}' is not defined."); 1013throw new InvalidOperationException($"Integrity for '{Identity}' is not defined."); 1018throw new InvalidOperationException($"File length for '{Identity}' is not defined."); 1023throw new InvalidOperationException($"Last write time for '{Identity}' is not defined."); 1703throw new InvalidOperationException($"No file exists for the asset at either location '{identity}' or '{originalItemSpec}'.");
Data\StaticWebAssetGroup.cs (2)
52throw new InvalidOperationException("A StaticWebAssetGroup is missing a required Name."); 57throw new InvalidOperationException($"Group '{group.Name}' is missing a required SourceId.");
Data\StaticWebAssetPathPattern.cs (6)
114throw new InvalidOperationException($"Invalid relative path '{rawPathMemory}' for asset '{assetIdentity}'. Missing ']' token."); 118throw new InvalidOperationException($"Invalid token expression '{rawPathMemory}'. Missing ']' token."); 189throw new InvalidOperationException($"Invalid token expression '{tokenExpression}'. Missing '}}' token."); 307throw new InvalidOperationException($"Token '{missingValue}' not provided for '{RawPattern}'."); 608throw new InvalidOperationException($"Token 'fingerprint' not provided for '{fileNamePattern}'."); 632throw new InvalidOperationException($"Unsupported token '{tokenName}' in '{fileNamePattern}'.");
DefineStaticWebAssets.Cache.cs (1)
141throw new InvalidOperationException($"Failed to deserialize cache from {manifestPath}");
FilterStaticWebAssetEndpoints.cs (1)
153throw new InvalidOperationException($"Unknown criteria type {criteria.Type}");
FingerprintPatternMatcher.cs (1)
72throw new InvalidOperationException($"No expression found for pattern '{matchResult.Pattern}'");
OverrideHtmlAssetPlaceholders.cs (1)
272throw new InvalidOperationException($"The static asset '{resource.Label}' is already mapped to {value.Url}.");
UpdateStaticWebAssetEndpoints.cs (5)
108throw new InvalidOperationException($"Unknown operation {operation.Type}"); 149throw new InvalidOperationException($"Unknown target {operation.Target}"); 251throw new InvalidOperationException($"Unknown target {operation.Target}"); 307throw new InvalidOperationException($"Unknown target {operation.Target}"); 346throw new InvalidOperationException($"Unknown target {operation.Target}");
Utils\Globbing\GlobNode.cs (1)
106_ => throw new InvalidOperationException(),
Microsoft.NET.Sdk.WorkloadManifestReader (8)
_generated\11\InstallStateJsonSerializerContext.g.cs (2)
77throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 85throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
_generated\3\WorkloadSetJsonSerializerContext.g.cs (2)
77throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 85throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
SdkDirectoryWorkloadManifestProvider.cs (2)
278throw new InvalidOperationException(string.Format(Strings.WorkloadSetHasMissingManifests, _workloadSet.Version)); 334throw new InvalidOperationException(string.Format(Strings.WorkloadSetHasMissingManifests, _workloadSet.Version));
WorkloadResolver.cs (1)
106throw new InvalidOperationException("Resolver was created without provider and cannot be refreshed");
WorkloadSet.cs (1)
88throw new InvalidOperationException($"Workload set files in {path} defined the same manifest ({kvp.Key}) multiple times");
Microsoft.NET.Sdk.WorkloadMSBuildSdkResolver (1)
CachingWorkloadResolver.cs (1)
91throw new InvalidOperationException("Unknown resolutionResult type: " + GetType());
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.Private.Windows.Core (14)
System\DisposalTracking.cs (1)
57throw new InvalidOperationException($"Did not dispose `{GetFriendlyTypeName(GetType())}`. Originating stack:\n{_originatingStack}");
System\Private\Windows\BinaryFormat\BinaryFormatWriter.cs (1)
552_ => 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\Nrbf\SerializationRecordExtensions.cs (2)
336_ => throw new InvalidOperationException() 423_ => throw new InvalidOperationException()
System\Private\Windows\Ole\TypeBinder.cs (1)
81throw new InvalidOperationException();
System\Value.cs (1)
84private static void ThrowInvalidOperation() => throw new InvalidOperationException();
Windows\Win32\Graphics\GdiPlus\StatusExtensions.cs (2)
37return new InvalidOperationException(SR.GdiplusObjectBusy); 45return new InvalidOperationException(SR.GdiplusWrongState);
Windows\Win32\System\Com\SafeArrayScope.cs (1)
129throw new InvalidOperationException("Unable to create SAFEARRAY");
Microsoft.TemplateEngine.Cli (9)
Commands\create\TemplateCommandArgs.cs (1)
116throw new InvalidOperationException($"Parameter {parameterName} is not defined for {Template.Identity}.");
JExtensions.cs (1)
223?? throw new InvalidOperationException($"Failed to parse JSON from '{path}'.");
NuGet\NugetApiManager.cs (2)
48?? throw new InvalidOperationException($"The source '{sourceFeed.Source}' does not provide {nameof(PackageMetadataResource)}."); 92?? throw new InvalidOperationException($"The source '{repository.PackageSource.Source}' does not provide {nameof(PackageSearchResource)}.");
PostActionProcessors\AddJsonPropertyPostActionProcessor.cs (1)
252throw new InvalidOperationException();
src\sdk\artifacts\obj\Microsoft.TemplateEngine.Cli\External\Wcwidth\Tables\WideTable.Generated.cs (1)
39_ => throw new InvalidOperationException("Unknown Unicode version"),
src\sdk\artifacts\obj\Microsoft.TemplateEngine.Cli\External\Wcwidth\Tables\ZeroTable.Generated.cs (1)
39_ => throw new InvalidOperationException("Unknown Unicode version"),
TemplatePackageCoordinator.cs (1)
313throw new InvalidOperationException($"Unexpected result received from {nameof(provider.GetLatestVersionsAsync)} method: returned result where {nameof(CheckUpdateResult.TemplatePackage)} is null, or {nameof(CheckUpdateResult.LatestVersion)} is null.");
TemplatePackageDisplay.cs (1)
207throw new InvalidOperationException($"Unexpected result: {result.GetType()}");
Microsoft.TemplateEngine.Core (3)
Util\Orchestrator.cs (1)
256?? throw new InvalidOperationException("At least one of [runner] or [fallback] cannot be null");
VariableCollection.cs (2)
106throw new InvalidOperationException("Key already added"); 122throw new InvalidOperationException("Key already added");
Microsoft.TemplateEngine.Edge (29)
_generated\17\SettingsStoreJsonSerializerContext.g.cs (2)
75throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 83throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
_generated\43\TemplateCacheJsonSerializerContext.g.cs (2)
75throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 83throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
_generated\7\GlobalSettingsJsonSerializerContext.g.cs (2)
75throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 83throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
BuiltInManagedProvider\GlobalSettings.cs (4)
45throw new InvalidOperationException("Lock is already taken."); 111throw new InvalidOperationException(); 123throw new InvalidOperationException($"Before calling {nameof(SetInstalledTemplatePackagesAsync)}, {nameof(LockAsync)} must be called."); 151throw new InvalidOperationException();
BuiltInManagedProvider\GlobalSettingsTemplatePackageProvider.cs (3)
248throw new InvalidOperationException($"{nameof(updateResult.TemplatePackage)} cannot be null when {nameof(updateResult.Success)} is 'true'"); 288throw new InvalidOperationException($"{nameof(uninstallResult.ErrorMessage)} cannot be null when {nameof(uninstallResult.Success)} is 'true'"); 329throw new InvalidOperationException($"{nameof(installResult.TemplatePackage)} cannot be null when {nameof(installResult.Success)} is 'true'");
Installers\NuGet\NuGetInstaller.cs (1)
377throw new InvalidOperationException($"{nameof(uninstallResult.ErrorMessage)} cannot be null when {nameof(uninstallResult.Success)} is 'true'");
Settings\ComponentManager.cs (1)
91throw new InvalidOperationException($"{nameof(component)} cannot be null when {nameof(TryGetComponent)} is 'true'");
Settings\Scanner.cs (1)
114throw new InvalidOperationException($"{nameof(mountPoint)} cannot be null when {nameof(factory.TryMount)} is 'true'");
Settings\TemplatePackageManager.cs (1)
244throw new InvalidOperationException(string.Format(LocalizableStrings.TemplatePackageManager_Error_FailedToFindPackage, packageIdentifier));
src\sdk\src\TemplateEngine\Shared\JExtensions.cs (5)
445?? throw new InvalidOperationException("Failed to parse JSON from file."); 454?? throw new InvalidOperationException($"Failed to parse JSON from '{path}'."); 577?? throw new InvalidOperationException("Failed to parse JSON string as JsonObject."); 600?? throw new InvalidOperationException("Failed to round-trip object to JsonObject."); 609?? throw new InvalidOperationException("Failed to deep clone JsonObject.");
Template\ParameterSetBuilder.cs (2)
166throw new InvalidOperationException($"{nameof(resolvedValue)} cannot be null when {nameof(valueResolutionError)} is 'false'."); 183throw new InvalidOperationException($"{nameof(resolvedValue)} cannot be null when {nameof(valueResolutionError)} is 'false'.");
Template\TemplateCreator.cs (4)
164throw new InvalidOperationException($"{nameof(effectParams)} cannot be null when {nameof(TryCreateParameterSet)} returns 'true'"); 199throw new InvalidOperationException($"{nameof(creationParams)} cannot be null when {nameof(TryCreateParameterSet)} returns 'true'"); 307throw new InvalidOperationException($"{nameof(resolvedValue)} cannot be null when {nameof(valueResolutionError)} is 'false'."); 334throw new InvalidOperationException($"{nameof(resolvedValue)} cannot be null when {nameof(valueResolutionError)} is 'false'.");
ValidationUtils.cs (1)
119_ => throw new InvalidOperationException($"{severity} is not expected value for {nameof(IValidationEntry.SeverityLevel)}."),
Microsoft.TemplateEngine.Orchestrator.RunnableProjects (29)
_generated\1\JsonEncodeSerializerContext.g.cs (2)
72throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 80throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
BindSymbolEvaluator.cs (1)
90throw new InvalidOperationException("The method should be used only after the tasks are completed.");
ConfigModel\ConditionedConfigurationElement.cs (1)
34throw new InvalidOperationException("ConditionResult access attempted prior to evaluation.");
DirectoryBasedTemplate.cs (1)
212throw new InvalidOperationException($"{nameof(versionChecker)} cannot be null when {nameof(VersionStringHelpers.TryParseVersionSpecification)} is 'true'");
DirectoryBasedTemplate.Interfaces.cs (2)
39string ITemplateLocator.MountPointUri => ConfigFile?.MountPoint.MountPointUri ?? throw new InvalidOperationException($"{nameof(ConfigFile)} should be set in order to continue"); 41string ITemplateLocator.ConfigPlace => ConfigFile?.FullPath ?? throw new InvalidOperationException($"{nameof(ConfigFile)} should be set in order to continue");
Macros\ProcessValueFormMacroConfig.cs (1)
30: throw new InvalidOperationException($"''{nameof(symbolName)}': form '{nameof(valueForm)}' cannot be found.");
RunnableProjectConfig.cs (3)
87public IReadOnlyList<IPostAction> PostActions => _evaluatedPostActions ?? throw new InvalidOperationException($"{nameof(Evaluate)} should be called before accessing the property."); 89public IReadOnlyList<ICreationPath> PrimaryOutputs => _evaluatedPrimaryOutputs ?? throw new InvalidOperationException($"{nameof(Evaluate)} should be called before accessing the property."); 93public IReadOnlyList<FileSourceMatchInfo> EvaluatedSources => _sources ?? throw new InvalidOperationException($"{nameof(Evaluate)} should be called before accessing the property.");
RunnableProjectConfig.ITemplate.cs (3)
16IFileSystemInfo ITemplate.Configuration => ConfigFile ?? throw new InvalidOperationException("Configuration file is not initialized, are you using test constructor?"); 18string ITemplateLocator.MountPointUri => ConfigFile?.MountPoint.MountPointUri ?? throw new InvalidOperationException("Configuration file is not initialized, are you using test constructor?"); 20string ITemplateLocator.ConfigPlace => ConfigFile?.FullPath ?? throw new InvalidOperationException("Configuration file is not initialized, are you using test constructor?");
RunnableProjectGenerator.cs (8)
48throw new InvalidOperationException($"{nameof(mountPoint)} is null after {nameof(EngineEnvironmentSettingsExtensions.TryGetMountPoint)} returned true."); 123throw new InvalidOperationException($"Load template using {nameof(IGenerator.LoadTemplateAsync)} to use this method."); 127throw new InvalidOperationException($"{nameof(templateData.TemplateSourceRoot)} cannot be null to continue."); 150throw new InvalidOperationException($"Cannot access the source directory of the template: {source.Source}."); 181throw new InvalidOperationException($"Load template using {nameof(IGenerator.LoadTemplateAsync)} to use this method."); 185throw new InvalidOperationException($"{nameof(templateData.TemplateSourceRoot)} cannot be null to continue."); 326throw new InvalidOperationException($"Cannot access the source directory of the template: {source.Source}."); 395throw new InvalidOperationException(string.Format(LocalizableStrings.RunnableProjectGenerator_CannotAddImplicitChoice, choiceKey, existingValue));
ScannedTemplateInfo.cs (2)
37public override IFile ConfigFile => base.ConfigFile ?? throw new InvalidOperationException(); 39public override IDirectory ConfigDirectory => base.ConfigDirectory ?? throw new InvalidOperationException();
src\sdk\src\TemplateEngine\Shared\JExtensions.cs (5)
445?? throw new InvalidOperationException("Failed to parse JSON from file."); 454?? throw new InvalidOperationException($"Failed to parse JSON from '{path}'."); 577?? throw new InvalidOperationException("Failed to parse JSON string as JsonObject."); 600?? throw new InvalidOperationException("Failed to round-trip object to JsonObject."); 609?? throw new InvalidOperationException("Failed to deep clone JsonObject.");
Microsoft.TemplateEngine.Utils (5)
src\sdk\src\TemplateEngine\Shared\JExtensions.cs (5)
445?? throw new InvalidOperationException("Failed to parse JSON from file."); 454?? throw new InvalidOperationException($"Failed to parse JSON from '{path}'."); 577?? throw new InvalidOperationException("Failed to parse JSON string as JsonObject."); 600?? throw new InvalidOperationException("Failed to round-trip object to JsonObject."); 609?? throw new InvalidOperationException("Failed to deep clone JsonObject.");
Microsoft.TemplateSearch.Common (5)
src\sdk\src\TemplateEngine\Shared\JExtensions.cs (5)
445?? throw new InvalidOperationException("Failed to parse JSON from file."); 454?? throw new InvalidOperationException($"Failed to parse JSON from '{path}'."); 577?? throw new InvalidOperationException("Failed to parse JSON string as JsonObject."); 600?? throw new InvalidOperationException("Failed to round-trip object to JsonObject."); 609?? throw new InvalidOperationException("Failed to deep clone JsonObject.");
Microsoft.TestPlatform.AdapterUtilities (4)
ManagedNameUtilities\ManagedNameHelper.Reflection.cs (2)
142throw new InvalidOperationException(string.Format(CultureInfo.CurrentCulture, Resources.Resources.ErrorMethodExpectedAsAnArgument, nameof(method))); 178throw new InvalidOperationException(string.Format(CultureInfo.CurrentCulture, Resources.Resources.ErrorMethodExpectedAsAnArgument, nameof(method)));
TestIdProvider.cs (2)
38throw new InvalidOperationException(Resources.Resources.ErrorCannotAppendAfterHashCalculation); 57throw new InvalidOperationException(Resources.Resources.ErrorCannotAppendAfterHashCalculation);
Microsoft.TestPlatform.CommunicationUtilities (2)
_generated\103\TestPlatformJsonContext.g.cs (2)
72throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 80throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
Microsoft.TestPlatform.CoreUtilities (1)
Utilities\JobQueue.cs (1)
213throw new InvalidOperationException(
Microsoft.TestPlatform.CrossPlatEngine (7)
Adapter\FrameworkHandle.cs (1)
85throw new InvalidOperationException(CrossPlatEngineResources.LaunchDebugProcessNotAllowedForANonDebugRun);
Client\Parallel\ParallelOperationManager.cs (4)
122throw new InvalidOperationException($"{nameof(_eventHandler)} was not provided."); 125throw new InvalidOperationException($"{nameof(_getEventHandler)} was not provided."); 128throw new InvalidOperationException($"{nameof(_runWorkload)} was not provided."); 188throw new InvalidOperationException("The provided manager was not found among the active managers.");
PostProcessing\ArtifactProcessingManager.cs (1)
278throw new InvalidOperationException($"Failed to set permissions on '{path}', errno: {error}");
TestEngine.cs (1)
102throw new InvalidOperationException($"Exactly 1 testhost manager must be provided when running in process, but there {testHostManagers.Count} were provided.");
Microsoft.TestPlatform.Extensions.BlameDataCollector (4)
ProcDumpDumper.cs (2)
126throw new InvalidOperationException("Procdump crash dump file must end with .dmp extension."); 298throw new InvalidOperationException("Procdump crash dump file must end with .dmp extension.");
src\vstest\src\Microsoft.TestPlatform.Execution.Shared\DebuggerBreakpoint.cs (2)
83throw new InvalidOperationException($"Cannot find AttachVS.exe tool."); 88throw new InvalidOperationException($"Cannot start tool, path {vsAttachPath} does not exist.");
Microsoft.TestPlatform.TestHostRuntimeProvider (1)
Hosting\DotnetTestHostManager.cs (1)
287throw new InvalidOperationException("Either 'VSTEST_DOTNET_ROOT_PATH' and 'VSTEST_DOTNET_ROOT_ARCHITECTURE', or 'DOTNET_ROOT' and autodetected architecture from dotnet.exe in that path must be both always set.");
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.VisualStudio.TestPlatform.Client (2)
Execution\TestRunRequest.cs (2)
118throw new InvalidOperationException(ClientResources.InvalidStateForExecution); 199throw new InvalidOperationException(ClientResources.WaitForCompletionOperationIsNotAllowedWhenNoTestRunIsActive);
Microsoft.VisualStudio.TestPlatform.Common (8)
DataCollection\DataCollectionManager.cs (5)
306throw new InvalidOperationException(Resources.Resources.DataCollectionContextNotInitialized); 325throw new InvalidOperationException(Resources.Resources.DataCollectionContextNotInitialized); 330throw new InvalidOperationException(Resources.Resources.DataCollectionTestCaseStartMissingTestElement); 349throw new InvalidOperationException(Resources.Resources.DataCollectionContextNotInitialized); 354throw new InvalidOperationException(Resources.Resources.DataCollectionTestCaseEndMissingTestElement);
DataCollection\TestPlatformDataCollectionLogger.cs (2)
69throw new InvalidOperationException(Resources.Resources.WrongDataCollectionContextType); 134throw new InvalidOperationException(Resources.Resources.WrongDataCollectionContextType);
RunSettings.cs (1)
133throw new InvalidOperationException(CommonResources.RunSettingsAlreadyLoaded);
Microsoft.VisualStudio.TestPlatform.Extensions.Html.TestLogger (2)
HtmlLogger.cs (1)
369throw new InvalidOperationException(string.Format(CultureInfo.CurrentCulture, HtmlResource.CannotGenerateUniqueFilePath, fileName, TestResultsDirPath));
HtmlTransformer.cs (1)
23using var reader = XmlReader.Create(GetType().Assembly.GetManifestResourceStream("Microsoft.VisualStudio.TestPlatform.Extensions.HtmlLogger.Html.xslt") ?? throw new InvalidOperationException(), new XmlReaderSettings { CheckCharacters = false, CloseInput = true });
Microsoft.VisualStudio.TestPlatform.Extensions.Trx.TestLogger (1)
ObjectModel\TestResult.cs (1)
387throw new InvalidOperationException(TrxLoggerResources.Common_MissingRunInResult);
Microsoft.VisualStudio.TestPlatform.ObjectModel (4)
Client\TestRunCriteria.cs (2)
535throw new InvalidOperationException(Resources.Resources.NoTestCaseFilterForSpecificTests); 555throw new InvalidOperationException(Resources.Resources.NoTestCaseFilterForSpecificTests);
Navigation\PortableSymbolReader.cs (1)
157throw new InvalidOperationException($"Cannot find portable .PDB file for {binaryPath}. This can have multiple reasons:"
TestProperty\TestProperty.cs (1)
341throw new InvalidOperationException(message);
Microsoft.Web.Xdt.Extensions (1)
InsertOrAppendAttribute.cs (1)
103throw new InvalidOperationException("No target attribute to append");
Microsoft.Web.XmlTransform (3)
XmlAttributePreservingWriter.cs (2)
42throw new InvalidOperationException(); 57throw new InvalidOperationException();
XmlFormatter.cs (1)
349throw new InvalidOperationException();
Microsoft.Win32.Registry (1)
Microsoft\Win32\RegistryKey.cs (1)
290throw new InvalidOperationException(SR.InvalidOperation_RegRemoveSubKey);
Mono.Cecil (68)
Mono.Cecil.Cil\CodeReader.cs (2)
85 throw new InvalidOperationException (); 103 throw new InvalidOperationException ();
Mono.Cecil.Cil\PortablePdb.cs (1)
178 throw new InvalidOperationException ();
Mono.Cecil.Cil\Symbols.cs (3)
679 throw new InvalidOperationException (); 690 throw new InvalidOperationException (); 1135 throw new InvalidOperationException ();
Mono.Cecil\ArrayType.cs (1)
90 set { throw new InvalidOperationException (); }
Mono.Cecil\AssemblyReader.cs (1)
2567 throw new InvalidOperationException ();
Mono.Cecil\AssemblyWriter.cs (1)
2949 throw new InvalidOperationException ();
Mono.Cecil\CallSite.cs (2)
56 set { throw new InvalidOperationException (); } 61 set { throw new InvalidOperationException (); }
Mono.Cecil\EmbeddedResource.cs (2)
58 throw new InvalidOperationException (); 72 throw new InvalidOperationException ();
Mono.Cecil\ExportedType.cs (1)
232 throw new InvalidOperationException ($"Circularity when resolving exported type: '{this}'");
Mono.Cecil\FieldDefinition.cs (1)
125 throw new InvalidOperationException ();
Mono.Cecil\FunctionPointerType.cs (3)
56 set { throw new InvalidOperationException (); } 61 set { throw new InvalidOperationException (); } 70 set { throw new InvalidOperationException (); }
Mono.Cecil\GenericParameter.cs (3)
90 set { throw new InvalidOperationException (); } 95 set { throw new InvalidOperationException (); } 117 set { throw new InvalidOperationException (); }
Mono.Cecil\Import.cs (8)
84 throw new InvalidOperationException (); 103 throw new InvalidOperationException (); 116 throw new InvalidOperationException (); 248 throw new InvalidOperationException (); 256 throw new InvalidOperationException(); 446 throw new InvalidOperationException (); 662 throw new InvalidOperationException (); 667 throw new InvalidOperationException ();
Mono.Cecil\MemberReference.cs (1)
27 throw new InvalidOperationException ();
Mono.Cecil\MethodDefinition.cs (3)
41 throw new InvalidOperationException (); 51 throw new InvalidOperationException (); 61 throw new InvalidOperationException ();
Mono.Cecil\MethodSpecification.cs (6)
27 set { throw new InvalidOperationException (); } 32 set { throw new InvalidOperationException (); } 37 set { throw new InvalidOperationException (); } 42 set { throw new InvalidOperationException (); } 47 set { throw new InvalidOperationException (); } 52 set { throw new InvalidOperationException (); }
Mono.Cecil\Modifiers.cs (2)
45 set { throw new InvalidOperationException (); } 90 set { throw new InvalidOperationException (); }
Mono.Cecil\ModuleDefinition.cs (3)
406 throw new InvalidOperationException (); 1103 throw new InvalidOperationException (); 1211 throw new InvalidOperationException ();
Mono.Cecil\PinnedType.cs (1)
21 set { throw new InvalidOperationException (); }
Mono.Cecil\PointerType.cs (1)
29 set { throw new InvalidOperationException (); }
Mono.Cecil\ReferenceType.cs (1)
29 set { throw new InvalidOperationException (); }
Mono.Cecil\SentinelType.cs (1)
21 set { throw new InvalidOperationException (); }
Mono.Cecil\TypeDefinition.cs (2)
44 throw new InvalidOperationException (); 59 throw new InvalidOperationException ();
Mono.Cecil\TypeReference.cs (5)
69 throw new InvalidOperationException ("Projected type reference name can't be changed."); 79 throw new InvalidOperationException ("Projected type reference namespace can't be changed."); 145 throw new InvalidOperationException ("Projected type scope can't be changed."); 151 throw new InvalidOperationException ("Projected type scope can't be changed."); 164 throw new InvalidOperationException ("Projected type declaring type can't be changed.");
Mono.Cecil\TypeReferenceEqualityComparer.cs (1)
209 throw new InvalidOperationException ("Generic parameter encountered with invalid owner");
Mono.Cecil\TypeSpecification.cs (3)
27 set { throw new InvalidOperationException (); } 32 set { throw new InvalidOperationException (); } 37 set { throw new InvalidOperationException (); }
Mono.Collections.Generic\Collection.cs (2)
367 throw new InvalidOperationException (); 409 throw new InvalidOperationException ();
Mono.Collections.Generic\ReadOnlyCollection.cs (6)
73 throw new InvalidOperationException (); 78 throw new InvalidOperationException (); 83 throw new InvalidOperationException (); 88 throw new InvalidOperationException (); 93 throw new InvalidOperationException (); 98 throw new InvalidOperationException ();
Mono.Security.Cryptography\CryptoService.cs (1)
92 throw new InvalidOperationException ();
Mono.Cecil.Mdb (21)
Mono.CompilerServices.SymbolWriter\MonoSymbolFile.cs (15)
162 throw new InvalidOperationException (); 174 throw new InvalidOperationException (); 186 throw new InvalidOperationException (); 195 throw new InvalidOperationException (); 318 throw new InvalidOperationException (); 441 throw new InvalidOperationException (); 463 throw new InvalidOperationException (); 477 throw new InvalidOperationException (); 499 throw new InvalidOperationException (); 533 throw new InvalidOperationException (); 548 throw new InvalidOperationException (); 559 throw new InvalidOperationException (); 573 throw new InvalidOperationException (); 595 throw new InvalidOperationException (); 618 throw new InvalidOperationException ();
Mono.CompilerServices.SymbolWriter\MonoSymbolTable.cs (6)
554 throw new InvalidOperationException (); 575 throw new InvalidOperationException (); 622 throw new InvalidOperationException (); 781 throw new InvalidOperationException (); 1211 throw new InvalidOperationException (); 1221 throw new InvalidOperationException ();
Mono.Cecil.Pdb (1)
Microsoft.Cci.Pdb\IntHashTable.cs (1)
475throw new InvalidOperationException("InvalidOperation_HashInsertFailed");
Mono.Cecil.Rocks (1)
Mono.Cecil.Rocks\ILParser.cs (1)
217 throw new InvalidOperationException ();
MSBuild (4)
OutOfProcTaskHostNode.cs (3)
1047throw new InvalidOperationException( 1439tcs.TrySetException(new InvalidOperationException(errorMessage)); 1449ctxTcs.TrySetException(new InvalidOperationException(errorMessage));
src\msbuild\src\Shared\ErrorUtilities.cs (1)
57throw new InvalidOperationException(ResourceUtilities.FormatResourceStringStripCodeAndKeyword(resourceName, args));
MyFrontend (1)
Services\CatalogServiceClient.cs (1)
15_ => throw new InvalidOperationException(),
NuGet.Build.Tasks (3)
src\nuget-client\build\Shared\SharedExtensions.cs (3)
140throw new InvalidOperationException(); 149throw new InvalidOperationException(); 166throw new InvalidOperationException();
NuGet.Build.Tasks.Pack (3)
GetProjectReferencesFromAssetsFileTask.cs (2)
48throw new InvalidOperationException(string.Format( 60throw new InvalidOperationException(string.Format(
PackTaskLogic.cs (1)
348throw new InvalidOperationException(string.Format(
NuGet.CommandLine.XPlat (13)
_generated\35\PackageSearchJsonContext.g.cs (2)
72throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 80throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
Commands\PackageReferenceCommands\AddPackageReferenceCommandRunner.cs (2)
75throw new InvalidOperationException(string.Format(CultureInfo.CurrentCulture, Strings.Error_NoDgSpec)); 96throw new InvalidOperationException(string.Format(CultureInfo.CurrentCulture,
Commands\PackageSearch\Table.cs (1)
64throw new InvalidOperationException("Row column count does not match header column count.");
src\nuget-client\build\Shared\SharedExtensions.cs (3)
140throw new InvalidOperationException(); 149throw new InvalidOperationException(); 166throw new InvalidOperationException();
Utility\MSBuildAPIUtility.cs (5)
67throw new InvalidOperationException(string.Format(CultureInfo.CurrentCulture, Strings.Error_MsBuildUnableToOpenProject, projectCSProjPath)); 82throw new InvalidOperationException(string.Format(CultureInfo.CurrentCulture, Strings.Error_MsBuildUnableToOpenProject, projectCSProjPath)); 674throw new InvalidOperationException(string.Format(CultureInfo.CurrentCulture, 799throw new InvalidOperationException(string.Format(CultureInfo.CurrentCulture, Strings.ListPkg_ErrorReadingAssetsFile, assetsFile.Path)); 832throw new InvalidOperationException(string.Format(CultureInfo.CurrentCulture, Strings.ListPkg_ErrorReadingReferenceFromProject, project.FullPath));
NuGet.Commands (15)
RestoreCommand\RestoreCommand.cs (2)
2432throw new InvalidOperationException($"Ambiguous project name '{request.Project.Name}'."); 2461throw new InvalidOperationException($"Missing external reference metadata for {request.Project.Name}");
RestoreCommand\RestoreRunner.cs (1)
385throw new InvalidOperationException(string.Format(CultureInfo.CurrentCulture, GetInvalidInputErrorMessage(input), input));
SignCommand\CertificateProvider.cs (1)
240throw new InvalidOperationException(string.Format(CultureInfo.CurrentCulture,
src\nuget-client\build\Shared\SharedExtensions.cs (3)
140throw new InvalidOperationException(); 149throw new InvalidOperationException(); 166throw new InvalidOperationException();
TrustedSignersCommand\TrustedSignerActionsProvider.cs (8)
69throw new InvalidOperationException(string.Format(CultureInfo.CurrentCulture, Strings.Error_TrustedRepositoryDoesNotExist, name)); 113throw new InvalidOperationException(Strings.Error_PackageNotSigned); 125repositorySignature = countersignature ?? throw new InvalidOperationException(Strings.Error_RepoTrustExpectedRepoSignature); 145throw new InvalidOperationException(Strings.Error_AuthorTrustExpectedAuthorSignature); 249throw new InvalidOperationException(string.Format(CultureInfo.CurrentCulture, Strings.Error_TrustedSignerAlreadyExists, name)); 254throw new InvalidOperationException(string.Format(CultureInfo.CurrentCulture, Strings.Error_TrustedRepoAlreadyExists, serviceIndex)); 284throw new InvalidOperationException(string.Format(CultureInfo.CurrentCulture, Strings.Error_InvalidCertificateInformationFromServer, serviceIndex)); 289throw new InvalidOperationException(string.Format(CultureInfo.CurrentCulture, Strings.Error_EmptyCertificateListInRepository, serviceIndex));
NuGet.Common (4)
ClientVersionUtility.cs (1)
47throw new InvalidOperationException(Strings.UnableToDetemineClientVersion);
ConcurrencyUtilities.cs (2)
102throw new InvalidOperationException(message); 192throw new InvalidOperationException(message);
PathUtil\NuGetEnvironment.cs (1)
78throw new InvalidOperationException(string.Format(CultureInfo.CurrentCulture,
NuGet.Configuration (33)
Settings\Items\OwnersItem.cs (1)
109throw new InvalidOperationException(Resources.OwnersItemMustHaveAtLeastOneOwner);
Settings\Items\PackageSourceMappingSourceItem.cs (1)
153throw new InvalidOperationException(string.Format(CultureInfo.CurrentCulture, Resources.Error_ItemNeedsAtLeastOnePackagePattern, packageSourceMappingSourceItem.Key));
Settings\Items\TrustedSignerItem.cs (1)
116throw new InvalidOperationException(Resources.TrustedSignerMustHaveCertificates);
Settings\Items\UnknownItem.cs (4)
82throw new InvalidOperationException(Resources.CannotUpdateMachineWide); 87throw new InvalidOperationException(Resources.CannotUpdateReadOnlyConfig); 129throw new InvalidOperationException(Resources.CannotUpdateMachineWide); 134throw new InvalidOperationException(Resources.CannotUpdateReadOnlyConfig);
Settings\NullSettings.cs (2)
19public void AddOrUpdate(string sectionName, SettingItem item) => throw new InvalidOperationException(string.Format(CultureInfo.CurrentCulture, Resources.InvalidNullSettingsOperation, nameof(AddOrUpdate))); 21public void Remove(string sectionName, SettingItem item) => throw new InvalidOperationException(string.Format(CultureInfo.CurrentCulture, Resources.InvalidNullSettingsOperation, nameof(Remove)));
Settings\SettingBase.cs (1)
59throw new InvalidOperationException(Resources.CannotUpdateNode);
Settings\SettingElement.cs (3)
89throw new InvalidOperationException(string.Format(CultureInfo.CurrentCulture, Resources.Error_InvalidAttribute, attribute.Key, attribute.Value)); 150throw new InvalidOperationException(string.Format(CultureInfo.CurrentCulture, Resources.Error_InvalidAttribute, attributeName, newValue)); 181throw new InvalidOperationException(string.Format(CultureInfo.CurrentCulture, Resources.Error_InvalidAttribute, attributeName, value));
Settings\SettingFactory.cs (1)
105throw new InvalidOperationException("An invalid code path was taken. This should only happen when a new settings type is not implemented correctly.");
Settings\SettingItem.cs (3)
51throw new InvalidOperationException(Resources.CannotUpdateMachineWide); 56throw new InvalidOperationException(Resources.CannotUpdateReadOnlyConfig); 61throw new InvalidOperationException(Resources.CannotUpdateDifferentItems);
Settings\Settings.cs (7)
86throw new InvalidOperationException(Resources.NoWritteableConfig); 107throw new InvalidOperationException(Resources.CannotUpdateMachineWide); 112throw new InvalidOperationException(Resources.CannotUpdateReadOnlyConfig); 148throw new InvalidOperationException(Resources.NoWritteableConfig); 178throw new InvalidOperationException(string.Format(CultureInfo.CurrentCulture, Resources.SectionDoesNotExist, sectionName)); 183throw new InvalidOperationException(string.Format(CultureInfo.CurrentCulture, Resources.ItemDoesNotExist, sectionName)); 610throw new InvalidOperationException(message);
Settings\SettingsFile.cs (1)
123throw new InvalidOperationException("The root element of the configuration file is null.");
Settings\SettingsGroup.cs (5)
101throw new InvalidOperationException("Cannot call this method on a setting where Origin is null."); 106throw new InvalidOperationException(Resources.CannotUpdateMachineWide); 111throw new InvalidOperationException(Resources.CannotUpdateReadOnlyConfig); 141throw new InvalidOperationException(Resources.CannotUpdateMachineWide); 146throw new InvalidOperationException(Resources.CannotUpdateReadOnlyConfig);
Settings\VirtualSettingSection.cs (2)
106throw new InvalidOperationException(Resources.CannotUpdateMachineWide); 111throw new InvalidOperationException(Resources.CannotUpdateReadOnlyConfig);
Utility\FileSystemUtility.cs (1)
46throw new InvalidOperationException($"Unable to set permission while creating {fullPath}, errno={errno}.");
NuGet.Credentials (2)
_generated\4\PluginCredentialResponseJsonContext.g.cs (2)
75throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 83throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
NuGet.DependencyResolver.Core (3)
src\nuget-client\build\Shared\SharedExtensions.cs (3)
140throw new InvalidOperationException(); 149throw new InvalidOperationException(); 166throw new InvalidOperationException();
NuGet.Frameworks (3)
src\nuget-client\build\Shared\SharedExtensions.cs (3)
140throw new InvalidOperationException(); 149throw new InvalidOperationException(); 166throw new InvalidOperationException();
NuGet.PackageManagement (44)
NuGetPackageManager.cs (22)
335throw new InvalidOperationException(string.Format(CultureInfo.CurrentCulture, Strings.NoLatestVersionFound, packageId)); 544throw new InvalidOperationException(string.Format(CultureInfo.CurrentCulture, Strings.UnknownPackage, packageId)); 552throw new InvalidOperationException(string.Format(CultureInfo.CurrentCulture, Strings.NewerVersionAlreadyReferenced, packageId)); 919throw new InvalidOperationException(string.Format(CultureInfo.CurrentCulture, Strings.UnknownPackage, packageId)); 925throw new InvalidOperationException(string.Format(CultureInfo.CurrentCulture, 1179throw new InvalidOperationException(Strings.UnableToGatherDependencyInfoForMultiplePackages); 1271throw new InvalidOperationException(Strings.UnableToResolveDependencyInfoForMultiplePackages); 1319throw new InvalidOperationException(aggregateEx.Message, aggregateEx); 1325throw new InvalidOperationException(Strings.PackagesCouldNotBeInstalled, ex); 1327throw new InvalidOperationException(ex.Message, ex); 1480throw new InvalidOperationException(string.Format(CultureInfo.CurrentCulture, Strings.PackageNotFound, newPackageToInstall)); 1805throw new InvalidOperationException(alreadyInstalledMessage, new PackageAlreadyInstalledException(alreadyInstalledMessage)); 1878throw new InvalidOperationException(string.Format(CultureInfo.CurrentCulture, Strings.UnableToGatherDependencyInfo, packageIdentity)); 1947throw new InvalidOperationException(string.Format(CultureInfo.CurrentCulture, Strings.UnableToResolveDependencyInfo, packageIdentity, resolutionContext.DependencyBehavior)); 1996throw new InvalidOperationException(string.Format(CultureInfo.CurrentCulture, Strings.PackageNotFound, packageIdentity)); 2009throw new InvalidOperationException(aggregateEx.Message, aggregateEx); 2015throw new InvalidOperationException(string.Format(CultureInfo.CurrentCulture, Strings.PackageCouldNotBeInstalled, packageIdentity), ex); 2017throw new InvalidOperationException(ex.Message, ex); 2108throw new InvalidOperationException(string.Format(CultureInfo.CurrentCulture, 2225throw new InvalidOperationException(Strings.SolutionManagerNotAvailableForUninstall); 2348throw new InvalidOperationException(Strings.SolutionManagerNotAvailableForUninstall); 3093_ => throw new InvalidOperationException("Unknown NuGetProjectActionType"),
PackageDownloader.cs (1)
295throw new InvalidOperationException(
Projects\MSBuildNuGetProject.cs (1)
266throw new InvalidOperationException(
Projects\PackagesConfigNuGetProject.cs (4)
174throw new InvalidOperationException(string.Format( 228throw new InvalidOperationException(string.Format( 299throw new InvalidOperationException(string.Format( 340throw new InvalidOperationException(string.Format(
Projects\ProjectJsonNuGetProject.cs (3)
180throw new InvalidOperationException( 323throw new InvalidOperationException( 342throw new InvalidOperationException(
Resolution\GatherExceptionHelpers.cs (2)
63throw new InvalidOperationException( 89throw new InvalidOperationException(string.Format(CultureInfo.CurrentCulture, Strings.NewerVersionAlreadyReferenced, target));
Resolution\ResolverGather.cs (4)
230throw new InvalidOperationException(message); 466throw new InvalidOperationException(message, ex); 472throw new InvalidOperationException(message, ex); 665throw new InvalidOperationException(message, ex);
Resolution\UninstallResolver.cs (2)
144return new InvalidOperationException(string.Format(CultureInfo.CurrentCulture, 148return new InvalidOperationException(string.Format(CultureInfo.CurrentCulture,
src\nuget-client\build\Shared\SharedExtensions.cs (3)
140throw new InvalidOperationException(); 149throw new InvalidOperationException(); 166throw new InvalidOperationException();
Utility\PackagesConfigLockFileUtility.cs (1)
44throw new InvalidOperationException(message);
Utility\PackagesFolderPathUtility.cs (1)
30throw new InvalidOperationException(Strings.SolutionDirectoryNotAvailable);
NuGet.Packaging (15)
_generated\3\NupkgMetadataSerializationContext.g.cs (2)
78throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 86throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
MinClientVersionUtility.cs (1)
87throw new InvalidOperationException(Strings.UnableToParseClientVersion);
NuGetExtractionFileIO.cs (1)
72throw new InvalidOperationException("libc creat failed, but File.Create did not");
PackageCreation\Authoring\Manifest.cs (3)
305throw new InvalidOperationException(String.Format(CultureInfo.CurrentCulture, NuGetResources.DuplicateDependenciesDefined, metadata.Id, dependency.Id)); 326throw new InvalidOperationException(String.Format(CultureInfo.CurrentCulture, NuGetResources.DependencyHasInvalidVersion, dependency.Id)); 331throw new InvalidOperationException(String.Format(CultureInfo.CurrentCulture, NuGetResources.DependencyHasInvalidVersion, dependency.Id));
PackageCreation\Authoring\ManifestSchemaUtility.cs (1)
78throw new InvalidOperationException(String.Format(CultureInfo.CurrentCulture, NuGetResources.UnknownSchemaVersion, version));
RuntimeModel\RuntimeDescription.cs (1)
82throw new InvalidOperationException("TODO: Unable to merge runtimes, they do not have the same identifier");
Sha512HashFunction.cs (1)
59throw new InvalidOperationException();
Signing\DerEncoding\DerSequenceReader.cs (1)
560new InvalidOperationException(
Signing\Signatures\Signature.cs (1)
361throw new InvalidOperationException(string.Format(CultureInfo.CurrentCulture, Strings.Verify_ErrorNoCertificate, FriendlyName));
src\nuget-client\build\Shared\SharedExtensions.cs (3)
140throw new InvalidOperationException(); 149throw new InvalidOperationException(); 166throw new InvalidOperationException();
NuGet.ProjectModel (8)
_generated\11\CacheFileSourceGen.g.cs (2)
74throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 82throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
_generated\22\AssetsLogMessageSourceGen.g.cs (2)
74throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 82throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
HashObjectWriter.cs (3)
99throw new InvalidOperationException(); 253throw new InvalidOperationException(); 273throw new InvalidOperationException();
LazyStringSplit.cs (1)
55return FirstOrDefault() ?? throw new InvalidOperationException("Sequence is empty.");
NuGet.Protocol (74)
_generated\142\JsonContext.g.cs (2)
83throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 91throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
_generated\154\RepositorySignatureJsonContext.g.cs (2)
80throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 88throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
_generated\35\PackageSearchJsonContext.g.cs (2)
82throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 90throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
_generated\40\PluginCacheJsonContext.g.cs (2)
75throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 83throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
_generated\94\PluginJsonContext.g.cs (2)
75throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 83throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
Converters\V3SearchResultsConverter.cs (1)
27throw new InvalidOperationException();
HttpSource\HttpSource.cs (1)
455?? throw new InvalidOperationException($"The source '{source.PackageSource.Source}' does not provide {nameof(HttpHandlerResource)}.");
HttpSource\HttpStreamValidation.cs (2)
60throw new InvalidOperationException("The JSON document is not an object."); 223throw new InvalidOperationException("The XML document is not complete.");
LegacyFeed\AutoCompleteResourceV2FeedProvider.cs (2)
28?? throw new InvalidOperationException($"The source '{source.PackageSource.Source}' does not provide {nameof(ODataServiceDocumentResourceV2)}."); 31?? throw new InvalidOperationException($"The source '{source.PackageSource.Source}' does not provide {nameof(HttpSourceResource)}.");
LegacyFeed\DependencyInfoResourceV2FeedProvider.cs (2)
25?? throw new InvalidOperationException($"The source '{source.PackageSource.Source}' does not provide {nameof(ODataServiceDocumentResourceV2)}."); 28?? throw new InvalidOperationException($"The source '{source.PackageSource.Source}' does not provide {nameof(HttpSourceResource)}.");
LegacyFeed\DownloadResourceV2FeedProvider.cs (2)
25?? throw new InvalidOperationException($"The source '{source.PackageSource.Source}' does not provide {nameof(ODataServiceDocumentResourceV2)}."); 28?? throw new InvalidOperationException($"The source '{source.PackageSource.Source}' does not provide {nameof(HttpSourceResource)}.");
LegacyFeed\MetadataResourceV2FeedProvider.cs (2)
25?? throw new InvalidOperationException($"The source '{source.PackageSource.Source}' does not provide {nameof(ODataServiceDocumentResourceV2)}."); 28?? throw new InvalidOperationException($"The source '{source.PackageSource.Source}' does not provide {nameof(HttpSourceResource)}.");
LegacyFeed\PackageMetadataResourceV2FeedProvider.cs (2)
27?? throw new InvalidOperationException($"The source '{source.PackageSource.Source}' does not provide {nameof(HttpSourceResource)}."); 30?? throw new InvalidOperationException($"The source '{source.PackageSource.Source}' does not provide {nameof(ODataServiceDocumentResourceV2)}.");
LegacyFeed\PackageSearchResourceV2FeedProvider.cs (2)
26?? throw new InvalidOperationException($"The source '{source.PackageSource.Source}' does not provide {nameof(HttpSourceResource)}."); 29?? throw new InvalidOperationException($"The source '{source.PackageSource.Source}' does not provide {nameof(ODataServiceDocumentResourceV2)}.");
LegacyFeed\V2FeedListResourceProvider.cs (1)
29?? throw new InvalidOperationException($"The source '{source.PackageSource.Source}' does not provide {nameof(HttpSourceResource)}.");
LocalRepositories\LocalPackageSearchResource.cs (1)
48throw new InvalidOperationException(string.Format(
Model\GetVulnerabilityInfoResult.cs (1)
36throw new InvalidOperationException("The result cannot have null known vulnerabilities and no exceptions");
Plugins\Connection.cs (3)
174throw new InvalidOperationException(Strings.Plugin_ConnectionAlreadyStarted); 242throw new InvalidOperationException(Strings.Plugin_NotConnected); 287throw new InvalidOperationException(Strings.Plugin_NotConnected);
Plugins\Logging\PluginLogger.cs (2)
151?? throw new InvalidOperationException("Log directory must be set when plugin logging is enabled."); 158?? throw new InvalidOperationException("The current process must have a main module file name for plugin logging.");
Plugins\MessageConverter.cs (1)
181throw new InvalidOperationException(string.Format(CultureInfo.CurrentCulture, Strings.Error_UnsupportedPayloadType, value.PayloadObject.GetType()));
Plugins\PluginProcess.cs (1)
157throw new InvalidOperationException();
Plugins\Receiver.cs (1)
79throw new InvalidOperationException(Strings.Plugin_ConnectionIsClosed);
Plugins\Sender.cs (3)
98throw new InvalidOperationException(Strings.Plugin_ConnectionIsClosed); 103throw new InvalidOperationException(Strings.Plugin_ConnectionAlreadyStarted); 133throw new InvalidOperationException(Strings.Plugin_NotConnected);
Plugins\StandardInputReceiver.cs (1)
99throw new InvalidOperationException(Strings.Plugin_ConnectionAlreadyStarted);
Plugins\StandardOutputReceiver.cs (1)
92throw new InvalidOperationException(Strings.Plugin_ConnectionAlreadyStarted);
Providers\AutoCompleteResourceV3Provider.cs (2)
27?? throw new InvalidOperationException($"The source '{source.PackageSource.Source}' does not provide {nameof(RegistrationResourceV3)}."); 29?? throw new InvalidOperationException($"The source '{source.PackageSource.Source}' does not provide {nameof(HttpSourceResource)}.");
Providers\DependencyInfoResourceV3Provider.cs (2)
28?? throw new InvalidOperationException($"The source '{source.PackageSource.Source}' does not provide {nameof(HttpSourceResource)}."); 30?? throw new InvalidOperationException($"The source '{source.PackageSource.Source}' does not provide {nameof(RegistrationResourceV3)}.");
Providers\DownloadResourceV3Provider.cs (2)
27?? throw new InvalidOperationException($"The source '{source.PackageSource.Source}' does not provide {nameof(HttpSourceResource)}."); 47?? throw new InvalidOperationException($"The source '{source.PackageSource.Source}' does not provide {nameof(RegistrationResourceV3)}.");
Providers\PackageMetadataResourceV3Provider.cs (2)
34?? throw new InvalidOperationException($"The source '{source.PackageSource.Source}' does not provide {nameof(RegistrationResourceV3)}."); 40?? throw new InvalidOperationException($"The source '{source.PackageSource.Source}' does not provide {nameof(HttpSourceResource)}.");
Providers\PackageSearchResourceV3Provider.cs (1)
28?? throw new InvalidOperationException($"The source '{source.PackageSource.Source}' does not provide {nameof(HttpSourceResource)}.");
Providers\PackageUpdateResourceV2Provider.cs (1)
32?? throw new InvalidOperationException($"The source '{source.PackageSource.Source}' does not provide {nameof(HttpSourceResource)}.");
Providers\PackageUpdateResourceV3Provider.cs (2)
40?? throw new InvalidOperationException($"The source '{source.PackageSource.Source}' does not provide {nameof(HttpSourceResource)}."); 47throw new InvalidOperationException(string.Format(CultureInfo.CurrentCulture,
Providers\RawSearchResourceV3Provider.cs (1)
33?? throw new InvalidOperationException($"The source '{source.PackageSource.Source}' does not provide {nameof(HttpSourceResource)}.");
Providers\RegistrationResourceV3Provider.cs (1)
33?? throw new InvalidOperationException($"The source '{source.PackageSource.Source}' does not provide {nameof(HttpSourceResource)}.");
Providers\RepositorySignatureResourceProvider.cs (1)
64?? throw new InvalidOperationException($"The source '{source.PackageSource.Source}' does not provide {nameof(HttpSourceResource)}.");
Providers\ServiceIndexResourceV3Provider.cs (1)
125?? throw new InvalidOperationException($"The source '{source.PackageSource.Source}' does not provide {nameof(HttpSourceResource)}.");
Providers\SymbolPackageUpdateResourceV3Provider.cs (1)
37?? throw new InvalidOperationException($"The source '{source.PackageSource.Source}' does not provide {nameof(HttpSourceResource)}.");
Providers\V3FeedListResourceProvider.cs (1)
36?? throw new InvalidOperationException($"The source '{source.PackageSource.Source}' does not provide {nameof(HttpSourceResource)}.");
RemotePackageArchiveDownloader.cs (1)
285throw new InvalidOperationException();
RemoteRepositories\HttpFileSystemBasedFindPackageByIdResourceProvider.cs (1)
34?? throw new InvalidOperationException($"The source '{sourceRepository.PackageSource.Source}' does not provide {nameof(HttpSourceResource)}.");
RemoteRepositories\RemoteV2FindPackageByIdResourceProvider.cs (1)
30?? throw new InvalidOperationException($"The source '{sourceRepository.PackageSource.Source}' does not provide {nameof(HttpSourceResource)}.");
RemoteRepositories\RemoteV3FindPackageByIdResourceProvider.cs (1)
32?? throw new InvalidOperationException($"The source '{sourceRepository.PackageSource.Source}' does not provide {nameof(HttpSourceResource)}.");
Resources\RegistrationResourceV3.cs (2)
54throw new InvalidOperationException(); 90throw new InvalidOperationException();
Resources\VulnerabilityInfoResourceV3.cs (4)
40?? throw new InvalidOperationException($"The source '{_sourceRepository.PackageSource.Source}' does not provide {nameof(HttpSourceResource)}."); 75?? throw new InvalidOperationException($"The source '{_sourceRepository.PackageSource.Source}' does not provide {nameof(ServiceIndexResourceV3)}."); 77?? throw new InvalidOperationException($"The source '{_sourceRepository.PackageSource.Source}' does not provide {nameof(ServiceTypes.VulnerabilityInfo)}."); 95?? throw new InvalidOperationException($"The source '{_sourceRepository.PackageSource.Source}' does not provide {nameof(HttpSourceResource)}.");
SourceRepository.cs (1)
103?? throw new InvalidOperationException($"The source '{PackageSource.Source}' does not provide {nameof(FeedTypeResource)}.");
Utility\DedicatedAsynchronousProcessingThread.cs (2)
96throw new InvalidOperationException("The processing thread is already started."); 104throw new InvalidOperationException("The processing thread is not started yet.");
Utility\GetDownloadResultUtility.cs (1)
129throw new InvalidOperationException("Reached an unexpected point in the code");
NuGet.Resolver (1)
ResolverPackage.cs (1)
52throw new InvalidOperationException(string.Format(
NuGet.Versioning (3)
src\nuget-client\build\Shared\SharedExtensions.cs (3)
140throw new InvalidOperationException(); 149throw new InvalidOperationException(); 166throw new InvalidOperationException();
ParameterEndToEnd.AppHost (1)
AppHost.cs (1)
30var 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\wpf\src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\BamlRecords.cs (1)
769throw new InvalidOperationException(SR.ParserMultiBamls);
src\wpf\src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\XamlParseException.cs (1)
467throw new InvalidOperationException(message);
src\wpf\src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\XamlReaderHelper.cs (5)
4354throw new InvalidOperationException(SR.Format(SR.ParserCanOnlyHaveOneChild, 6023throw new InvalidOperationException(SR.Format(SR.ParserAbandonedTypeConverterText,_typeConverterTextWrittenAndNotProcessed)); 6039throw new InvalidOperationException(SR.Format(SR.ParserTypeConverterTextUnusable,initializationText)); 6165throw new InvalidOperationException(SR.Format(SR.ParserTypeConverterTextNeedsEndElement, _typeConverterTextWrittenAndNotProcessed)); 6619throw new InvalidOperationException(SR.Format(SR.ParserCanOnlyHaveOneChild,
src\wpf\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\wpf\src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\XmlnsCache.cs (1)
393throw new InvalidOperationException(SR.Format(SR.ParserCompatDuplicate, oldXmlns,
src\wpf\src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\XmlnsDictionary.cs (1)
594throw new InvalidOperationException(SR.ParserDictionarySealed);
src\wpf\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\wpf\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 (517)
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)
111throw new InvalidOperationException(SR.Format(SR.PenImcSxSRegistrationFailed, ExternDll.Penimc)); 181throw new InvalidOperationException(); 197throw new InvalidOperationException(); 316throw new InvalidOperationException(); 353throw new InvalidOperationException();
src\wpf\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\wpf\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)
250throw 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)
123throw new InvalidOperationException(SR.Effect_ShaderSeekableStream); 130throw new InvalidOperationException(SR.Effect_ShaderBytecodeSize);
System\Windows\Media\Effects\ShaderEffect.cs (3)
186throw new InvalidOperationException(SR.Effect_20ShaderUsing30Registers); 338throw new InvalidOperationException(SR.Format(SR.Effect_ShaderConstantType, dp.PropertyType.Name)); 554throw 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)
991throw new System.InvalidOperationException(SR.Image_OriginalStreamReadOnly); 1536throw new System.InvalidOperationException( 1555throw new System.InvalidOperationException( 1563throw 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); 1792throw new InvalidOperationException(SR.MediaContext_InfiniteTickLoop); 1928throw new InvalidOperationException(SR.MediaContext_InfiniteLayoutLoop); 2298throw new InvalidOperationException(SR.MediaContext_APINotAllowed);
System\Windows\Media\MediaPlayerState.cs (2)
844new InvalidOperationException(SR.Format(SR.Media_PackURIsAreNotSupported, null))); 999throw new InvalidOperationException(SR.Media_NotAllowedWhileTimingEngineInControl);
System\Windows\Media\MediaSystem.cs (1)
192throw 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)
177throw 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)
407throw new InvalidOperationException(SR.Format(SR.MemberNotAllowedForView, "NewItemPlaceholderPosition")); 446throw new InvalidOperationException(SR.Format(SR.MemberNotAllowedForView, "AddNew")); 465throw new InvalidOperationException(SR.Format(SR.MemberNotAllowedForView, "CommitNew")); 482throw new InvalidOperationException(SR.Format(SR.MemberNotAllowedForView, "CancelNew")); 563throw new InvalidOperationException(SR.Format(SR.MemberNotAllowedForView, "RemoveAt")); 579throw new InvalidOperationException(SR.Format(SR.MemberNotAllowedForView, "Remove")); 603throw new InvalidOperationException(SR.Format(SR.MemberNotAllowedForView, "EditItem")); 620throw new InvalidOperationException(SR.Format(SR.MemberNotAllowedForView, "CommitEdit")); 637throw new InvalidOperationException(SR.Format(SR.MemberNotAllowedForView, "CancelEdit")); 744throw new InvalidOperationException(SR.Format(SR.MemberNotAllowedForView, "AddNewItem")); 808throw new InvalidOperationException(SR.Format(SR.CannotChangeLiveShaping, "IsLiveSorting", "CanChangeLiveSorting")); 831throw new InvalidOperationException(SR.Format(SR.CannotChangeLiveShaping, "IsLiveFiltering", "CanChangeLiveFiltering")); 854throw 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)
1047throw new InvalidOperationException(SR.DocumentGridVisualTreeContainsNonBorderAsFirstElement); 1062throw new InvalidOperationException(SR.DocumentGridVisualTreeContainsNonDocumentGridPage); 1189throw new InvalidOperationException(SR.DocumentGridVisualTreeOutOfSync); 1217throw new InvalidOperationException(SR.DocumentGridVisualTreeContainsNonUIElement); 2456throw new InvalidOperationException(SR.DocumentGridInvalidViewMode);
MS\Internal\Documents\DocumentPageTextView.cs (11)
94throw new InvalidOperationException(SR.TextViewInvalidLayout); 119throw new InvalidOperationException(SR.TextViewInvalidLayout); 141throw new InvalidOperationException(SR.TextViewInvalidLayout); 170throw new InvalidOperationException(SR.TextViewInvalidLayout); 206throw new InvalidOperationException(SR.TextViewInvalidLayout); 237throw new InvalidOperationException(SR.TextViewInvalidLayout); 254throw new InvalidOperationException(SR.TextViewInvalidLayout); 271throw new InvalidOperationException(SR.TextViewInvalidLayout); 288throw new InvalidOperationException(SR.TextViewInvalidLayout); 305throw new InvalidOperationException(SR.TextViewInvalidLayout); 322throw 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)
1001throw 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\wpf\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\wpf\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); 352throw new InvalidOperationException(SR.AnnotationServiceNotEnabled); 387throw new InvalidOperationException(SR.AnnotationServiceNotEnabled); 421throw new InvalidOperationException(SR.AnnotationServiceNotEnabled); 1037throw new InvalidOperationException(SR.AnnotationServiceAlreadyExists); 1123throw 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)
4112throw new InvalidOperationException(SR.DataGrid_CannotSelectCell); 7103throw new InvalidOperationException(SR.DataGrid_ProbableInvalidSortDescription, invalidOperationException);
System\Windows\Controls\DataGridColumnHeaderCollection.cs (3)
104throw new InvalidOperationException(); 112throw new InvalidOperationException(); 128throw 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)
183throw new InvalidOperationException(SR.Format(SR.StyleForWrongType, style.TargetType.Name, this.GetType().Name)); 264throw 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)
1004throw 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)
487throw new InvalidOperationException(SR.TextProvider_TextSelectionNotSupported); 638throw 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); 653throw new InvalidOperationException(SR.WebBrowserNoCastToIWebBrowser2); 739throw 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)
1271throw new InvalidOperationException(SR.Format(SR.RequiresExplicitCulture, TargetProperty.Name)); 1836throw new InvalidOperationException(SR.BindingGroup_CannotChangeGroups); 2106throw 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")); } 1917throw new InvalidOperationException(SR.Format(SR.InconsistentBindingList, InternalList, args.ListChangedType)); 1929throw new InvalidOperationException(SR.Format(SR.InconsistentBindingList, InternalList, args.ListChangedType)); 1986throw new InvalidOperationException(SR.Format(SR.InconsistentBindingList, InternalList, args.ListChangedType)); 2169throw new InvalidOperationException(SR.Format(SR.MemberNotAllowedDuringAddOrEdit, "Sorting")); 2308throw new InvalidOperationException(SR.Format(SR.MemberNotAllowedDuringAddOrEdit, "Grouping")); 2318throw new InvalidOperationException(SR.Format(SR.MemberNotAllowedDuringAddOrEdit, "Grouping")); 2450throw new InvalidOperationException(SR.CannotMoveToUnknownPosition); 2515throw 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); 2666throw new InvalidOperationException(SR.Format(SR.CollectionChangeIndexOutOfRange, index, ilFull.Count)); 2673throw new InvalidOperationException(SR.Format(SR.AddedItemNotAtIndex, index)); 2680throw new InvalidOperationException(SR.AddedItemNotInCollection); 2906throw new InvalidOperationException(SR.Format(SR.MemberNotAllowedDuringAddOrEdit, "Sorting")); 2999throw new InvalidOperationException(SR.Format(SR.MemberNotAllowedDuringAddOrEdit, "Grouping")); 3009throw 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); 380e = new InvalidOperationException(SR.ObjectDataProviderHasNoSource); 477e = new InvalidOperationException(SR.Format(SR.ObjectDataProviderNonCLSException, _objectType.Name)); 556e = 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); 1384throw new InvalidOperationException(SR.FlowDocumentInvalidContnetChange); 1437throw new InvalidOperationException(SR.FlowDocumentInvalidContnetChange); 1472throw 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)
176throw new InvalidOperationException(SR.Format(SR.CanOnlyHaveOneChild, typeof(PageContent), value)); 269throw 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)
3215throw new InvalidOperationException(SR.Format(SR.NotInThisTree, "position")); 3223throw new InvalidOperationException(SR.NoElement);
System\windows\Documents\TextEditor.cs (1)
325throw 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); 1011throw new InvalidOperationException(SR.ChildWindowNotCreated); 1018throw new InvalidOperationException(SR.HostedWindowMustBeAChildWindow); 1024throw 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)
562throw new InvalidOperationException(SR.InvalidOperation_CantChangeJournalOwnership); 1102throw new InvalidOperationException(SR.Format(SR.WrongNavigateRootElement, bp.ToString())); 1411throw new InvalidOperationException(SR.InvalidOperation_AddBackEntryNoContent); 1427throw new InvalidOperationException( 1632throw new InvalidOperationException(SR.InvalidOperation_CannotReenterPageFunction); 1711throw new InvalidOperationException(SR.NoForwardEntry); 1725throw new InvalidOperationException(SR.NoBackEntry); 2916throw new InvalidOperationException(SR.FailedToConvertResource); 3664throw new InvalidOperationException(SR.WindowAlreadyClosed); 3866throw 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)); 554throw new InvalidOperationException(SR.Format(SR.PropertyPathInvalidAccessor, 560throw new InvalidOperationException(SR.Format(SR.PathParametersIndexOutOfRange, index, PathParameters.Count)); 577throw new InvalidOperationException(SR.Format(SR.PropertyPathNoOwnerType, ownerName)); 637throw new InvalidOperationException(SR.Format(SR.PropertyPathNoProperty, ownerType.Name, propertyName)); 726throw new InvalidOperationException(SR.Format(SR.PathParameterIsNull, index)); 730throw new InvalidOperationException(SR.Format(SR.PathParametersIndexOutOfRange, index, PathParameters.Count)); 754throw new InvalidOperationException(SR.Format(SR.PropertyPathIndexWrongType, paramList[i].parenString, paramList[i].valueString));
System\Windows\ResourceDictionary.cs (12)
227throw new InvalidOperationException(SR.Format(SR.ResourceDictionaryLoadFromFailure, _source.ToString())); 435throw new InvalidOperationException(SR.ResourceDictionaryIsReadOnly); 630throw new InvalidOperationException(SR.ResourceDictionaryIsReadOnly); 690throw new InvalidOperationException(SR.ResourceDictionaryIsReadOnly); 878throw new InvalidOperationException(SR.ResourceDictionaryIsReadOnly); 992throw new InvalidOperationException(SR.NestedBeginInitNotSupported); 1011throw new InvalidOperationException(SR.EndInitWithoutBeginInitNotSupported); 1178throw new InvalidOperationException(SR.ResourceDictionaryDuplicateDeferredContent); 1183throw new InvalidOperationException(SR.ResourceDictionaryDeferredContentFailure); 1506throw new InvalidOperationException(SR.ResourceDictionaryInvalidMergedDictionary); 1528throw new InvalidOperationException(SR.ResourceDictionaryInvalidMergedDictionary); 1550throw 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)
892throw new InvalidOperationException("Unable to combine two HRGNs.");
System\Windows\Standard\NativeMethods.cs (1)
1572throw 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); 794throw new InvalidOperationException(SR.ChangeNotAllowedAfterShow); 1233throw new InvalidOperationException(SR.CantSetOwnerAfterDialogIsShown); 1241throw new InvalidOperationException(SR.CantSetOwnerToClosedWindow); 1243throw new InvalidOperationException(SR.CantSetOwnerWhosHwndIsNotCreated); 1382throw new InvalidOperationException(SR.DialogResultMustBeSetAfterShowDialog); 1777throw new InvalidOperationException(SR.WindowMustBeRoot); 2391throw new InvalidOperationException(SR.WindowMustBeRoot); 3214throw new InvalidOperationException(SR.CantSetOwnerAfterDialogIsShown); 3693throw new InvalidOperationException(SR.ReshowNotAllowed); 3701throw new InvalidOperationException(SR.InvalidOperationDuringClosing); 3706throw new InvalidOperationException(SR.InvalidCompositionTarget); 3714throw new InvalidOperationException(SR.NotAllowedBeforeShow); 6307throw new InvalidOperationException(SR.TransformNotSupported); 6321throw new InvalidOperationException(SR.ClipToBoundsNotSupported); 6822throw new InvalidOperationException(SR.IncorrectFlowDirection); 6932throw new InvalidOperationException(SR.MustUseWindowStyleNone); 6943throw 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(
PromptAgentChat (2)
Program.cs (2)
30?? throw new InvalidOperationException($"{environmentPrefix}_PROJECTENDPOINT is not set."); 32?? throw new InvalidOperationException($"{environmentPrefix}_AGENTNAME is not set.");
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); 649throw new InvalidOperationException(SR.ReachPackaging_DocumentWasClosed); 854throw new InvalidOperationException(SR.ReachPackaging_DocumentWasClosed); 858throw new InvalidOperationException(SR.ReachPackaging_SigningDoesNotMeetPolicy);
PrintConfig\PTProvider.cs (1)
558throw 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");
RepoTasks (10)
src\aspnetcore\src\Shared\CertificateGeneration\CertificateManager.cs (5)
447throw new InvalidOperationException($"The directory '{exportDir}' does not exist. Choose permissions carefully when creating it."); 715throw new InvalidOperationException("Unknown format."); 914throw new InvalidOperationException($"'{nameof(RemoveLocations.Undefined)}' is not a valid location."); 926throw new InvalidOperationException("Invalid location."); 982throw new InvalidOperationException($"Failed to create a key with a size of {minimumKeySize} bits");
src\aspnetcore\src\Shared\CertificateGeneration\MacOSCertificateManager.cs (4)
110throw new InvalidOperationException("There was an error trusting the certificate."); 262throw new InvalidOperationException($@"There was an error removing the certificate with thumbprint '{certificate.Thumbprint}'. 278throw new InvalidOperationException($"Can't determine the subject for the certificate with subject '{certificate.Subject}'."); 360throw new InvalidOperationException("Failed to add the certificate to the keychain. Are you running in a non-interactive session perhaps?");
src\aspnetcore\src\Shared\CertificateGeneration\UnixCertificateManager.cs (1)
532throw new InvalidOperationException($@"There was an error removing the certificate with thumbprint '{certificate.Thumbprint}'.");
Roslyn.Diagnostics.Analyzers (55)
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\roslyn\src\Compilers\Core\Portable\Collections\SmallDictionary.cs (2)
193throw new InvalidOperationException(); 460throw new InvalidOperationException();
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\ReaderWriterLockSlimExtensions.cs (2)
93throw new InvalidOperationException(); 101throw new InvalidOperationException();
src\roslyn\src\Compilers\Core\Portable\Text\TextChangeRangeExtensions.cs (1)
323throw new InvalidOperationException();
src\roslyn\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\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (1)
102throw new InvalidOperationException($"Unexpected concurrent access to {GetType()}");
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+ValueBuilder.cs (1)
68throw new InvalidOperationException($"Unexpected concurrent access to {GetType()}");
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+ValueBuilder.cs (1)
78throw new InvalidOperationException($"Unexpected concurrent access to {GetType()}");
src\roslyn\src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Enumerator.cs (2)
24public object? Current => throw new InvalidOperationException(); 33throw new InvalidOperationException();
src\roslyn\src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Enumerator`1.cs (1)
24public new T Current => throw new InvalidOperationException();
src\roslyn\src\Dependencies\Contracts\Contract.cs (1)
161throw new InvalidOperationException($"{message} - file {fileName} line {lineNumber}");
src\roslyn\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\roslyn\src\Dependencies\Threading\ParallelExtensions.NetFramework.cs (2)
592Enumerator = source.GetEnumerator() ?? throw new InvalidOperationException(); 618Enumerator = source.GetAsyncEnumerator(Cancellation.Token) ?? throw new InvalidOperationException();
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Extensions\IOperationExtensions.cs (1)
520throw new InvalidOperationException();
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\SmallDictionary.cs (2)
306throw new InvalidOperationException(); 573throw new InvalidOperationException();
src\roslyn\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\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (1)
24=> node.Parent ?? throw new InvalidOperationException("Node's parent was null");
src\roslyn\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\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser.cs (1)
89trimmedDictionary[key.Trim()] = allRawConventions.TryGetValue(key, out var value) ? value : throw new InvalidOperationException();
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\NamingStyle.cs (2)
83throw new InvalidOperationException(); 170default: throw new InvalidOperationException();
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (1)
482throw new InvalidOperationException();
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Serialization\ObjectWriter.cs (1)
286throw new InvalidOperationException($"Unsupported object type: {value.GetType()}");
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\BKTree.Builder.cs (1)
201throw new InvalidOperationException();
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\StringEscapeEncoder.cs (1)
138throw new InvalidOperationException();
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\TaskExtensions.cs (1)
36throw new InvalidOperationException($"{nameof(WaitAndGetResult)} cannot be called from a thread pool thread.");
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationConstructedMethodSymbol.cs (1)
85=> throw new System.InvalidOperationException();
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationMethodSymbol.cs (1)
110=> throw new InvalidOperationException();
src\roslyn\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\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\ISolutionExtensions.cs (3)
37=> solution.GetDocument(syntaxTree) ?? throw new InvalidOperationException(); 44throw new InvalidOperationException(string.Format(WorkspaceExtensionsResources.Project_of_ID_0_is_required_to_accomplish_the_task_but_is_not_available_from_the_solution, projectId)); 128=> new InvalidOperationException(string.Format(WorkspaceExtensionsResources.The_solution_does_not_contain_the_specified_document, debugName ?? "Unknown"));
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\ProjectExtensions.cs (1)
99throw new InvalidOperationException(string.Format(WorkspaceExtensionsResources.Compilation_is_required_to_accomplish_the_task_but_is_not_supported_by_project_0, project.Name));
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\AddImports\AbstractAddImportsService.cs (1)
123throw new InvalidOperationException();
Roslyn.Diagnostics.CSharp.Analyzers (11)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SemanticModelExtensions.cs (8)
462?? throw new InvalidOperationException(); 468?? throw new InvalidOperationException(); 474?? throw new InvalidOperationException(); 480?? throw new InvalidOperationException(); 486?? throw new InvalidOperationException(); 492?? throw new InvalidOperationException(); 498?? throw new InvalidOperationException(); 504?? throw new InvalidOperationException();
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxTriviaExtensions.cs (1)
115throw new InvalidOperationException();
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\ExpressionGenerator.cs (1)
246tokenFactory, isNegative: x => false, negate: t => throw new InvalidOperationException(), integerMinValueString: null);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ITypeSymbolExtensions.TypeSyntaxGeneratorVisitor.cs (1)
58throw new InvalidOperationException("This symbol cannot be converted into a NameSyntax");
rzc (7)
CommandLine\CommandLineApplication.cs (1)
118throw new InvalidOperationException(message);
DefaultRequestDispatcher.cs (1)
291throw new InvalidOperationException($"Unexpected enum value {result.CloseReason}");
Json\JsonDataReader.cs (1)
43throw new InvalidOperationException(
Json\ThrowHelper.cs (2)
214=> throw new InvalidOperationException(message); 233=> throw new InvalidOperationException(message);
ServerProtocol\ServerResponse.cs (1)
122throw new InvalidOperationException("Received invalid response type from server.");
ShutdownCommand.cs (1)
47throw new InvalidOperationException("Couldn't connect to the server.");
sdk-tasks (6)
_generated\4\SdkTasksJsonSerializerContext.g.cs (2)
72throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 80throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
CalculateTemplateVersions.cs (1)
53throw new InvalidOperationException("Could not find single item with UseVersionForTemplateInstallPath for templates with TemplateFrameworkVersion: " + g.Key);
CopyPreservingRelativeSymlinks.cs (1)
114throw new InvalidOperationException(
ExtractArchiveToDirectory.cs (1)
196throw new System.InvalidOperationException("Entry is outside the target dir: " + destinationFileName);
GenerateRuntimeAnalyzersSWR.cs (1)
69throw new InvalidOperationException($"File not found: {path}");
SelectTests (10)
ChangedFileFilter.cs (1)
50throw new InvalidOperationException($"prefilter patterns_file not found: {patternsPath}");
GraphAffectedProjects.cs (4)
130throw new InvalidOperationException($"Solution was not found: {solutionPath}"); 469throw new InvalidOperationException("Provide either changedFilesPath or from (with optional to)."); 544?? throw new InvalidOperationException("Failed to start git."); 554throw new InvalidOperationException($"git diff failed ({process.ExitCode}): {stderr}");
Program.cs (5)
280throw new InvalidOperationException($"Solution was not found: {slnxPath}"); 406throw new InvalidOperationException("Provide either --changed-files or --from (with optional --to)."); 429throw new InvalidOperationException($"git diff failed ({exitCode}): {stderr}"); 481throw new InvalidOperationException($"Layer 1 (affected-projects graph) failed: {inner.Message}", inner); 1283?? throw new InvalidOperationException($"Failed to start '{fileName}'.");
Shared (10)
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();
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);
Shared.Tests (22)
Generated\361d1da7f942c932\TestTypesContext.PocoWithRecursiveMembers.g.cs (2)
61Setter = static (obj, value) => throw new global::System.InvalidOperationException("Setting init-only properties is not supported in source generation mode."), 81Setter = static (obj, value) => throw new global::System.InvalidOperationException("Setting init-only properties is not supported in source generation mode."),
Generated\361d1da7f942c932\TestTypesContext.RecordWithOptionalParameters.g.cs (10)
61Setter = static (obj, value) => throw new global::System.InvalidOperationException("Setting init-only properties is not supported in source generation mode."), 81Setter = static (obj, value) => throw new global::System.InvalidOperationException("Setting init-only properties is not supported in source generation mode."), 103Setter = static (obj, value) => throw new global::System.InvalidOperationException("Setting init-only properties is not supported in source generation mode."), 123Setter = static (obj, value) => throw new global::System.InvalidOperationException("Setting init-only properties is not supported in source generation mode."), 143Setter = static (obj, value) => throw new global::System.InvalidOperationException("Setting init-only properties is not supported in source generation mode."), 163Setter = static (obj, value) => throw new global::System.InvalidOperationException("Setting init-only properties is not supported in source generation mode."), 183Setter = static (obj, value) => throw new global::System.InvalidOperationException("Setting init-only properties is not supported in source generation mode."), 205Setter = static (obj, value) => throw new global::System.InvalidOperationException("Setting init-only properties is not supported in source generation mode."), 225Setter = static (obj, value) => throw new global::System.InvalidOperationException("Setting init-only properties is not supported in source generation mode."), 245Setter = static (obj, value) => throw new global::System.InvalidOperationException("Setting init-only properties is not supported in source generation mode."),
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\Context.g.cs (2)
77throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 85throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\TestTypesContext.g.cs (2)
74throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 82throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\TestTypesContext.PocoWithEnums.g.cs (2)
61Setter = static (obj, value) => throw new global::System.InvalidOperationException("Setting init-only properties is not supported in source generation mode."), 81Setter = static (obj, value) => throw new global::System.InvalidOperationException("Setting init-only properties is not supported in source generation mode."),
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\TestTypesContext.SimpleRecord.g.cs (4)
61Setter = static (obj, value) => throw new global::System.InvalidOperationException("Setting init-only properties is not supported in source generation mode."), 81Setter = static (obj, value) => throw new global::System.InvalidOperationException("Setting init-only properties is not supported in source generation mode."), 103Setter = static (obj, value) => throw new global::System.InvalidOperationException("Setting init-only properties is not supported in source generation mode."), 123Setter = static (obj, value) => throw new global::System.InvalidOperationException("Setting init-only properties is not supported in source generation mode."),
Stress.ApiService (1)
Program.cs (1)
242throw new InvalidOperationException($"Recursed to depth {depth}");
Stress.AppHost (3)
CommandResources.cs (1)
1072return arguments.GetString(name) ?? throw new InvalidOperationException($"The '{name}' argument is required.");
InteractionCommands.cs (2)
446throw new InvalidOperationException("Error!"); 467throw new InvalidOperationException("Error!");
SuperFileCheck (1)
Program.cs (1)
344throw new InvalidOperationException("SourceText is null.");
System.CodeDom (13)
Microsoft\CSharp\CSharpCodeGenerator.cs (6)
302throw new InvalidOperationException(SR.CodeGenReentrance); 3100throw new InvalidOperationException(SR.CodeGenOutputWriter); 3128throw new InvalidOperationException(SR.CodeGenOutputWriter); 3156throw new InvalidOperationException(SR.CodeGenOutputWriter); 3191throw new InvalidOperationException(SR.CodeGenOutputWriter); 3219throw 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 (35)
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 (3)
228throw new InvalidOperationException(SR.InvalidOperation_EmptyQueue); 243throw new InvalidOperationException(SR.InvalidOperation_EmptyQueue); 267throw new InvalidOperationException(SR.InvalidOperation_EmptyQueue);
System\Collections\Generic\SortedDictionary.cs (6)
461throw new InvalidOperationException(SR.InvalidOperation_EnumOpCantHappen); 479throw new InvalidOperationException(SR.InvalidOperation_EnumOpCantHappen); 492throw new InvalidOperationException(SR.InvalidOperation_EnumOpCantHappen); 505throw new InvalidOperationException(SR.InvalidOperation_EnumOpCantHappen); 660throw new InvalidOperationException(SR.InvalidOperation_EnumOpCantHappen); 821throw 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)
1900throw new InvalidOperationException(SR.InvalidOperation_EnumFailedVersion); 1953throw new InvalidOperationException(SR.InvalidOperation_EnumOpCantHappen); 1966throw new InvalidOperationException(SR.InvalidOperation_EnumFailedVersion);
System\Collections\Generic\Stack.cs (2)
349throw new InvalidOperationException(SR.InvalidOperation_EmptyStack); 406private static void ThrowInvalidVersion() => 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 (13)
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\OrderablePartitioner.cs (1)
171throw new InvalidOperationException("OrderablePartitioner_GetPartitions_WrongNumberOfPartitions");
System\Collections\Concurrent\PartitionerStatic.cs (5)
948throw new InvalidOperationException(SR.PartitionerStatic_CurrentCalledBeforeMoveNext); 1218throw new InvalidOperationException(SR.PartitionerStatic_CurrentCalledBeforeMoveNext); 1302throw new InvalidOperationException(SR.PartitionerStatic_CurrentCalledBeforeMoveNext); 1525throw new InvalidOperationException(SR.PartitionerStatic_CurrentCalledBeforeMoveNext); 1582throw new InvalidOperationException(SR.PartitionerStatic_CurrentCalledBeforeMoveNext);
System.Collections.Immutable (26)
System\Collections\Immutable\ImmutableArray_1.Builder.cs (1)
207throw new InvalidOperationException(SR.CapacityMustEqualCountOnMove);
System\Collections\Immutable\ImmutableArray_1.Minimal.cs (1)
435throw new InvalidOperationException(SR.InvalidOperationOnDefaultArray);
System\Collections\Immutable\ImmutableArray.cs (1)
156throw new InvalidOperationException(SR.InvalidOperationOnDefaultArray);
System\Collections\Immutable\ImmutableDictionary_2.Enumerator.cs (1)
127throw new InvalidOperationException(SR.CollectionModifiedDuringEnumeration);
System\Collections\Immutable\ImmutableDictionary_2.HashBucket.cs (4)
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 (1)
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 (1)
199throw new InvalidOperationException(SR.CollectionModifiedDuringEnumeration);
System\Collections\Immutable\ImmutableSortedSet_1.Enumerator.cs (1)
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\ThrowHelper.cs (2)
30throw new InvalidOperationException(); 34throw new InvalidOperationException(SR.InvalidOperation_IncompatibleComparer);
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) 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) throw new InvalidOperationException(SR.InvalidOperation_EnumOpCantHappen); 855if (!_current) throw new InvalidOperationException(SR.InvalidOperation_EnumOpCantHappen); 870if (_version != _sortedList.version) throw new InvalidOperationException(SR.InvalidOperation_EnumFailedVersion); 871if (!_current) 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.CommandLine (11)
Argument{T}.cs (1)
98throw new InvalidOperationException($"Argument \"{Name}\" does not have a default value");
Binding\ArgumentConverter.cs (1)
209_ => throw new InvalidOperationException(result.ErrorMessage),
Help\HelpBuilder.Default.cs (2)
32_ => throw new InvalidOperationException("Symbol must be an Argument or Option.") 75_ => throw new InvalidOperationException()
Invocation\InvocationPipeline.cs (1)
130throw new InvalidOperationException($"{nameof(AsynchronousCommandLineAction)} called within non-async invocation.");
Parsing\ArgumentResult.cs (1)
82throw new InvalidOperationException($"{nameof(OnlyTake)} can only be called once.");
Parsing\SymbolResult.cs (4)
133null => Argument<T>.CreateDefaultValue() ?? throw new InvalidOperationException($"{argument.Name} is required but was not provided."), 141null => throw new InvalidOperationException($"{option.Name} is required but was not provided."), 179SymbolResult _ => throw new InvalidOperationException($"{name} is not an option or argument."), 180_ => throw new InvalidOperationException($"{name} is required but was not provided."),
Parsing\SymbolResultTree.cs (1)
144throw new InvalidOperationException($"Command {parent.Name} has more than one child named \"{symbol.Name}\".");
System.CommandLine.StaticCompletions (3)
CompletionsCommandParser.cs (1)
37var shellName = args.GetValue(command.GenerateScriptCommand.ShellArgument) ?? throw new InvalidOperationException();
ShellName.cs (2)
32var shellPath = Environment.GetEnvironmentVariable("SHELL") ?? throw new InvalidOperationException(Strings.ShellDiscovery_ShellEnvironmentNotSet); 40throw new InvalidOperationException(string.Format(Strings.ShellDiscovery_ShellNotSupported, shellName, string.Join(", ", All)));
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); 200throw new InvalidOperationException(SR.RangeAttribute_Must_Set_Min_And_Max); 222throw new InvalidOperationException(SR.RangeAttribute_Must_Set_Operand_Type); 227throw 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)
243throw new InvalidOperationException( 250throw new InvalidOperationException( 290throw new InvalidOperationException(SR.Format(SR.ValidationAttribute_ResourceTypeDoesNotHaveProperty, 297throw 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)
176throw new InvalidOperationException(SR.InvalidOperation_RevertAndCompleteActionsMustNotThrow, new AggregateException(exceptions)); 211throw new InvalidOperationException(SR.InvalidOperation_RevertAndCompleteActionsMustNotThrow, new AggregateException(exceptions)); 259throw new InvalidOperationException(SR.AtomicComposition_AlreadyNested); 321throw new InvalidOperationException(SR.AtomicComposition_PartOfAnotherAtomicComposition); 330throw 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)
3448if (desc == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetExtendedTypeDescriptor")); 3450if (attrs == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetAttributes")); 3471if (desc == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetExtendedTypeDescriptor")); 3493if (desc == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetExtendedTypeDescriptor")); 3514if (desc == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetExtendedTypeDescriptor")); 3516if (converter == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetConverter")); 3536if (desc == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetExtendedTypeDescriptor")); 3538if (converter == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetConverter")); 3559if (desc == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetExtendedTypeDescriptor")); 3579if (desc == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetExtendedTypeDescriptor")); 3601if (desc == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetExtendedTypeDescriptor")); 3621if (desc == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetExtendedTypeDescriptor")); 3623if (events == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetEvents")); 3642if (desc == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetExtendedTypeDescriptorFromRegisteredType")); 3644if (events == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetEventsFromRegisteredType")); 3669if (desc == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetExtendedTypeDescriptor")); 3671if (evts == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetEvents")); 3691if (desc == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetExtendedTypeDescriptor")); 3693if (properties == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetProperties")); 3712if (desc == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetExtendedTypeDescriptor")); 3714if (properties == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetProperties")); 3739if (desc == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetExtendedTypeDescriptor")); 3741if (properties == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetProperties")); 3763if (desc == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetExtendedTypeDescriptor")); 3811throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetTypeDescriptor")); 3814throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetAttributes")); 3838throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetTypeDescriptor")); 3863throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetTypeDescriptor")); 3889throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetTypeDescriptor")); 3892throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetConverter")); 3916throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetTypeDescriptor")); 3919throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetConverterFromRegisteredType")); 3944throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetTypeDescriptor")); 3970throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetTypeDescriptor")); 3998throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetTypeDescriptor")); 4023throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetTypeDescriptor")); 4026throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetEvents")); 4050throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetTypeDescriptorFromRegisteredType")); 4053throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetEventsFromRegisteredType")); 4078throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetTypeDescriptor")); 4081throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetEvents")); 4106throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetTypeDescriptor")); 4110throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetProperties")); 4134throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetTypeDescriptor")); 4139throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetPropertiesFromRegisteredType")); 4164throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetTypeDescriptor")); 4167throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetProperties")); 4191throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetTypeDescriptor")); 4215throw 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\runtime\src\libraries\System.Private.CoreLib\src\System\IO\PersistedFiles.Unix.cs (1)
39throw new InvalidOperationException(SR.PersistedFiles_NoHomeDirectory);
System\Console.cs (1)
163throw new InvalidOperationException(SR.InvalidOperation_ConsoleKeyAvailableOnFile);
System\ConsolePal.Unix.cs (1)
136throw new InvalidOperationException(SR.InvalidOperation_ConsoleReadKeyOnFile);
System\TermInfo.cs (6)
167throw new InvalidOperationException(SR.IO_TermInfoInvalid); 307throw new InvalidOperationException(SR.IO_TermInfoInvalid); 329throw new InvalidOperationException(SR.IO_TermInfoInvalid); 366throw new InvalidOperationException(SR.InvalidOperation_PrintF); 378throw new InvalidOperationException(SR.InvalidOperation_PrintF); 403else 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\runtime\src\libraries\Common\src\System\Data\Common\AdapterUtil.cs (1)
111InvalidOperationException 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); 1813throw new InvalidOperationException(SR.DataDom_EnforceConstraintsShouldBeOff); 1867throw new InvalidOperationException(SR.DataDom_EnforceConstraintsShouldBeOff); 1918throw new InvalidOperationException(SR.DataDom_EnforceConstraintsShouldBeOff); 2160throw new InvalidOperationException(SR.DataDom_DataSetNameChange); 2165throw new InvalidOperationException(SR.DataDom_ColumnNameChange); 2167throw new InvalidOperationException(SR.DataDom_ColumnNamespaceChange); 2169throw new InvalidOperationException(SR.DataDom_ColumnMappingChange); 2174throw new InvalidOperationException(SR.DataDom_TableNameChange); 2176throw new InvalidOperationException(SR.DataDom_TableNamespaceChange); 2184throw new InvalidOperationException(SR.DataDom_TableColumnsChange); 2193throw new InvalidOperationException(SR.DataDom_DataSetTablesChange); 2204throw new InvalidOperationException(SR.DataDom_DataSetNestedRelationsChange); 2214throw new InvalidOperationException(SR.DataDom_DataSetNestedRelationsChange); 2223throw 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\runtime\src\libraries\Common\src\System\Data\Common\AdapterUtil.cs (1)
111InvalidOperationException e = new InvalidOperationException(error);
System.Data.OleDb (2)
System\Data\Common\AdapterUtil.cs (2)
130InvalidOperationException e = new InvalidOperationException(error); 142InvalidOperationException e = new InvalidOperationException(error, inner);
System.Diagnostics.DiagnosticSource (18)
System\Diagnostics\Activity.cs (12)
690NotifyError(new InvalidOperationException(SR.ActivitySetParentAlreadyStarted)); 694NotifyError(new InvalidOperationException(SR.SetParentIdOnActivityWithParent)); 698NotifyError(new InvalidOperationException(SR.ParentIdAlreadySet)); 720NotifyError(new InvalidOperationException(SR.ActivitySetParentAlreadyStarted)); 724NotifyError(new InvalidOperationException(SR.SetParentIdOnActivityWithParent)); 728NotifyError(new InvalidOperationException(SR.ParentIdAlreadySet)); 749NotifyError(new InvalidOperationException(SR.StartTimeNotUtc)); 769NotifyError(new InvalidOperationException(SR.EndTimeNotUtc)); 803NotifyError(new InvalidOperationException(SR.ActivityStartAlreadyStarted)); 858NotifyError(new InvalidOperationException(SR.ActivityNotStarted)); 1064NotifyError(new InvalidOperationException(SR.SetFormatOnStartedActivity)); 1450NotifyError(new InvalidOperationException(SR.ActivityNotRunning));
System\Diagnostics\ActivitySourceFactory.cs (1)
38throw new InvalidOperationException(SR.InvalidActivitySourceScope);
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.EventLog (29)
src\runtime\src\libraries\Common\src\System\Diagnostics\NetFrameworkUtils.cs (1)
134throw new InvalidOperationException(SR.Format(SR.RegKeyMissingShort, "HKEY_LOCAL_MACHINE", machineName));
System\Diagnostics\EventLog.cs (7)
296throw new InvalidOperationException(SR.Format(SR.RegKeyMissing, "SYSTEM\\CurrentControlSet\\Services\\EventLog", logName, source, machineName)); 298throw new InvalidOperationException(SR.Format(SR.LocalRegKeyMissing, "SYSTEM\\CurrentControlSet\\Services\\EventLog", logName, source)); 370throw new InvalidOperationException(SR.BadLogName); 383throw new InvalidOperationException(SR.Format(SR.RegKeyNoAccess, "HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\EventLog", machineName)); 389throw new InvalidOperationException(SR.Format(SR.MissingLog, logName, machineName)); 465throw new InvalidOperationException(SR.Format(SR.CannotDeleteEqualSource, source)); 639throw new InvalidOperationException(SR.Format(SR.RegKeyMissingShort, EventLogKey, machineName));
System\Diagnostics\EventLogEntryCollection.cs (1)
86throw new InvalidOperationException(SR.NoCurrentEntry);
System\Diagnostics\EventLogInternal.cs (13)
189throw new InvalidOperationException(SR.Format(SR.MissingLog, GetLogName(currentMachineName), currentMachineName)); 428throw new InvalidOperationException(SR.CantMonitorEventLog, new Win32Exception()); 452throw new InvalidOperationException(SR.InitTwice); 769throw new InvalidOperationException(SR.CantRetrieveEntries, new Win32Exception(error)); 771throw new InvalidOperationException(SR.CantRetrieveEntries); 930throw new InvalidOperationException(SR.Format(SR.CantReadLogEntryAt, index.ToString()), new Win32Exception()); 970throw new InvalidOperationException(SR.BadLogName); 979throw new InvalidOperationException(SR.Format(SR.RegKeyMissingShort, EventLogKey, currentMachineName)); 983throw new InvalidOperationException(SR.Format(SR.MissingLog, logname, currentMachineName)); 1001throw new InvalidOperationException(SR.Format(SR.MissingLog, GetLogName(currentMachineName), currentMachineName)); 1064throw new InvalidOperationException(SR.Format(SR.LogDoesNotExists, logname, currentMachineName)); 1083throw new InvalidOperationException(SR.Format(SR.CantOpenLog, logname, currentMachineName, e?.Message ?? "")); 1108throw new InvalidOperationException(SR.Format(SR.CantOpenLogAccess, sourceName), e);
System\Diagnostics\Reader\EventLogReader.cs (3)
160throw new InvalidOperationException(); 307throw new InvalidOperationException(); 313throw new InvalidOperationException();
System\Diagnostics\Reader\EventLogSession.cs (1)
137throw new InvalidOperationException();
System\Diagnostics\Reader\EventLogWatcher.cs (2)
70throw new InvalidOperationException(); 154throw new InvalidOperationException();
System\Diagnostics\Reader\NativeWrapper.cs (1)
685throw new InvalidOperationException();
System.Diagnostics.PerformanceCounter (80)
src\runtime\src\libraries\Common\src\Interop\Windows\Advapi32\Interop.PERF_INFO.cs (1)
192throw new InvalidOperationException(SR.Format(SR.InvalidPerfData, type.Name));
src\runtime\src\libraries\Common\src\System\Diagnostics\NetFrameworkUtils.cs (1)
134throw new InvalidOperationException(SR.Format(SR.RegKeyMissingShort, "HKEY_LOCAL_MACHINE", machineName));
System\Diagnostics\CounterSampleCalculator.cs (1)
79throw new InvalidOperationException(SR.MismatchedCounterTypes);
System\Diagnostics\PerformanceCounter.cs (16)
230throw new InvalidOperationException(SR.CantSetLifetimeAfterInitialized); 434throw new InvalidOperationException(SR.ReadOnlyCounter); 470throw new InvalidOperationException(SR.CategoryNameMissing); 472throw new InvalidOperationException(SR.CounterNameMissing); 477throw new InvalidOperationException(SR.Format(SR.CounterExists, currentCategoryName, _counterName)); 483throw new InvalidOperationException(SR.Format(SR.MultiInstanceOnly, currentCategoryName)); 488throw new InvalidOperationException(SR.Format(SR.SingleInstanceOnly, currentCategoryName)); 492throw new InvalidOperationException(SR.InstanceLifetimeProcessonReadOnly); 499throw new InvalidOperationException(SR.RemoteWriting); 502throw new InvalidOperationException(SR.NotCustomCounter); 509throw new InvalidOperationException(SR.Format(SR.MultiInstanceOnly, currentCategoryName)); 514throw new InvalidOperationException(SR.Format(SR.SingleInstanceOnly, currentCategoryName)); 518throw new InvalidOperationException(SR.InstanceLifetimeProcessforSingleInstance); 552throw new InvalidOperationException(SR.Format(SR.InstanceNameProhibited, _instanceName)); 559throw new InvalidOperationException(SR.InstanceNameRequired); 588throw new InvalidOperationException(SR.ReadOnlyRemoveInstance);
System\Diagnostics\PerformanceCounterCategory.cs (13)
88throw new InvalidOperationException(SR.CategoryNameNotSet); 146throw new InvalidOperationException(SR.CategoryNameNotSet); 224throw new InvalidOperationException(SR.Format(SR.PerformanceCategoryExists, categoryName)); 315throw new InvalidOperationException(SR.CounterLayout); 322throw new InvalidOperationException(SR.CounterLayout); 328throw new InvalidOperationException(SR.CounterLayout); 342throw new InvalidOperationException(SR.CounterLayout); 378throw new InvalidOperationException(SR.CantDeleteCategory); 460throw new InvalidOperationException(SR.CategoryNameNotSet); 463throw new InvalidOperationException(SR.Format(SR.MissingInstance, instanceName, _categoryName)); 504throw new InvalidOperationException(SR.CategoryNameNotSet); 517throw new InvalidOperationException(SR.CategoryNameNotSet); 558throw new InvalidOperationException(SR.CategoryNameNotSet);
System\Diagnostics\PerformanceCounterLib.cs (14)
382throw new InvalidOperationException(SR.Format(SR.MissingCategory, category) + "\r\n" + categories); 796throw new InvalidOperationException(SR.Format(SR.MissingCategory, category)); 827throw new InvalidOperationException(SR.Format(SR.MissingCategory, category)); 840throw new InvalidOperationException(SR.Format(SR.CantReadCategory, category)); 866throw new InvalidOperationException(SR.Format(SR.MissingCategory, category)); 931throw new InvalidOperationException(SR.Format(SR.MissingCategory, category)); 959throw new InvalidOperationException(SR.Format(SR.MissingCounter, counter)); 1095throw new InvalidOperationException(SR.Format(SR.CategoryHelpCorrupt, names[index * 2])); 1100throw new InvalidOperationException(SR.Format(SR.CounterNameCorrupt, names[index * 2])); 1340throw new InvalidOperationException(SR.Format(SR.CounterDataCorrupt, perfDataKey.ToString()), e); 1428throw new InvalidOperationException(SR.Format(SR.CantReadCategoryIndex, categoryIndex.ToString())); 1630throw new InvalidOperationException(SR.CounterLayout); 1637throw new InvalidOperationException(SR.Format(SR.CantReadCounter, counter)); 1737throw new InvalidOperationException(SR.Format(SR.CantReadInstance, instanceName));
System\Diagnostics\PerformanceData\CounterSet.cs (11)
95throw new InvalidOperationException(SR.Format(SR.Perflib_InvalidOperation_NoActiveProvider, _providerGuid)); 103throw new InvalidOperationException(SR.Format(SR.Perflib_InvalidOperation_AddCounterAfterInstance, _counterSet)); 110throw new InvalidOperationException(SR.Format(SR.Perflib_InvalidOperation_AddCounterAfterInstance, _counterSet)); 141throw new InvalidOperationException(SR.Format(SR.Perflib_InvalidOperation_NoActiveProvider, _providerGuid)); 145throw new InvalidOperationException(SR.Format(SR.Perflib_InvalidOperation_AddCounterAfterInstance, _counterSet)); 152throw new InvalidOperationException(SR.Format(SR.Perflib_InvalidOperation_AddCounterAfterInstance, _counterSet)); 183throw new InvalidOperationException(SR.Format(SR.Perflib_InvalidOperation_NoActiveProvider, _providerGuid)); 193throw new InvalidOperationException(SR.Format(SR.Perflib_InvalidOperation_NoActiveProvider, _providerGuid)); 197throw new InvalidOperationException(SR.Format(SR.Perflib_InvalidOperation_NoActiveProvider, _providerGuid)); 201throw new InvalidOperationException(SR.Format(SR.Perflib_InvalidOperation_CounterSetContainsNoCounter, _counterSet)); 255(uint)Interop.Errors.ERROR_ALREADY_EXISTS => new InvalidOperationException(SR.Format(SR.Perflib_Argument_CounterSetAlreadyRegister, _counterSet)),
System\Diagnostics\PerformanceData\CounterSetInstance.cs (1)
55throw new InvalidOperationException(SR.Format(SR.Perflib_InvalidOperation_CounterSetNotInstalled, _counterSet._counterSet));
System\Diagnostics\PerformanceData\CounterSetInstanceCounterDataSet.cs (2)
122throw new InvalidOperationException(SR.Format(SR.Perflib_InvalidOperation_NoActiveProvider, _instance._counterSet._providerGuid)); 153(uint)Interop.Errors.ERROR_NOT_FOUND => new InvalidOperationException(SR.Format(SR.Perflib_InvalidOperation_CounterRefValue, _instance._counterSet._counterSet, CounterDef.Key, _instance._instName)),
System\Diagnostics\SharedPerformanceCounter.cs (20)
99throw new InvalidOperationException(SR.InstanceNameTooLong); 104throw new InvalidOperationException(SR.ProcessLifetimeNotValidInGlobal); 177throw new InvalidOperationException(SR.CountersOOM); 591throw new InvalidOperationException(SR.MappingCorrupted); 605throw new InvalidOperationException(SR.MappingCorrupted); 613throw new InvalidOperationException(SR.MappingCorrupted); 965throw new InvalidOperationException(SR.Format(SR.SingleInstanceOnly, _categoryName)); 970throw new InvalidOperationException(SR.Format(SR.MultiInstanceOnly, _categoryName)); 976throw new InvalidOperationException(SR.Format(SR.MultiInstanceOnly, _categoryName)); 1036throw new InvalidOperationException(SR.CantConvertProcessToGlobal); 1040throw new InvalidOperationException(SR.Format(SR.InstanceAlreadyExists, instanceName)); 1046throw new InvalidOperationException(SR.Format(SR.InstanceAlreadyExists, instanceName)); 1052throw new InvalidOperationException(SR.CantConvertGlobalToProcess); 1625throw new InvalidOperationException(SR.MappingCorrupted); 1639throw new InvalidOperationException(SR.MappingCorrupted); 1662throw new InvalidOperationException(SR.SharedMemoryGhosted); 1690throw new InvalidOperationException(SR.SetSecurityDescriptorFailed); 1748throw new InvalidOperationException(SR.CantCreateFileMapping); 1753throw new InvalidOperationException(SR.CantMapFileView); 1758throw new InvalidOperationException(SR.CantGetMappingSize);
System.Diagnostics.Process (58)
Microsoft\Win32\SafeHandles\SafeProcessHandle.cs (2)
177throw new InvalidOperationException(SR.CantSetRedirectForSafeProcessHandleStart); 486throw new InvalidOperationException(SR.InvalidProcessHandle);
Microsoft\Win32\SafeHandles\SafeProcessHandle.Unix.cs (3)
50throw new InvalidOperationException(SR.InvalidProcessHandle); 180throw new InvalidOperationException(SR.InvalidProcessHandle); 199return exitStatus ?? throw new InvalidOperationException();
src\runtime\src\libraries\Common\src\Interop\Unix\System.Native\Interop.GetHostName.cs (1)
36throw new InvalidOperationException($"{nameof(GetHostName)}: {err}");
src\runtime\src\libraries\Common\src\System\IO\StringParser.cs (3)
51throw new InvalidOperationException(); 132throw new InvalidOperationException(); 249throw new InvalidOperationException();
System\Diagnostics\Process.cs (24)
562throw new InvalidOperationException(SR.CantGetProcessStartInfo); 575throw new InvalidOperationException(SR.CantSetProcessStartInfo); 671throw new InvalidOperationException(SR.CantGetStandardIn); 689throw new InvalidOperationException(SR.CantGetStandardOut); 698throw new InvalidOperationException(SR.CantMixSyncAsyncOperation); 715throw new InvalidOperationException(SR.CantGetStandardError); 724throw new InvalidOperationException(SR.CantMixSyncAsyncOperation); 924throw new InvalidOperationException(SR.NoAssociatedProcess); 937throw new InvalidOperationException(SR.ProcessIdRequired); 955throw new InvalidOperationException(SR.WaitTillExit); 960throw new InvalidOperationException(SR.NoProcessHandle); 1713throw new InvalidOperationException(SR.NoAssociatedProcess); 1833return TryGetExitStatus(out exitStatus) ? exitStatus : throw new InvalidOperationException(SR.Format(SR.ProcessHasExited, _processId.ToString())); 1868return TryGetExitStatus(out exitStatus) ? true : throw new InvalidOperationException(SR.Format(SR.ProcessHasExited, _processId.ToString())); 1903return TryGetExitStatus(out exitStatus) ? exitStatus : throw new InvalidOperationException(SR.Format(SR.ProcessHasExited, _processId.ToString())); 1922throw new InvalidOperationException(SR.CantMixSyncAsyncOperation); 1926throw new InvalidOperationException(SR.PendingAsyncOperation); 1934throw new InvalidOperationException(SR.CantGetStandardOut); 1959throw new InvalidOperationException(SR.CantMixSyncAsyncOperation); 1964throw new InvalidOperationException(SR.PendingAsyncOperation); 1973throw new InvalidOperationException(SR.CantGetStandardError); 1997throw new InvalidOperationException(SR.NoAsyncOperation); 2018throw new InvalidOperationException(SR.NoAsyncOperation); 2107throw new InvalidOperationException(SR.NoProcessInfo);
System\Diagnostics\Process.Multiplexing.cs (4)
603throw new InvalidOperationException(SR.CantGetStandardOut); 607throw new InvalidOperationException(SR.CantGetStandardError); 611throw new InvalidOperationException(SR.CantMixSyncAsyncOperation); 615throw new InvalidOperationException(SR.CantMixSyncAsyncOperation);
System\Diagnostics\Process.NonUap.cs (1)
26throw new InvalidOperationException(SR.KillEntireProcessTree_DisallowedBecauseTreeContainsCallingProcess);
System\Diagnostics\Process.Scenarios.cs (2)
381throw new InvalidOperationException(SR.Format(SR.UseShellExecuteNotSupportedForScenario, methodName)); 389throw new InvalidOperationException(SR.Format(SR.RedirectStandardOutputAndErrorRequired, methodName));
System\Diagnostics\Process.Unix.cs (2)
404throw new InvalidOperationException(SR.Format(SR.ProcessHasExited, _processId.ToString())); 517private static bool WaitForInputIdleCore(int _ /*milliseconds*/) => throw new InvalidOperationException(SR.InputIdleUnknownError);
System\Diagnostics\ProcessStartInfo.cs (13)
434throw new InvalidOperationException(SR.FileNameMissing); 438throw new InvalidOperationException(SR.StandardInputEncodingNotAllowed); 442throw new InvalidOperationException(SR.StandardOutputEncodingNotAllowed); 446throw new InvalidOperationException(SR.StandardErrorEncodingNotAllowed); 450throw new InvalidOperationException(SR.ArgumentAndArgumentListInitialized); 468throw new InvalidOperationException(SR.CantRedirectStreams); 473throw new InvalidOperationException(SR.StartDetachedNotCompatible); 484throw new InvalidOperationException(SR.StartSuspendedNotCompatible); 490throw new InvalidOperationException(SR.InheritedHandlesRequiresCreateProcess); 497throw new InvalidOperationException(SR.KillOnParentExitCannotBeUsedWithUseShellExecute); 551throw new InvalidOperationException(SR.CantSetHandleAndRedirect); 555throw new InvalidOperationException(SR.CantSetHandleAndRedirect); 559throw new InvalidOperationException(SR.CantSetHandleAndRedirect);
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\Runtime\InteropServices\UnixProcessStartArguments.cs (1)
111throw new InvalidOperationException(SR.Format(SR.UseShellExecuteNotSupportedForScenario, nameof(Start)));
System.DirectoryServices (109)
Interop\AdsValueHelper2.cs (1)
198throw new InvalidOperationException(SR.DSConvertTypeInvalid);
Interop\EnumVariant.cs (1)
43throw new InvalidOperationException(SR.DSEnumerator);
Interop\UnsafeNativeMethods.cs (1)
35throw new InvalidOperationException(SR.DSAdsiNotInstalled);
System\DirectoryServices\ActiveDirectory\ActiveDirectorySchemaClass.cs (1)
427throw new InvalidOperationException(SR.CannotGetObject);
System\DirectoryServices\ActiveDirectory\ActiveDirectorySchemaClassCollection.cs (7)
63throw new InvalidOperationException(SR.Format(SR.SchemaObjectNotCommitted, value.Name)); 83throw new InvalidOperationException(SR.Format(SR.SchemaObjectNotCommitted, schemaClass.Name)); 158throw new InvalidOperationException(SR.Format(SR.SchemaObjectNotCommitted, schemaClass.Name)); 179throw new InvalidOperationException(SR.Format(SR.SchemaObjectNotCommitted, schemaClass.Name)); 198throw new InvalidOperationException(SR.Format(SR.SchemaObjectNotCommitted, schemaClass.Name)); 224throw new InvalidOperationException(SR.Format(SR.SchemaObjectNotCommitted, schemaClass.Name)); 333throw new InvalidOperationException(SR.Format(SR.SchemaObjectNotCommitted, ((ActiveDirectorySchemaClass)value).Name));
System\DirectoryServices\ActiveDirectory\ActiveDirectorySchemaProperty.cs (1)
464throw new InvalidOperationException(SR.CannotGetObject);
System\DirectoryServices\ActiveDirectory\ActiveDirectorySchemaPropertyCollection.cs (7)
64throw new InvalidOperationException(SR.Format(SR.SchemaObjectNotCommitted, value.Name)); 84throw new InvalidOperationException(SR.Format(SR.SchemaObjectNotCommitted, schemaProperty.Name)); 161throw new InvalidOperationException(SR.Format(SR.SchemaObjectNotCommitted, schemaProperty.Name)); 182throw new InvalidOperationException(SR.Format(SR.SchemaObjectNotCommitted, schemaProperty.Name)); 201throw new InvalidOperationException(SR.Format(SR.SchemaObjectNotCommitted, schemaProperty.Name)); 241throw new InvalidOperationException(SR.Format(SR.SchemaObjectNotCommitted, schemaProperty.Name)); 348throw new InvalidOperationException(SR.Format(SR.SchemaObjectNotCommitted, ((ActiveDirectorySchemaProperty)value).Name));
System\DirectoryServices\ActiveDirectory\ActiveDirectorySite.cs (2)
859throw new InvalidOperationException(SR.CannotDelete); 1079throw new InvalidOperationException(SR.CannotGetObject);
System\DirectoryServices\ActiveDirectory\ActiveDirectorySiteCollection.cs (7)
34throw new InvalidOperationException(SR.Format(SR.SiteNotCommitted, site.Name)); 48throw new InvalidOperationException(SR.Format(SR.SiteNotCommitted, site.Name)); 78throw new InvalidOperationException(SR.Format(SR.SiteNotCommitted, site.Name)); 105throw new InvalidOperationException(SR.Format(SR.SiteNotCommitted, site.Name)); 127throw new InvalidOperationException(SR.Format(SR.SiteNotCommitted, site.Name)); 140throw new InvalidOperationException(SR.Format(SR.SiteNotCommitted, site.Name)); 236throw new InvalidOperationException(SR.Format(SR.SiteNotCommitted, ((ActiveDirectorySite)value).Name));
System\DirectoryServices\ActiveDirectory\ActiveDirectorySiteLink.cs (2)
608throw new InvalidOperationException(SR.CannotDelete); 638throw new InvalidOperationException(SR.CannotGetObject);
System\DirectoryServices\ActiveDirectory\ActiveDirectorySiteLinkBridge.cs (2)
264throw new InvalidOperationException(SR.CannotDelete); 294throw new InvalidOperationException(SR.CannotGetObject);
System\DirectoryServices\ActiveDirectory\ActiveDirectorySiteLinkCollection.cs (7)
28throw new InvalidOperationException(SR.Format(SR.SiteLinkNotCommitted, link.Name)); 43throw new InvalidOperationException(SR.Format(SR.SiteLinkNotCommitted, link.Name)); 76throw new InvalidOperationException(SR.Format(SR.SiteLinkNotCommitted, link.Name)); 104throw new InvalidOperationException(SR.Format(SR.SiteLinkNotCommitted, link.Name)); 127throw new InvalidOperationException(SR.Format(SR.SiteLinkNotCommitted, link.Name)); 141throw new InvalidOperationException(SR.Format(SR.SiteLinkNotCommitted, link.Name)); 237throw new InvalidOperationException(SR.Format(SR.SiteLinkNotCommitted, ((ActiveDirectorySiteLink)value).Name));
System\DirectoryServices\ActiveDirectory\ActiveDirectorySubnet.cs (3)
219throw new InvalidOperationException(SR.Format(SR.SiteNotCommitted, value)); 317throw new InvalidOperationException(SR.CannotDelete); 347throw new InvalidOperationException(SR.CannotGetObject);
System\DirectoryServices\ActiveDirectory\ActiveDirectorySubnetCollection.cs (7)
38throw new InvalidOperationException(SR.Format(SR.SubnetNotCommitted, subnet.Name)); 53throw new InvalidOperationException(SR.Format(SR.SubnetNotCommitted, subnet.Name)); 94throw new InvalidOperationException(SR.Format(SR.SubnetNotCommitted, subnet.Name)); 122throw new InvalidOperationException(SR.Format(SR.SubnetNotCommitted, subnet.Name)); 145throw new InvalidOperationException(SR.Format(SR.SubnetNotCommitted, subnet.Name)); 159throw new InvalidOperationException(SR.Format(SR.SubnetNotCommitted, subnet.Name)); 274throw new InvalidOperationException(SR.Format(SR.SubnetNotCommitted, ((ActiveDirectorySubnet)value).Name));
System\DirectoryServices\ActiveDirectory\ApplicationPartition.cs (12)
363throw new InvalidOperationException(SR.CannotPerformOperationOnUncommittedObject); 388throw new InvalidOperationException(SR.CannotPerformOperationOnUncommittedObject); 412throw new InvalidOperationException(SR.CannotPerformOperationOnUncommittedObject); 439throw new InvalidOperationException(SR.CannotPerformOperationOnUncommittedObject); 462throw new InvalidOperationException(SR.CannotPerformOperationOnUncommittedObject); 487throw new InvalidOperationException(SR.CannotPerformOperationOnUncommittedObject); 541throw new InvalidOperationException(SR.CannotPerformOperationOnUncommittedObject); 735throw new InvalidOperationException(SR.CannotGetObject); 890throw new InvalidOperationException(SR.NoObjectClassForADPartition); 1155throw new InvalidOperationException(SR.CannotPerformOperationOnUncommittedObject); 1197throw new InvalidOperationException(SR.CannotPerformOperationOnUncommittedObject); 1220throw new InvalidOperationException(SR.CannotPerformOperationOnUncommittedObject);
System\DirectoryServices\ActiveDirectory\DomainController.cs (1)
391throw new InvalidOperationException(SR.UpdateAvailableRIDPoolOverflowFailure);
System\DirectoryServices\ActiveDirectory\Exception.cs (2)
327exception = new InvalidOperationException(errorMessage, e); 334exception = new InvalidOperationException(errorMessage, e);
System\DirectoryServices\ActiveDirectory\GlobalCatalog.cs (2)
176throw new InvalidOperationException(SR.CannotPerformOnGCObject); 262throw new InvalidOperationException(SR.GCDisabled);
System\DirectoryServices\ActiveDirectory\ReplicationConnection.cs (2)
850throw new InvalidOperationException(SR.CannotDelete); 900throw new InvalidOperationException(SR.CannotGetObject);
System\DirectoryServices\ActiveDirectory\ReplicationConnectionCollection.cs (2)
20throw new InvalidOperationException(SR.Format(SR.ConnectionNotCommitted, connection.Name)); 43throw new InvalidOperationException(SR.Format(SR.ConnectionNotCommitted, connection.Name));
System\DirectoryServices\ActiveDirectory\TrustHelper.cs (2)
896throw new InvalidOperationException(SR.NT4NotSupported); 900throw new InvalidOperationException(SR.KerberosNotSupported);
System\DirectoryServices\ActiveDirectory\Utils.cs (9)
2062throw new InvalidOperationException(SR.Format(SR.UnableToOpenToken, lastError)); 2067throw new InvalidOperationException(SR.Format(SR.UnableToOpenToken, error)); 2087throw new InvalidOperationException( 2106throw new InvalidOperationException( 2123throw new InvalidOperationException( 2154throw new InvalidOperationException(SR.Format(SR.UnableToRetrievePolicy, global::Interop.Advapi32.LsaNtStatusToWinError(err))); 2165throw new InvalidOperationException(SR.Format(SR.UnableToRetrievePolicy, global::Interop.Advapi32.LsaNtStatusToWinError(err))); 2180throw new InvalidOperationException( 2209throw new InvalidOperationException(
System\DirectoryServices\ActiveDirectorySecurity.cs (15)
78throw new InvalidOperationException(SR.CannotModifyDacl); 88throw new InvalidOperationException(SR.CannotModifyDacl); 98throw new InvalidOperationException(SR.CannotModifyDacl); 108throw new InvalidOperationException(SR.CannotModifyDacl); 127throw new InvalidOperationException(SR.CannotModifyDacl); 137throw new InvalidOperationException(SR.CannotModifyDacl); 147throw new InvalidOperationException(SR.CannotModifyDacl); 157throw new InvalidOperationException(SR.CannotModifyDacl); 170throw new InvalidOperationException(SR.CannotModifySacl); 180throw new InvalidOperationException(SR.CannotModifySacl); 190throw new InvalidOperationException(SR.CannotModifySacl); 209throw new InvalidOperationException(SR.CannotModifySacl); 219throw new InvalidOperationException(SR.CannotModifySacl); 229throw new InvalidOperationException(SR.CannotModifySacl); 239throw new InvalidOperationException(SR.CannotModifySacl);
System\DirectoryServices\DirectoryEntries.cs (2)
38throw new InvalidOperationException(SR.Format(SR.DSNotAContainer, _container.Path)); 126throw new InvalidOperationException(SR.DSNoCurrentChild);
System\DirectoryServices\DirectoryEntry.cs (4)
662throw new InvalidOperationException(SR.Format(SR.DSNotAContainer, newParent.Path)); 682throw new InvalidOperationException(SR.DSCannotDelete); 873throw new InvalidOperationException(SR.Format(SR.DSNotAContainer, newParent.Path)); 1102throw new InvalidOperationException(SR.DSSDNoValues);
System\DirectoryServices\DirectorySearcher.cs (1)
940throw new InvalidOperationException(SR.Format(SR.DSSearchPreferencesNotAccepted, property));
System\DirectoryServices\PropertyCollection.cs (2)
208throw new InvalidOperationException(SR.DSNoCurrentProperty); 308throw new InvalidOperationException(SR.DSNoCurrentValue);
System\DirectoryServices\PropertyValueCollection.cs (3)
226throw new InvalidOperationException(SR.DSPropertyValueSupportOneOperation); 251throw new InvalidOperationException(SR.DSPropertyValueSupportOneOperation); 284throw new InvalidOperationException(SR.DSPropertyValueSupportOneOperation);
System\DirectoryServices\SearchResultCollection.cs (1)
292throw new InvalidOperationException(SR.DSNoCurrentEntry);
System.DirectoryServices.AccountManagement (96)
System\DirectoryServices\AccountManagement\AccountInfo.cs (8)
54throw new InvalidOperationException(SR.InvalidPropertyForStore); 86throw new InvalidOperationException(SR.InvalidPropertyForStore); 114throw new InvalidOperationException(SR.InvalidPropertyForStore); 135throw new InvalidOperationException(SR.InvalidPropertyForStore); 156throw new InvalidOperationException(SR.InvalidPropertyForStore); 189throw new InvalidOperationException(SR.InvalidPropertyForStore); 210throw new InvalidOperationException(SR.InvalidPropertyForStore); 231throw new InvalidOperationException(SR.InvalidPropertyForStore);
System\DirectoryServices\AccountManagement\AD\ADStoreCtx_LoadStore.cs (8)
64throw new InvalidOperationException(SR.ExtensionInvalidClassAttributes); 80throw new InvalidOperationException(SR.ExtensionInvalidClassAttributes); 144throw new InvalidOperationException(SR.ExtensionInvalidClassAttributes); 150throw new InvalidOperationException(SR.NameMustBeSetToPersistPrincipal); 1536throw new InvalidOperationException( 1541throw new InvalidOperationException(SR.StoreCtxGroupHasUnpersistedInsertedPrincipal); 1547throw new InvalidOperationException(SR.ADStoreCtxUnsupportedPrincipalContextForGroupInsert); 1651throw new InvalidOperationException(SR.StoreCtxNeedValueSecurityIdentityClaimToQuery);
System\DirectoryServices\AccountManagement\AD\ADStoreCtx_Query.cs (4)
161throw new InvalidOperationException( 207throw new InvalidOperationException(SR.Format(SR.StoreCtxUnsupportedPrincipalTypeForQuery, principalType)); 621throw new InvalidOperationException( 674throw new InvalidOperationException(SR.StoreCtxGuidIdentityClaimBadFormat);
System\DirectoryServices\AccountManagement\AD\ADStoreCtx.cs (6)
288throw new InvalidOperationException(SR.ADStoreCtxMustBeContainer); 726throw new InvalidOperationException(SR.ExtensionInvalidClassAttributes); 745throw new InvalidOperationException(SR.ExtensionInvalidClassAttributes); 1369throw new InvalidOperationException(SR.StoreCtxNeedValueSecurityIdentityClaimToQuery); 1442throw new InvalidOperationException(SR.StoreCtxNeedValueSecurityIdentityClaimToQuery); 1589throw new InvalidOperationException(SR.StoreCtxNeedValueSecurityIdentityClaimToQuery);
System\DirectoryServices\AccountManagement\AD\SDSUtils.cs (1)
219throw new InvalidOperationException(SR.Format(SR.StoreCtxUnsupportedPrincipalTypeForSave, p.GetType()));
System\DirectoryServices\AccountManagement\AuthenticablePrincipal.cs (2)
495throw new InvalidOperationException(); 506throw new InvalidOperationException();
System\DirectoryServices\AccountManagement\Computer.cs (2)
19throw new InvalidOperationException(SR.ComputerInvalidForAppDirectoryStore); 31throw new InvalidOperationException(SR.ComputerInvalidForAppDirectoryStore);
System\DirectoryServices\AccountManagement\exceptions.cs (2)
296exception = new InvalidOperationException(errorMessage, e); 303exception = new InvalidOperationException(errorMessage, e);
System\DirectoryServices\AccountManagement\FindResultEnumerator.cs (1)
40throw new InvalidOperationException(SR.FindResultEnumInvalidPos);
System\DirectoryServices\AccountManagement\interopt.cs (1)
31throw new InvalidOperationException(SR.AdsiNotInstalled);
System\DirectoryServices\AccountManagement\PasswordInfo.cs (1)
163throw new InvalidOperationException(SR.PasswordInfoChangePwdOnUnpersistedPrinc);
System\DirectoryServices\AccountManagement\Principal.cs (16)
53throw new InvalidOperationException(SR.PrincipalMustSetContextForProperty); 76throw new InvalidOperationException(SR.InvalidPropertyForStore); 100throw new InvalidOperationException(SR.InvalidPropertyForStore); 129throw new InvalidOperationException(SR.InvalidPropertyForStore); 151throw new InvalidOperationException(SR.InvalidPropertyForStore); 249throw new InvalidOperationException(SR.InvalidPropertyForStore); 307throw new InvalidOperationException(SR.PrincipalMustSetContextForSave); 344throw new InvalidOperationException(SR.NullArguments); 349throw new InvalidOperationException(SR.SaveToNotSupportedAgainstMachineStore); 364throw new InvalidOperationException(SR.SaveToMustHaveSamecontextType); 456throw new InvalidOperationException(SR.PrincipalCantDeleteUnpersisted); 497throw new InvalidOperationException(SR.PrincipalMustPersistFirst); 520throw new InvalidOperationException(SR.PrincipalMustSetContextForNative); 895throw new InvalidOperationException(SR.PrincipalAccessedAfterBeingDeleted); 972throw new InvalidOperationException(SR.UserMustSetContextForMethod); 1013throw new InvalidOperationException(SR.PrincipalNotSupportedOnFakePrincipal);
System\DirectoryServices\AccountManagement\PrincipalCollection.cs (2)
332throw new InvalidOperationException(explanation); 385throw new InvalidOperationException(explanation);
System\DirectoryServices\AccountManagement\PrincipalCollectionEnumerator.cs (2)
38throw new InvalidOperationException(SR.PrincipalCollectionEnumInvalidPos); 322throw new InvalidOperationException(SR.PrincipalCollectionEnumHasChanged);
System\DirectoryServices\AccountManagement\PrincipalSearcher.cs (9)
130throw new InvalidOperationException(SR.PrincipalSearcherMustSetFilter); 136throw new InvalidOperationException(SR.PrincipalSearcherPersistedPrincipal); 140throw new InvalidOperationException(SR.PrincipalSearcherNonReferentialProps); 147throw new InvalidOperationException(SR.PrincipalSearcherNoUnderlying); 164throw new InvalidOperationException(SR.PrincipalSearcherMustSetFilter); 171throw new InvalidOperationException(SR.PrincipalSearcherNoUnderlying); 251throw new InvalidOperationException(SR.PrincipalSearcherMustSetFilter); 256throw new InvalidOperationException(SR.PrincipalSearcherPersistedPrincipal); 260throw new InvalidOperationException(SR.PrincipalSearcherNonReferentialProps);
System\DirectoryServices\AccountManagement\SAM\SAMQuerySet.cs (2)
477throw new InvalidOperationException(SR.StoreCtxNT4IdentityClaimWrongForm); 501throw new InvalidOperationException(SR.StoreCtxSecurityIdentityClaimBadFormat);
System\DirectoryServices\AccountManagement\SAM\SAMStoreCtx_LoadStore.cs (11)
52throw new InvalidOperationException( 62throw new InvalidOperationException(SR.NameMustBeSetToPersistPrincipal); 902throw new InvalidOperationException( 954throw new InvalidOperationException( 963throw new InvalidOperationException( 974throw new InvalidOperationException(SR.SAMStoreCtxLocalGroupsOnly); 981throw new InvalidOperationException( 1075throw new InvalidOperationException( 1081throw new InvalidOperationException(SR.StoreCtxGroupHasUnpersistedInsertedPrincipal); 1098throw new InvalidOperationException(SR.SAMStoreCtxCouldntGetSIDForGroupMember); 1126throw new InvalidOperationException(SR.SAMStoreCtxCouldntGetSIDForGroupMember);
System\DirectoryServices\AccountManagement\SAM\SAMStoreCtx_Query.cs (2)
29throw new InvalidOperationException(SR.PrincipalSearcherNoUnderlying); 140throw new InvalidOperationException(
System\DirectoryServices\AccountManagement\SAM\SAMStoreCtx.cs (7)
464throw new InvalidOperationException(SR.SAMStoreCtxNoComputerPasswordSet); 489throw new InvalidOperationException(SR.SAMStoreCtxNoComputerPasswordSet); 510throw new InvalidOperationException(SR.SAMStoreCtxNoComputerPasswordExpire); 524throw new InvalidOperationException(SR.SAMStoreCtxNoComputerPasswordExpire); 655throw new InvalidOperationException(SR.StoreCtxNeedValueSecurityIdentityClaimToQuery); 692throw new InvalidOperationException(SR.StoreCtxNeedValueSecurityIdentityClaimToQuery); 724throw new InvalidOperationException(SR.StoreCtxNeedValueSecurityIdentityClaimToQuery);
System\DirectoryServices\AccountManagement\StoreCtx.cs (1)
338throw new InvalidOperationException(
System\DirectoryServices\AccountManagement\TrackedCollectionEnumerator.cs (2)
29throw new InvalidOperationException(SR.TrackedCollectionEnumInvalidPos); 186throw new InvalidOperationException(SR.TrackedCollectionEnumHasChanged);
System\DirectoryServices\AccountManagement\User.cs (6)
57throw new InvalidOperationException(SR.InvalidPropertyForStore); 78throw new InvalidOperationException(SR.InvalidPropertyForStore); 99throw new InvalidOperationException(SR.InvalidPropertyForStore); 120throw new InvalidOperationException(SR.InvalidPropertyForStore); 141throw new InvalidOperationException(SR.InvalidPropertyForStore); 162throw new InvalidOperationException(SR.InvalidPropertyForStore);
System.DirectoryServices.Protocols (3)
System\DirectoryServices\Protocols\ldap\LdapConnection.cs (3)
438throw new InvalidOperationException(SR.NoPartialResults); 940throw new InvalidOperationException(SR.InvalidClientCertificates); 998throw new InvalidOperationException(SR.InvalidAuthCredential);
System.Drawing.Common (8)
System\Drawing\Bitmap.cs (2)
233throw new InvalidOperationException(SR.CantMakeIconTransparent); 319throw new InvalidOperationException(SR.GdiplusCannotSetPixelFromIndexedPixelFormat);
System\Drawing\BufferedGraphicsContext.cs (1)
466throw new InvalidOperationException(SR.GraphicsBufferCurrentlyBusy);
System\Drawing\Drawing2D\Matrix.cs (1)
187throw new InvalidOperationException(SR.GdiplusObjectBusy);
System\Drawing\Icon.cs (1)
408throw new InvalidOperationException(SR.Format(SR.IllegalState, GetType().Name));
System\Drawing\Image.cs (1)
922created = dataStream = File.OpenRead(filename ?? throw new InvalidOperationException());
System\Drawing\Pen.cs (1)
755throw new InvalidOperationException();
System\Drawing\Printing\PrinterSettings.cs (1)
575_ => throw new InvalidOperationException()
System.Formats.Asn1 (28)
System\Formats\Asn1\AsnCharacterStringEncodings.cs (4)
228throw new InvalidOperationException(); 260throw new InvalidOperationException(); 292throw new InvalidOperationException(); 326throw new InvalidOperationException();
System\Formats\Asn1\AsnCharacterStringEncodings.net.cs (5)
235throw new InvalidOperationException(); 267throw new InvalidOperationException(); 415throw new InvalidOperationException(); 446throw new InvalidOperationException(); 469throw 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 (41)
System\Formats\Cbor\Reader\CborReader.cs (7)
148throw new InvalidOperationException(SR.Cbor_Reader_NoMoreDataItemsToRead); 156throw new InvalidOperationException(SR.Cbor_Reader_NoMoreDataItemsToRead); 190throw new InvalidOperationException(SR.Format(SR.Cbor_Reader_MajorTypeMismatch, (int)result.MajorType)); 202throw new InvalidOperationException(SR.Cbor_NotAtEndOfIndefiniteLengthDataItem); 246throw new InvalidOperationException(SR.Cbor_Reader_IsAtRootContext); 253throw new InvalidOperationException(SR.Format(SR.Cbor_PopMajorTypeMismatch, (int)_currentMajorType.Value)); 258throw 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(); 139throw new InvalidOperationException(SR.Cbor_Reader_NotIndefiniteLengthString); 271throw new InvalidOperationException(); 307throw 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)
62throw new InvalidOperationException(SR.Format(SR.Cbor_ConformanceMode_IndefiniteLengthItemsNotSupported, ConformanceMode));
System\Formats\Cbor\Writer\CborWriter.cs (8)
271throw new InvalidOperationException(SR.Cbor_Writer_IncompleteCborDocument); 304throw new InvalidOperationException(SR.Format(SR.Cbor_Writer_MaximumDepthExceeded, MaxDepth)); 347throw new InvalidOperationException(SR.Format(SR.Cbor_PopMajorTypeMismatch, (int)_currentMajorType)); 351throw new InvalidOperationException(SR.Cbor_Reader_IsAtRootContext); 360throw new InvalidOperationException(SR.Format(SR.Cbor_PopMajorTypeMismatch, (int)CborMajorType.Tag)); 365throw new InvalidOperationException(SR.Cbor_NotAtEndOfDefiniteLengthDataItem); 417throw new InvalidOperationException(SR.Cbor_Writer_DefiniteLengthExceeded); 431throw new InvalidOperationException(SR.Cbor_Writer_CannotNestDataItemsInIndefiniteLengthStrings);
System\Formats\Cbor\Writer\CborWriter.Map.cs (3)
57throw new InvalidOperationException(SR.Cbor_Writer_MapIncompleteKeyValuePair); 81throw new InvalidOperationException(SR.Format(SR.Cbor_ConformanceMode_IndefiniteLengthItemsNotSupported, ConformanceMode)); 111throw 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)); 169throw 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(); 109_ => throw new InvalidOperationException() 127_ => 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\GnuSparseStream.cs (1)
341throw new InvalidOperationException(SR.IO_NotSupported_UnseekableStream);
System\Formats\Tar\PosixTarEntry.cs (2)
61throw new InvalidOperationException(SR.TarEntryBlockOrCharacterExpected); 88throw new InvalidOperationException(SR.TarEntryBlockOrCharacterExpected);
System\Formats\Tar\TarEntry.cs (5)
137throw new InvalidOperationException(SR.TarEntryHardLinkOrSymLinkExpected); 218throw new InvalidOperationException(SR.Format(SR.TarEntryTypeNotSupportedForExtracting, EntryType)); 253return Task.FromException(new InvalidOperationException(SR.Format(SR.TarEntryTypeNotSupportedForExtracting, EntryType))); 275throw new InvalidOperationException(SR.Format(SR.TarEntryDoesNotSupportDataStream, Name, EntryType)); 632throw new InvalidOperationException(SR.Format(SR.TarEntryTypeNotSupportedForExtracting, EntryType));
System\Formats\Tar\TarHeader.Read.cs (1)
686throw new InvalidOperationException(SR.Format(SR.TarSizeFieldTooLargeForEntryType, _typeFlag.ToString()));
System.IO.Compression (25)
src\runtime\src\libraries\Common\src\System\IO\Compression\ZLibNative.cs (1)
264throw new InvalidOperationException("InitializationState != " + requiredState.ToString());
System\IO\Compression\DeflateManaged\DeflateManagedStream.cs (3)
252throw new InvalidOperationException(SR.InvalidBeginCall); 264throw new InvalidOperationException(SR.InvalidBeginCall); 273throw new InvalidOperationException(SR.CannotWriteToDeflateStream);
System\IO\Compression\DeflateZLib\DeflateStream.cs (3)
393throw new InvalidOperationException(SR.CannotReadFromDeflateStream); 402throw new InvalidOperationException(SR.CannotWriteToDeflateStream); 1144throw new InvalidOperationException(SR.InvalidBeginCall);
System\IO\Compression\ZipArchiveEntry.cs (7)
267throw new InvalidOperationException(SR.LengthAfterWrite); 396throw new InvalidOperationException(SR.LengthAfterWrite); 545throw new InvalidOperationException(SR.CannotBeWrittenInReadMode); 551throw new InvalidOperationException(SR.CannotBeReadInCreateMode); 1217?? throw new InvalidOperationException(SR.EmptyPassword); 1233?? throw new InvalidOperationException(SR.EmptyPassword); 2193throw new InvalidOperationException(SR.DeletedEntry);
System\IO\Compression\Zstandard\ZstandardDecoder.cs (1)
376throw new InvalidOperationException(SR.ZstandardEncoderDecoder_InvalidState);
System\IO\Compression\Zstandard\ZstandardEncoder.cs (2)
410throw new InvalidOperationException(SR.ZstandardEncoderDecoder_InvalidState); 438throw new InvalidOperationException(SR.ZstandardEncoderDecoder_InvalidState);
System\IO\Compression\Zstandard\ZstandardStream.Compress.cs (4)
84throw new InvalidOperationException(SR.CannotWriteToDecompressionStream); 96throw new InvalidOperationException(SR.CannotWriteToDecompressionStream); 157throw new InvalidOperationException(SR.CannotWriteToDecompressionStream); 279throw new InvalidOperationException(SR.CannotWriteToDecompressionStream);
System\IO\Compression\Zstandard\ZstandardStream.cs (1)
240throw new InvalidOperationException(SR.ZstandardStream_ConcurrentRWOperation);
System\IO\Compression\Zstandard\ZstandardStream.Decompress.cs (2)
140throw new InvalidOperationException(SR.CannotReadFromCompressionStream); 314throw new InvalidOperationException(SR.CannotReadFromCompressionStream);
System\IO\Compression\Zstandard\ZstandardUtils.cs (1)
79return new InvalidOperationException(SR.ZstandardEncoderDecoder_InvalidState);
System.IO.Compression.Brotli (10)
System\IO\Compression\BrotliStream.cs (1)
231throw new InvalidOperationException(SR.InvalidBeginCall);
System\IO\Compression\dec\BrotliStream.Decompress.cs (3)
61throw new InvalidOperationException(SR.BrotliStream_Compress_UnsupportedOperation); 145throw new InvalidOperationException(SR.BrotliStream_Compress_UnsupportedOperation); 210throw 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)
82throw new InvalidOperationException(SR.BrotliStream_Decompress_UnsupportedOperation); 93throw new InvalidOperationException(SR.BrotliStream_Compress_InvalidData); 147throw new InvalidOperationException(SR.BrotliStream_Decompress_UnsupportedOperation); 169throw new InvalidOperationException(SR.BrotliStream_Compress_InvalidData);
System.IO.FileSystem.AccessControl (3)
System\Security\AccessControl\DirectoryObjectSecurity.cs (3)
320throw new InvalidOperationException(SR.InvalidOperation_RemoveFail); 365throw new InvalidOperationException(SR.InvalidOperation_RemoveFail); 459throw new InvalidOperationException(SR.InvalidOperation_RemoveFail);
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\runtime\src\libraries\Common\src\Interop\Unix\System.Native\Interop.GetHostName.cs (1)
36throw new InvalidOperationException($"{nameof(GetHostName)}: {err}");
System\IO\Pipes\NamedPipeClientStream.cs (2)
224throw new InvalidOperationException(SR.InvalidOperation_PipeNotYetConnected); 237throw 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)
256throw new InvalidOperationException(SR.CantSetRtsWithHandshaking); 264throw 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); 2784throw 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.Management (33)
System\Management\ManagementClass.cs (8)
460throw new InvalidOperationException(); 583throw new InvalidOperationException(); 676throw new InvalidOperationException(); 734throw new InvalidOperationException(); 1020throw new InvalidOperationException(); 1117throw new InvalidOperationException(); 1223throw new InvalidOperationException(); 1308throw new InvalidOperationException();
System\Management\ManagementEventWatcher.cs (1)
555throw new InvalidOperationException();
System\Management\ManagementObject.cs (13)
773throw new InvalidOperationException(); 893throw new InvalidOperationException(); 1028throw new InvalidOperationException(); 1144throw new InvalidOperationException(); 1265throw new InvalidOperationException(); 1371throw new InvalidOperationException(); 1947throw new InvalidOperationException(); 2010throw new InvalidOperationException(); 2133throw new InvalidOperationException(); 2178throw new InvalidOperationException(); 2279throw new InvalidOperationException(); 2344throw new InvalidOperationException(); 2440throw new InvalidOperationException();
System\Management\ManagementObjectCollection.cs (2)
479throw new InvalidOperationException(); 605throw new InvalidOperationException();
System\Management\ManagementObjectSearcher.cs (1)
490throw new InvalidOperationException();
System\Management\ManagementScope.cs (1)
928throw new InvalidOperationException();
System\Management\MethodSet.cs (2)
364throw new InvalidOperationException(); 426throw new InvalidOperationException();
System\Management\PropertySet.cs (4)
290throw new InvalidOperationException(); 417throw new InvalidOperationException(); 456throw new InvalidOperationException(); 498throw new InvalidOperationException();
System\Management\QualifierSet.cs (1)
363throw new InvalidOperationException();
System.Memory (3)
src\runtime\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 (25)
src\runtime\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)
58public 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); 1085throw new InvalidOperationException(SR.Format(SR.net_http_headers_not_allowed_header_name, descriptor.Name)); 1173throw new InvalidOperationException(SR.Format(SR.net_http_headers_not_allowed_header_name, name));
System\Net\Http\HttpClient.cs (5)
590throw new InvalidOperationException(SR.net_http_handler_noresponse); 750throw new InvalidOperationException(SR.net_http_operation_started); 758throw new InvalidOperationException(SR.net_http_client_request_already_sent); 767throw new InvalidOperationException(SR.net_http_client_invalid_requesturi); 780throw new InvalidOperationException(SR.net_http_client_invalid_requesturi);
System\Net\Http\HttpClientHandler.cs (1)
300throw new InvalidOperationException(SR.Format(SR.net_http_invalid_enable_first, nameof(ClientCertificateOptions), nameof(ClientCertificateOption.Manual)));
System\Net\Http\HttpContent.cs (3)
156throw new InvalidOperationException(SR.net_http_content_invalid_charset, e); 680var e = new InvalidOperationException(SR.net_http_content_no_task_returned); 850throw new InvalidOperationException(SR.net_http_content_buffer_stream_disposed);
System\Net\Http\MessageProcessingHandler.cs (1)
80sendState.TrySetException(ExceptionDispatchInfo.SetCurrentStackTrace(new InvalidOperationException(SR.net_http_handler_noresponse)));
System\Net\Http\SocketsHttpHandler\DecompressionHandler.cs (1)
195throw 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)
36throw new InvalidOperationException(SR.net_http_operation_started); 721ExceptionDispatchInfo.SetCurrentStackTrace(new InvalidOperationException(SR.net_http_chunked_not_allowed_with_empty_content)))); 752return ExceptionDispatchInfo.SetCurrentStackTrace(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.Http.WinHttpHandler (12)
System\Net\Http\NoWriteNoSeekStreamContent.cs (1)
43throw new InvalidOperationException(SR.net_http_content_stream_already_read);
System\Net\Http\WinHttpAuthHelper.cs (1)
361throw new InvalidOperationException(SR.net_http_username_empty_string);
System\Net\Http\WinHttpHandler.cs (7)
299throw new InvalidOperationException(SR.Format(SR.net_http_invalid_enable_first, "ClientCertificateOptions", "Manual")); 600throw new InvalidOperationException(SR.net_http_client_invalid_requesturi); 611throw new InvalidOperationException(SR.net_http_invalid_proxyusepolicy); 616throw new InvalidOperationException(SR.net_http_invalid_proxy); 622throw new InvalidOperationException(SR.net_http_invalid_cookiecontainer); 707throw new InvalidOperationException(SR.net_http_chunked_not_allowed_with_empty_content); 1600throw new InvalidOperationException(SR.net_http_operation_started);
System\Net\Http\WinHttpRequestStream.cs (1)
129throw new InvalidOperationException(SR.net_http_no_concurrent_io_allowed);
System\Net\Http\WinHttpResponseStream.cs (2)
112throw new InvalidOperationException(SR.net_http_no_concurrent_io_allowed); 216throw new InvalidOperationException(SR.net_http_no_concurrent_io_allowed);
System.Net.HttpListener (21)
src\runtime\src\libraries\Common\src\System\Net\LazyAsyncResult.cs (3)
97throw new InvalidOperationException("get_AsyncWaitHandle called in protected state"); 181throw new InvalidOperationException("get_CompletedSynchronously called in protected state"); 205throw 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)
361throw 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\runtime\src\libraries\Common\src\Interop\Unix\System.Native\Interop.GetHostName.cs (1)
36throw new InvalidOperationException($"{nameof(GetHostName)}: {err}");
System.Net.NetworkInformation (8)
src\runtime\src\libraries\Common\src\Interop\Unix\System.Native\Interop.GetDomainName.cs (1)
32throw new InvalidOperationException($"{nameof(GetDomainName)}: {err}");
src\runtime\src\libraries\Common\src\Interop\Unix\System.Native\Interop.GetHostName.cs (1)
36throw new InvalidOperationException($"{nameof(GetHostName)}: {err}");
src\runtime\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\runtime\src\libraries\Common\src\System\IO\StringParser.cs (3)
51throw new InvalidOperationException(); 132throw new InvalidOperationException(); 249throw new InvalidOperationException();
System.Net.Ping (1)
System\Net\NetworkInformation\Ping.cs (1)
97throw new InvalidOperationException(SR.net_inasync);
System.Net.Primitives (5)
src\runtime\src\libraries\Common\src\Interop\Unix\System.Native\Interop.GetDomainName.cs (1)
32throw new InvalidOperationException($"{nameof(GetDomainName)}: {err}");
src\runtime\src\libraries\Common\src\Interop\Unix\System.Native\Interop.GetHostName.cs (1)
36throw 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 (10)
src\runtime\src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.Initialization.cs (1)
42throw new InvalidOperationException();
src\runtime\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)
569throw new InvalidOperationException(SR.net_quic_accept_not_allowed);
System\Net\Quic\QuicStream.cs (5)
309throw new InvalidOperationException(SR.net_quic_reading_notallowed); 333throw new InvalidOperationException(SR.Format(SR.net_io_invalidnestedcall, "read")); 400return ValueTask.FromException(ExceptionDispatchInfo.SetCurrentStackTrace(new InvalidOperationException(SR.net_quic_writing_notallowed))); 418return ValueTask.FromException(ExceptionDispatchInfo.SetCurrentStackTrace(new InvalidOperationException(SR.Format(SR.net_io_invalidnestedcall, "write")))); 429return ValueTask.FromException(ExceptionDispatchInfo.SetCurrentStackTrace(new InvalidOperationException(SR.net_writecompleted_invalidcall)));
System.Net.Requests (46)
src\runtime\src\libraries\Common\src\System\Net\ContextAwareResult.cs (2)
134throw new InvalidOperationException(SR.net_completed_result); 157throw new InvalidOperationException(SR.net_completed_result);
src\runtime\src\libraries\Common\src\System\Net\LazyAsyncResult.cs (3)
97throw new InvalidOperationException("get_AsyncWaitHandle called in protected state"); 181throw new InvalidOperationException("get_CompletedSynchronously called in protected state"); 205throw 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)
269throw new InvalidOperationException(SR.net_reqsubmitted); 299throw new InvalidOperationException(SR.net_reqsubmitted); 322throw new InvalidOperationException(SR.net_reqsubmitted); 357throw new InvalidOperationException(SR.net_reqsubmitted); 395throw new InvalidOperationException(SR.net_reqsubmitted); 418throw new InvalidOperationException(SR.net_reqsubmitted); 450throw new InvalidOperationException(SR.net_reqsubmitted); 467throw 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 (58)
src\runtime\src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.Initialization.cs (1)
42throw new InvalidOperationException();
System\Net\NegotiateAuthenticationPal.ManagedNtlm.cs (4)
285public override IIdentity RemoteIdentity => throw new InvalidOperationException(); 842throw new InvalidOperationException(SR.net_auth_noauth); 862throw new InvalidOperationException(SR.net_auth_noauth); 891throw new InvalidOperationException(SR.net_auth_noauth);
System\Net\NegotiateAuthenticationPal.ManagedSpnego.cs (6)
78public override IIdentity RemoteIdentity => _mechanism?.RemoteIdentity ?? throw new InvalidOperationException(); 420throw new InvalidOperationException(SR.net_auth_noauth); 430throw new InvalidOperationException(SR.net_auth_noauth); 440throw new InvalidOperationException(SR.net_auth_noauth); 450throw new InvalidOperationException(SR.net_auth_noauth); 460throw 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)
184throw new InvalidOperationException(SR.net_auth_noauth); 228throw new InvalidOperationException(SR.net_auth_noauth); 333throw new InvalidOperationException(SR.net_auth_noauth); 360throw new InvalidOperationException(SR.net_auth_noauth); 388throw new InvalidOperationException(SR.net_auth_noauth); 412throw new InvalidOperationException(SR.net_auth_noauth); 437throw new InvalidOperationException(SR.net_auth_noauth);
System\Net\Security\NegotiateStream.cs (4)
642throw new InvalidOperationException(SR.net_auth_reauth); 657throw new InvalidOperationException(SR.net_auth_client_server); 723throw new InvalidOperationException(SR.net_auth_noauth); 735throw new InvalidOperationException(SR.Format(SR.net_io_invalidnestedcall, "authenticate"));
System\Net\Security\SslAuthenticationOptions.cs (4)
47throw new InvalidOperationException(SR.Format(SR.net_conflicting_options, nameof(RemoteCertificateValidationCallback))); 57throw new InvalidOperationException(SR.Format(SR.net_conflicting_options, nameof(LocalCertificateSelectionCallback))); 118throw new InvalidOperationException(SR.Format(SR.net_conflicting_options, nameof(ServerCertificateSelectionCallback))); 129throw new InvalidOperationException(SR.Format(SR.net_conflicting_options, nameof(RemoteCertificateValidationCallback)));
System\Net\Security\SslStream.cs (3)
703throw new InvalidOperationException(SR.net_ssl_certificate_exist); 965throw new InvalidOperationException(SR.net_ssl_io_already_shutdown); 972throw new InvalidOperationException(SR.net_auth_noauth);
System\Net\Security\SslStream.IO.cs (4)
180throw new InvalidOperationException(SR.Format(SR.net_io_invalidnestedcall, "authenticate")); 202throw new InvalidOperationException(SR.net_ssl_renegotiate_buffer); 276throw new InvalidOperationException(SR.Format(SR.net_io_invalidnestedcall, "authenticate")); 527throw new InvalidOperationException(SR.net_ssl_renegotiate_data);
System\Net\Security\TlsSession.cs (18)
338throw new InvalidOperationException( 415throw new InvalidOperationException( 632throw new InvalidOperationException(SR.net_tlssession_setcontext_server_only); 640throw new InvalidOperationException(SR.net_tlssession_server_options_already_supplied); 644throw new InvalidOperationException(SR.net_tlssession_setcontext_needs_context_first); 705throw new InvalidOperationException(SR.net_tlssession_setclientcert_client_only); 751throw new InvalidOperationException( 867throw new InvalidOperationException(SR.net_tlssession_handshake_already_complete); 1160throw new InvalidOperationException(SR.net_tlssession_handshake_not_complete); 1230throw new InvalidOperationException(SR.net_tlssession_handshake_not_complete); 1288throw new InvalidOperationException( 1370throw new InvalidOperationException( 1418throw new InvalidOperationException(SR.net_tlssession_request_client_cert_server_only); 1423throw new InvalidOperationException(SR.net_tlssession_handshake_not_complete); 1589throw new InvalidOperationException(SR.net_ssl_tlssession_context_not_set); 1905throw new InvalidOperationException(SR.net_tlssession_not_socket_bound); 2063throw new InvalidOperationException(SR.net_tlssession_handshake_not_complete); 2142throw new InvalidOperationException(SR.net_tlssession_handshake_not_complete);
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)
490throw new InvalidOperationException(SR.InvalidOperation_EnumerateOnlyOnce);
System.Net.Sockets (44)
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 (13)
508throw new InvalidOperationException(SR.net_sockets_mustnotbebound); 841throw new InvalidOperationException(SR.net_sockets_disconnectedConnect); 846throw new InvalidOperationException(SR.net_sockets_mustnotlisten); 1037throw new InvalidOperationException(SR.net_sockets_mustbind); 1042throw new InvalidOperationException(SR.net_sockets_mustlisten); 1047throw new InvalidOperationException(SR.net_sockets_disconnectedAccept); 1334throw new InvalidOperationException(SR.net_sockets_blocking); 1764throw new InvalidOperationException(SR.net_sockets_mustbind); 2853throw new InvalidOperationException(SR.net_sockets_mustbind); 2857throw new InvalidOperationException(SR.net_sockets_mustlisten); 2906throw new InvalidOperationException(SR.net_sockets_mustnotlisten); 3984throw new InvalidOperationException(SR.net_sockets_mustbind); 3995throw new InvalidOperationException(SR.net_invasync);
System\Net\Sockets\Socket.Tasks.cs (2)
157throw new InvalidOperationException(SR.net_sockets_mustnotlisten); 1353private static void ThrowIncorrectTokenException() => throw new InvalidOperationException(SR.InvalidOperation_IncorrectToken);
System\Net\Sockets\Socket.Unix.cs (1)
197throw 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); 545throw 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)
253throw new InvalidOperationException(SR.net_notconnected);
System\Net\Sockets\TCPListener.cs (6)
100throw new InvalidOperationException(SR.net_tcplistener_mustbestopped); 113throw new InvalidOperationException(SR.net_tcplistener_mustbestopped); 177throw new InvalidOperationException(SR.net_stopped); 188throw new InvalidOperationException(SR.net_stopped); 200throw new InvalidOperationException(SR.net_stopped); 227throw new InvalidOperationException(SR.net_stopped);
System\Net\Sockets\UDPClient.cs (7)
330throw new InvalidOperationException(SR.net_udpconnected); 339throw new InvalidOperationException(SR.net_udpconnected); 614throw new InvalidOperationException(SR.net_udpconnected); 869throw new InvalidOperationException(SR.net_udpconnected); 904throw new InvalidOperationException(SR.net_udpconnected); 949throw new InvalidOperationException(SR.net_notconnected); 974throw new InvalidOperationException(SR.net_notconnected);
System.Net.WebHeaderCollection (10)
System\Net\WebHeaderCollection.cs (10)
71throw new InvalidOperationException(SR.net_headers_req); 79throw new InvalidOperationException(SR.net_headers_req); 91throw new InvalidOperationException(SR.net_headers_rsp); 99throw new InvalidOperationException(SR.net_headers_rsp); 124throw new InvalidOperationException(SR.net_headers_req); 133throw new InvalidOperationException(SR.net_headers_rsp); 154throw new InvalidOperationException(SR.net_headers_req); 163throw new InvalidOperationException(SR.net_headers_rsp); 291throw new InvalidOperationException(SR.net_headers_req); 300throw new InvalidOperationException(SR.net_headers_rsp);
System.Net.WebSockets (2)
src\runtime\src\libraries\Common\src\System\IO\Compression\ZLibNative.cs (1)
264throw new InvalidOperationException("InitializationState != " + requiredState.ToString());
System\Net\WebSockets\ManagedWebSocket.cs (1)
1738private static void ThrowOperationInProgress(string? methodName) => throw new InvalidOperationException(SR.Format(SR.net_Websockets_AlreadyOneOutstandingOperation, methodName));
System.Net.WebSockets.Client (6)
System\Net\WebSockets\BrowserWebSockets\BrowserWebSocket.cs (3)
128if (_innerWebSocket == null) throw new InvalidOperationException(SR.net_WebSockets_NotConnected); 146throw new InvalidOperationException(SR.net_WebSockets_AlreadyStarted); 384throw new InvalidOperationException(SR.net_WebSockets_NotConnected);
System\Net\WebSockets\BrowserWebSockets\ClientWebSocketOptions.cs (1)
99throw new InvalidOperationException(SR.net_WebSockets_AlreadyStarted);
System\Net\WebSockets\ClientWebSocket.cs (2)
113throw new InvalidOperationException(SR.net_WebSockets_AlreadyStarted); 170throw new InvalidOperationException(SR.net_WebSockets_NotConnected);
System.ObjectModel (1)
System\Collections\ObjectModel\ObservableCollection.cs (1)
233throw new InvalidOperationException(SR.ObservableCollectionReentrancyNotAllowed);
System.Private.CoreLib (274)
src\runtime\src\coreclr\nativeaot\Common\src\System\Collections\Generic\LowLevelDictionary.cs (4)
243throw new InvalidOperationException("InvalidOperation_EnumFailedVersion"); 245throw new InvalidOperationException("InvalidOperation_EnumOpCantHappen"); 258throw new InvalidOperationException("InvalidOperation_EnumFailedVersion"); 277throw new InvalidOperationException("InvalidOperation_EnumFailedVersion");
src\runtime\src\coreclr\tools\Common\Internal\Runtime\DehydratedData.cs (1)
57throw new InvalidOperationException(); // decoder can only decode this many extra bytes
src\runtime\src\libraries\Common\src\Interop\Unix\System.Native\Interop.GetHostName.cs (1)
36throw new InvalidOperationException($"{nameof(GetHostName)}: {err}");
src\runtime\src\libraries\Common\src\System\IO\StringParser.cs (3)
51throw new InvalidOperationException(); 132throw new InvalidOperationException(); 249throw new InvalidOperationException();
src\runtime\src\libraries\System.Private.CoreLib\src\Internal\Runtime\InteropServices\ComponentActivator.cs (1)
343throw new InvalidOperationException(SR.InvalidOperation_FunctionMissingUnmanagedCallersOnly);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Collections\ArrayList.cs (11)
1124throw new InvalidOperationException(SR.InvalidOperation_EnumNotStarted); 1126throw new InvalidOperationException(SR.InvalidOperation_EnumEnded); 2125if (_version != _list._version) throw new InvalidOperationException(SR.InvalidOperation_EnumFailedVersion); 2144throw new InvalidOperationException(SR.InvalidOperation_EnumNotStarted); 2147throw new InvalidOperationException(SR.InvalidOperation_EnumEnded); 2155if (_version != _list._version) throw new InvalidOperationException(SR.InvalidOperation_EnumFailedVersion); 2182throw new InvalidOperationException(SR.InvalidOperation_UnderlyingArrayListChanged); 2573throw new InvalidOperationException(SR.InvalidOperation_EnumFailedVersion); 2615throw new InvalidOperationException(SR.InvalidOperation_EnumNotStarted); 2619throw new InvalidOperationException(SR.InvalidOperation_EnumEnded); 2631throw new InvalidOperationException(SR.InvalidOperation_EnumFailedVersion);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Collections\BitArray.cs (4)
1074throw new InvalidOperationException(SR.InvalidOperation_EnumFailedVersion); 1105throw new InvalidOperationException(SR.InvalidOperation_EnumFailedVersion); 1115return new InvalidOperationException(SR.InvalidOperation_EnumNotStarted); 1120return new InvalidOperationException(SR.InvalidOperation_EnumEnded);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Collections\Generic\Queue.cs (1)
350throw new InvalidOperationException(SR.InvalidOperation_EmptyQueue);
src\runtime\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\runtime\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); 353throw new InvalidOperationException(SR.InvalidOperation_EnumOpCantHappen); 363throw new InvalidOperationException(SR.InvalidOperation_EnumFailedVersion); 384throw new InvalidOperationException(SR.InvalidOperation_EnumFailedVersion);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\EventListener.cs (1)
546throw new InvalidOperationException(SR.EventSource_ListenerCreatedInsideCallback);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\EventSource.cs (2)
4111throw new InvalidOperationException(); 4123throw new InvalidOperationException();
src\runtime\src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\TraceLogging\TraceLoggingMetadataCollector.cs (1)
235throw new InvalidOperationException(SR.EventSource_IncorrentlyAuthoredTypeInfo);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Enum.cs (3)
1603throw new InvalidOperationException(SR.InvalidOperation_UnknownEnumType); 2140throw new InvalidOperationException(SR.Format(SR.Arg_OpenType, rt.ToString())); 2159new InvalidOperationException(SR.InvalidOperation_UnknownEnumType);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Globalization\Calendar.cs (1)
79throw new InvalidOperationException(SR.InvalidOperation_ReadOnly);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Globalization\CultureInfo.cs (1)
973throw new InvalidOperationException(SR.InvalidOperation_ReadOnly);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Globalization\DateTimeFormatInfo.cs (22)
352throw new InvalidOperationException(SR.InvalidOperation_ReadOnly); 382throw new InvalidOperationException(SR.InvalidOperation_ReadOnly); 601throw new InvalidOperationException(SR.InvalidOperation_ReadOnly); 635throw new InvalidOperationException(SR.InvalidOperation_ReadOnly); 666throw new InvalidOperationException(SR.InvalidOperation_ReadOnly); 687throw new InvalidOperationException(SR.InvalidOperation_ReadOnly); 708throw new InvalidOperationException(SR.InvalidOperation_ReadOnly); 742throw new InvalidOperationException(SR.InvalidOperation_ReadOnly); 784throw new InvalidOperationException(SR.InvalidOperation_ReadOnly); 804throw new InvalidOperationException(SR.InvalidOperation_ReadOnly); 838throw new InvalidOperationException(SR.InvalidOperation_ReadOnly); 874throw new InvalidOperationException(SR.InvalidOperation_ReadOnly); 986throw new InvalidOperationException(SR.InvalidOperation_ReadOnly); 1020throw new InvalidOperationException(SR.InvalidOperation_ReadOnly); 1060throw new InvalidOperationException(SR.InvalidOperation_ReadOnly); 1085throw new InvalidOperationException(SR.InvalidOperation_ReadOnly); 1105throw new InvalidOperationException(SR.InvalidOperation_ReadOnly); 1127throw new InvalidOperationException(SR.InvalidOperation_ReadOnly); 1148throw new InvalidOperationException(SR.InvalidOperation_ReadOnly); 1591throw new InvalidOperationException(SR.InvalidOperation_ReadOnly); 1654throw new InvalidOperationException(SR.InvalidOperation_ReadOnly); 1675throw new InvalidOperationException(SR.InvalidOperation_ReadOnly);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Globalization\HebrewCalendar.cs (1)
370_ => throw new InvalidOperationException(SR.InvalidOperation_DateTimeParsing),
src\runtime\src\libraries\System.Private.CoreLib\src\System\Globalization\HijriCalendar.cs (1)
264throw new InvalidOperationException(SR.InvalidOperation_DateTimeParsing);
src\runtime\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\runtime\src\libraries\System.Private.CoreLib\src\System\Globalization\NumberFormatInfo.cs (1)
215throw new InvalidOperationException(SR.InvalidOperation_ReadOnly);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Globalization\PersianCalendar.cs (1)
188throw new InvalidOperationException(SR.InvalidOperation_DateTimeParsing);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Globalization\TextElementEnumerator.cs (2)
59throw new InvalidOperationException(SR.InvalidOperation_EnumOpCantHappen); 75throw new InvalidOperationException(SR.InvalidOperation_EnumOpCantHappen);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Globalization\TextInfo.cs (1)
105throw new InvalidOperationException(SR.InvalidOperation_ReadOnly);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Globalization\TextInfo.Nls.cs (1)
37throw new InvalidOperationException(SR.InvalidOperation_ReadOnly);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Globalization\UmAlQuraCalendar.cs (1)
407throw new InvalidOperationException(SR.InvalidOperation_DateTimeParsing);
src\runtime\src\libraries\System.Private.CoreLib\src\System\IO\FileStatus.SetTimes.OtherUnix.cs (1)
23throw new InvalidOperationException();
src\runtime\src\libraries\System.Private.CoreLib\src\System\IO\PersistedFiles.Unix.cs (1)
39throw new InvalidOperationException(SR.PersistedFiles_NoHomeDirectory);
src\runtime\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\runtime\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\runtime\src\libraries\System.Private.CoreLib\src\System\IO\StreamReader.cs (1)
98throw new InvalidOperationException(SR.InvalidOperation_AsyncIOInProgress);
src\runtime\src\libraries\System.Private.CoreLib\src\System\IO\StreamWriter.cs (1)
69throw new InvalidOperationException(SR.InvalidOperation_AsyncIOInProgress);
src\runtime\src\libraries\System.Private.CoreLib\src\System\IO\UnmanagedMemoryAccessor.cs (1)
57throw new InvalidOperationException(SR.InvalidOperation_CalledTwice);
src\runtime\src\libraries\System.Private.CoreLib\src\System\IO\UnmanagedMemoryStream.cs (2)
98throw new InvalidOperationException(SR.InvalidOperation_CalledTwice); 166throw new InvalidOperationException(SR.InvalidOperation_CalledTwice);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Lazy.cs (1)
318Func<T> factory = _factory ?? throw new InvalidOperationException(SR.Lazy_Value_RecursiveCallsToValue);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\ConstructorOnTypeBuilderInstantiation.cs (1)
69throw new InvalidOperationException();
src\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\FieldOnTypeBuilderInstantiation.cs (2)
70public override object GetValue(object? obj) { throw new InvalidOperationException(); } 71public override void SetValue(object? obj, object? value, BindingFlags invokeAttr, Binder? binder, CultureInfo? culture) { throw new InvalidOperationException(); }
src\runtime\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\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\MethodOnTypeBuilderInstantiation.cs (1)
110throw new InvalidOperationException(SR.Format(SR.Arg_NotGenericMethodDefinition, this));
src\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\ModuleBuilder.cs (1)
66throw new InvalidOperationException(SR.InvalidOperation_NotADebugModule);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\TypeBuilderInstantiation.cs (3)
36throw new InvalidOperationException(); 235public override int GenericParameterPosition => throw new InvalidOperationException(); 255public override Type MakeGenericType(params Type[] inst) { throw new InvalidOperationException(SR.Format(SR.Arg_NotGenericTypeDefinition, this)); }
src\runtime\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\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\ExceptionHandlingClause.cs (1)
16public virtual int FilterOffset => throw new InvalidOperationException(SR.Arg_EHClauseNotFilter);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\MemberInfo.cs (1)
41public virtual int MetadataToken => throw new InvalidOperationException();
src\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\MethodBase.cs (1)
25public virtual MethodBody? GetMethodBody() { throw new InvalidOperationException(); }
src\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\SignatureConstructedGenericType.cs (1)
63public sealed override int GenericParameterPosition => throw new InvalidOperationException(SR.Arg_NotGenericParameter);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\SignatureFunctionPointerType.cs (1)
70public sealed override Type GetGenericTypeDefinition() => throw new InvalidOperationException(SR.InvalidOperation_NotGenericType);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\SignatureGenericParameterType.cs (1)
34public sealed override Type GetGenericTypeDefinition() => throw new InvalidOperationException(SR.InvalidOperation_NotGenericType);
src\runtime\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\runtime\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\runtime\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\runtime\src\libraries\System.Private.CoreLib\src\System\Resources\ResourceManager.cs (1)
733throw new InvalidOperationException(SR.Format(SR.InvalidOperation_ResourceNotStream_Name, name));
src\runtime\src\libraries\System.Private.CoreLib\src\System\Resources\ResourceReader.Core.cs (1)
126throw new InvalidOperationException(SR.ResourceReaderIsClosed);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Resources\ResourceReader.cs (13)
235throw new InvalidOperationException(SR.ResourceReaderIsClosed); 483throw new InvalidOperationException(SR.Format(SR.InvalidOperation_ResourceNotString_Type, FindType(typeIndex).FullName)); 496throw new InvalidOperationException(SR.Format(SR.InvalidOperation_ResourceNotString_Type, typeString)); 1085if (_currentName == ENUM_DONE) throw new InvalidOperationException(SR.InvalidOperation_EnumEnded); 1086if (!_currentIsValid) throw new InvalidOperationException(SR.InvalidOperation_EnumNotStarted); 1087if (_reader._resCache == null) throw new InvalidOperationException(SR.ResourceReaderIsClosed); 1102if (_currentName == ENUM_DONE) throw new InvalidOperationException(SR.InvalidOperation_EnumEnded); 1103if (!_currentIsValid) throw new InvalidOperationException(SR.InvalidOperation_EnumNotStarted); 1104if (_reader._resCache == null) throw new InvalidOperationException(SR.ResourceReaderIsClosed); 1139if (_currentName == ENUM_DONE) throw new InvalidOperationException(SR.InvalidOperation_EnumEnded); 1140if (!_currentIsValid) throw new InvalidOperationException(SR.InvalidOperation_EnumNotStarted); 1141if (_reader._resCache == null) throw new InvalidOperationException(SR.ResourceReaderIsClosed); 1153if (_reader._resCache == null) throw new InvalidOperationException(SR.ResourceReaderIsClosed);
src\runtime\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\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\ConditionalWeakTable.cs (1)
901throw new InvalidOperationException(SR.InvalidOperation_CollectionCorrupted);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\ExceptionServices\ExceptionHandling.cs (1)
42throw new InvalidOperationException(SR.InvalidOperation_CannotRegisterSecondHandler);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\GCSettings.cs (1)
46throw new InvalidOperationException(SR.InvalidOperation_SetLatencyModeNoGC);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\ComWrappers.cs (4)
1114throw new InvalidOperationException(SR.InvalidOperation_SuppliedInnerMustBeMarkedAggregation); 1583throw new InvalidOperationException(SR.InvalidOperation_ResetGlobalComWrappersInstance); 1607throw new InvalidOperationException(SR.InvalidOperation_ResetGlobalComWrappersInstance); 1947throw new InvalidOperationException("InvalidOperation_EnumOpCantHappen");
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshal.cs (1)
801return new System.InvalidOperationException();
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshalling\ComVariant.cs (1)
431throw new InvalidOperationException(SR.Format(SR.ComVariant_TypeIsNotSupportedType, VarType, string.Join(", ", requiredType.ToArray())));
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\NativeLibrary.cs (1)
217throw new InvalidOperationException(SR.InvalidOperation_CannotRegisterSecondResolver);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\SafeBuffer.cs (1)
381return new InvalidOperationException(SR.InvalidOperation_MustCallInitialize);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\Loader\AssemblyLoadContext.cs (3)
334throw new InvalidOperationException(SR.InvalidOperation_AssemblyLocationOverrideAlreadySet); 503throw new InvalidOperationException(SR.AssemblyLoadContext_Unload_CannotUnloadIfNotCollectible); 535throw new InvalidOperationException(SR.AssemblyLoadContext_Verify_NotUnloading);
src\runtime\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\runtime\src\libraries\System.Private.CoreLib\src\System\Security\SecureString.cs (1)
298throw new InvalidOperationException(SR.InvalidOperation_ReadOnly);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Text\Encoding.cs (2)
477throw new InvalidOperationException(SR.InvalidOperation_ReadOnly); 491throw new InvalidOperationException(SR.InvalidOperation_ReadOnly);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\ExecutionContext.cs (4)
134throw new InvalidOperationException(SR.InvalidOperation_CannotRestoreUnsuppressedFlow); 462throw new InvalidOperationException(SR.InvalidOperation_NullContext); 586throw new InvalidOperationException(SR.InvalidOperation_CannotUseAFCOtherThread); 601throw new InvalidOperationException(SR.InvalidOperation_AsyncFlowCtrlCtxMismatch);
src\runtime\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\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\ManualResetEventSlim.cs (1)
141throw new InvalidOperationException(SR.Format(SR.ManualResetEventSlim_ctor_TooManyWaiters, NumWaitersState_MaxValue));
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\NamedMutex.Unix.cs (1)
139throw new InvalidOperationException(SR.Arg_InvalidOperationException_CannotReleaseUnownedMutex);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Overlapped.cs (2)
79throw new InvalidOperationException(SR.InvalidOperation_Overlapped_Pack); 104throw new InvalidOperationException(SR.InvalidOperation_Overlapped_Pack);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\SpinLock.cs (1)
574throw new InvalidOperationException(SR.SpinLock_IsHeldByCurrentThread);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\ConcurrentExclusiveSchedulerPair.cs (1)
551if (m_pair.CompletionRequested) throw new InvalidOperationException(GetType().ToString());
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\Sources\ManualResetValueTaskSourceCore.cs (1)
118throw new InvalidOperationException(); // not using ThrowHelper.ThrowInvalidOperationException so that the JIT sees ThrowForFailedGetResult as always throwing
src\runtime\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\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Thread.cs (5)
209throw new InvalidOperationException(SR.InvalidOperation_ThreadWrongThreadStart); 271throw new InvalidOperationException(SR.Thread_Operation_RequiresCurrentThread); 285throw new InvalidOperationException(SR.Thread_Operation_RequiresCurrentThread); 548throw new InvalidOperationException(SR.Thread_GetSetCompressedStack_NotSupported); 554throw new InvalidOperationException(SR.Thread_GetSetCompressedStack_NotSupported);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\ThreadLocal.cs (2)
325throw new InvalidOperationException(SR.ThreadLocal_Value_RecursiveCallsToValue); 427throw new InvalidOperationException(SR.ThreadLocal_ValuesNotAvailable);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Timer.cs (1)
624var e = new InvalidOperationException(SR.InvalidOperation_TimerAlreadyClosed);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\WaitHandle.cs (1)
496var ex = new InvalidOperationException(SR.InvalidOperation_InvalidHandle);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\WaitSubsystem.Unix.cs (1)
496throw new InvalidOperationException(SR.Threading_WaitHandleTooManyPosts, ex);
src\runtime\src\libraries\System.Private.CoreLib\src\System\ThrowHelper.cs (13)
386throw new InvalidOperationException(); 398throw new InvalidOperationException(GetResourceString(resource), e); 530throw new InvalidOperationException(SR.InvalidOperation_EnumNotStarted); 536throw new InvalidOperationException(SR.InvalidOperation_EnumEnded); 548throw new InvalidOperationException(SR.InvalidOperation_EnumFailedVersion); 554throw new InvalidOperationException(SR.InvalidOperation_EnumOpCantHappen); 560throw new InvalidOperationException(SR.InvalidOperation_NoValue); 566throw new InvalidOperationException(SR.InvalidOperation_ConcurrentOperationsNotSupported); 572throw new InvalidOperationException(SR.InvalidOperation_HandleIsNotInitialized); 578throw new InvalidOperationException(SR.InvalidOperation_HandleIsNotPinned); 590throw new InvalidOperationException(SR.InvalidOperation_InvalidUtf8); 725return new InvalidOperationException(GetResourceString(resource)); 760return new InvalidOperationException(
src\runtime\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\runtime\src\libraries\System.Private.CoreLib\src\System\Type.Enum.cs (1)
62throw new InvalidOperationException(SR.InvalidOperation_UnknownEnumType);
src\runtime\src\libraries\System.Private.CoreLib\src\System\WeakReference.cs (1)
201throw new InvalidOperationException(SR.InvalidOperation_HandleIsNotInitialized);
src\runtime\src\libraries\System.Private.CoreLib\src\System\WeakReference.T.cs (1)
105throw new InvalidOperationException(SR.InvalidOperation_HandleIsNotInitialized);
src\runtime\src\libraries\System.Reflection.Metadata\src\System\Reflection\Metadata\TypeNameParserHelpers.cs (6)
361throw new InvalidOperationException(); 372throw new InvalidOperationException(); 383throw new InvalidOperationException(); 394throw new InvalidOperationException(); 405throw new InvalidOperationException(); 416throw new InvalidOperationException();
System\Delegate.cs (2)
151throw new InvalidOperationException(); 385throw new InvalidOperationException();
System\GC.NativeAot.cs (11)
228throw new InvalidOperationException(SR.InvalidOperation_NotWithConcurrentGC); 287throw new InvalidOperationException(SR.InvalidOperation_NotWithConcurrentGC); 335throw new InvalidOperationException(SR.InvalidOperationException_NoGCRegionNotInProgress); 337throw new InvalidOperationException(SR.InvalidOperationException_NoGCRegionAllocationExceeded); 339throw new InvalidOperationException(SR.InvalidOperationException_NoGCRegionCallbackAlreadyRegistered); 440throw new InvalidOperationException(SR.InvalidOperationException_AlreadyInNoGCRegion); 461throw new InvalidOperationException( 466throw new InvalidOperationException( 471throw new InvalidOperationException( 906throw new InvalidOperationException(SR.InvalidOperationException_HardLimitTooLow); 908throw new InvalidOperationException(SR.InvalidOperationException_HardLimitInvalid);
System\InvokeUtils.cs (1)
425throw new InvalidOperationException();
System\Reflection\Runtime\Assemblies\NativeFormat\NativeFormatRuntimeAssembly.GetTypeCore.CaseInsensitive.cs (1)
47throw new InvalidOperationException();
System\Reflection\Runtime\EventInfos\NativeFormat\NativeFormatRuntimeEventInfo.cs (1)
151throw new InvalidOperationException(SR.NoMetadataTokenAvailable);
System\Reflection\Runtime\EventInfos\RuntimeEventInfo.cs (1)
115throw new InvalidOperationException(); // Legacy: Why is a ToString() intentionally throwing an exception?
System\Reflection\Runtime\FieldInfos\NativeFormat\NativeFormatRuntimeFieldInfo.cs (1)
75throw new InvalidOperationException(SR.NoMetadataTokenAvailable);
System\Reflection\Runtime\FieldInfos\RuntimeFieldInfo.cs (1)
165throw new InvalidOperationException();
System\Reflection\Runtime\MethodInfos\CustomMethodMapper.Nullable.cs (1)
73throw new InvalidOperationException(SR.InvalidOperation_NoValue);
System\Reflection\Runtime\MethodInfos\NativeFormat\NativeFormatMethodCommon.cs (1)
184throw new InvalidOperationException(SR.NoMetadataTokenAvailable);
System\Reflection\Runtime\MethodInfos\OpenMethodInvoker.cs (8)
19throw new InvalidOperationException(SR.Arg_UnboundGenParam); 24throw new InvalidOperationException(SR.Arg_UnboundGenParam); 29throw new InvalidOperationException(SR.Arg_UnboundGenParam); 34throw new InvalidOperationException(SR.Arg_UnboundGenParam); 39throw new InvalidOperationException(SR.Arg_UnboundGenParam); 44throw new InvalidOperationException(SR.Arg_UnboundGenParam); 49throw new InvalidOperationException(SR.Arg_UnboundGenParam); 56throw new InvalidOperationException(SR.Arg_UnboundGenParam);
System\Reflection\Runtime\MethodInfos\RuntimeConstructedGenericMethodInfo.cs (1)
139throw new InvalidOperationException(SR.Format(SR.Arg_NotGenericMethodDefinition, this));
System\Reflection\Runtime\MethodInfos\RuntimeNamedMethodInfo.cs (2)
93throw new InvalidOperationException(); 128throw new InvalidOperationException(SR.Format(SR.Arg_NotGenericMethodDefinition, this));
System\Reflection\Runtime\MethodInfos\RuntimeSyntheticConstructorInfo.cs (1)
75throw new InvalidOperationException(SR.NoMetadataTokenAvailable);
System\Reflection\Runtime\MethodInfos\RuntimeSyntheticMethodInfo.cs (3)
78throw new InvalidOperationException(); 116throw new InvalidOperationException(SR.Format(SR.Arg_NotGenericMethodDefinition, this)); 147throw new InvalidOperationException(SR.NoMetadataTokenAvailable);
System\Reflection\Runtime\Modules\NativeFormat\NativeFormatRuntimeModule.cs (1)
39throw new InvalidOperationException(SR.NoMetadataTokenAvailable);
System\Reflection\Runtime\ParameterInfos\NativeFormat\NativeFormatMethodParameterInfo.cs (1)
58throw new InvalidOperationException(SR.NoMetadataTokenAvailable);
System\Reflection\Runtime\PropertyInfos\NativeFormat\NativeFormatRuntimePropertyInfo.cs (1)
123throw new InvalidOperationException(SR.NoMetadataTokenAvailable);
System\Reflection\Runtime\PropertyInfos\RuntimePropertyInfo.cs (1)
332throw new InvalidOperationException(SR.Arg_EnumLitValueNotFound);
System\Reflection\Runtime\TypeInfos\NativeFormat\NativeFormatRuntimeGenericParameterTypeInfo.cs (1)
48throw new InvalidOperationException(SR.NoMetadataTokenAvailable);
System\Reflection\Runtime\TypeInfos\NativeFormat\NativeFormatRuntimeNamedTypeInfo.cs (2)
125throw new InvalidOperationException(SR.NoMetadataTokenAvailable); 242_ => throw new InvalidOperationException(),
System\Reflection\Runtime\TypeInfos\RuntimeTypeInfo.cs (11)
115throw new InvalidOperationException(SR.Arg_NotGenericParameter); 151throw new InvalidOperationException(SR.Arg_NotGenericParameter); 163throw new InvalidOperationException(SR.Arg_NotGenericParameter); 190throw new InvalidOperationException(SR.Arg_GenericParameter); 242throw new InvalidOperationException(SR.InvalidOperation_NotFunctionPointer); 247throw new InvalidOperationException(SR.InvalidOperation_NotFunctionPointer); 252throw new InvalidOperationException(SR.InvalidOperation_NotFunctionPointer); 390throw new InvalidOperationException(SR.Arg_NotGenericParameter); 399throw new InvalidOperationException(SR.InvalidOperation_NotGenericType); 427throw new InvalidOperationException(SR.Format(SR.FunctionPointer_ReturnTypeInvalid, this)); 464throw new InvalidOperationException(SR.Format(SR.Arg_NotGenericTypeDefinition, this));
System\Reflection\Runtime\TypeInfos\RuntimeTypeInfo.InvokeMember.cs (1)
29throw new InvalidOperationException(SR.Arg_GenericParameter);
System\Runtime\InteropServices\IDynamicInterfaceCastable.cs (3)
67throw new InvalidOperationException(SR.Format(SR.IDynamicInterfaceCastable_NotInterface, Type.GetTypeFromMethodTable(resolvedImplType))); 73throw new InvalidOperationException(SR.Format(SR.IDynamicInterfaceCastable_MissingImplementationAttribute, Type.GetTypeFromMethodTable(resolvedImplType), nameof(DynamicInterfaceCastableImplementationAttribute))); 87throw new InvalidOperationException(SR.Format(SR.IDynamicInterfaceCastable_DoesNotImplementRequested, Type.GetTypeFromMethodTable(resolvedImplType), Type.GetTypeFromMethodTable(interfaceType)));
System\RuntimeType.NativeAot.cs (5)
163throw new InvalidOperationException(SR.InvalidOperation_UnknownEnumType); 429throw new InvalidOperationException(SR.InvalidOperation_NotGenericType); 577throw new InvalidOperationException(SR.InvalidOperation_NotFunctionPointer); 602throw new InvalidOperationException(SR.InvalidOperation_NotFunctionPointer); 703throw new InvalidOperationException(SR.InvalidOperation_NotFunctionPointer);
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)
2086throw 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)
111throw new InvalidOperationException(SR.Format(SR.DupContractInDataContractSet, dataContract.XmlName.Name, dataContract.XmlName.Namespace)); 115throw 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)); 333throw new InvalidOperationException(SR.ReferencedTypesCannotContainNull); 354throw new InvalidOperationException(SR.ReferencedCollectionTypesCannotContainNull); 610throw new InvalidOperationException(SR.Format( 616throw 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.Reflection.Execution (6)
Internal\Reflection\Execution\ExecutionEnvironmentImplementation.MappingTables.cs (1)
74throw new InvalidOperationException();
Internal\Reflection\Execution\FieldAccessors\StaticFieldAccessor.cs (1)
62throw new InvalidOperationException();
src\runtime\src\coreclr\nativeaot\Common\src\System\Collections\Generic\LowLevelDictionary.cs (4)
243throw new InvalidOperationException("InvalidOperation_EnumFailedVersion"); 245throw new InvalidOperationException("InvalidOperation_EnumOpCantHappen"); 258throw new InvalidOperationException("InvalidOperation_EnumFailedVersion"); 277throw new InvalidOperationException("InvalidOperation_EnumFailedVersion");
System.Private.TypeLoader (6)
src\runtime\src\coreclr\nativeaot\Common\src\System\Collections\Generic\LowLevelDictionary.cs (4)
243throw new InvalidOperationException("InvalidOperation_EnumFailedVersion"); 245throw new InvalidOperationException("InvalidOperation_EnumOpCantHappen"); 258throw new InvalidOperationException("InvalidOperation_EnumFailedVersion"); 277throw new InvalidOperationException("InvalidOperation_EnumFailedVersion");
src\runtime\src\coreclr\tools\Common\TypeSystem\Common\LayoutInt.cs (1)
51throw new InvalidOperationException();
src\runtime\src\coreclr\tools\Common\TypeSystem\Common\TargetDetails.cs (1)
258throw new InvalidOperationException();
System.Private.Uri (38)
System\Uri.cs (25)
721throw new InvalidOperationException(SR.net_uri_NotAbsolute); 754throw new InvalidOperationException(SR.net_uri_NotAbsolute); 777throw new InvalidOperationException(SR.net_uri_NotAbsolute); 792throw new InvalidOperationException(SR.net_uri_NotAbsolute); 807throw new InvalidOperationException(SR.net_uri_NotAbsolute); 839throw new InvalidOperationException(SR.net_uri_NotAbsolute); 859throw new InvalidOperationException(SR.net_uri_NotAbsolute); 872throw new InvalidOperationException(SR.net_uri_NotAbsolute); 890throw new InvalidOperationException(SR.net_uri_NotAbsolute); 921throw new InvalidOperationException(SR.net_uri_NotAbsolute); 961throw new InvalidOperationException(SR.net_uri_NotAbsolute); 975throw new InvalidOperationException(SR.net_uri_NotAbsolute); 1092throw new InvalidOperationException(SR.net_uri_NotAbsolute); 1119throw new InvalidOperationException(SR.net_uri_NotAbsolute); 1135throw new InvalidOperationException(SR.net_uri_NotAbsolute); 1152throw new InvalidOperationException(SR.net_uri_NotAbsolute); 1177throw new InvalidOperationException(SR.net_uri_NotAbsolute); 1201throw new InvalidOperationException(SR.net_uri_NotAbsolute); 1267throw new InvalidOperationException(SR.net_uri_NotAbsolute); 1347throw new InvalidOperationException(SR.net_uri_NotAbsolute); 1606throw new InvalidOperationException(SR.net_uri_NotAbsolute); 1611throw new InvalidOperationException(SR.Format(SR.net_uri_UserDrivenParsing, GetType())); 1616throw new InvalidOperationException(SR.net_uri_GetComponentsCalledWhenCanonicalizationDisabled); 1857throw new InvalidOperationException(SR.net_uri_NotAbsolute); 4700throw new InvalidOperationException(SR.net_uri_NotAbsolute);
System\UriExt.cs (3)
292throw new InvalidOperationException(SR.net_uri_GetComponentsCalledWhenCanonicalizationDisabled); 311throw new InvalidOperationException(SR.net_uri_NotAbsolute); 377throw 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)
158throw new InvalidOperationException(SR.Format(SR.net_uri_NeedFreshParser, syntax.SchemeName)); 165throw 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)
149throw new InvalidOperationException($"Cannot read primitives of {typeof(T).Name}.");
System\Private\Windows\BinaryFormat\BinaryFormatWriter.cs (1)
552_ => 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)
126return result ?? throw new InvalidOperationException();
System\Private\Windows\Nrbf\SerializationRecordExtensions.cs (2)
336_ => throw new InvalidOperationException() 423_ => throw new InvalidOperationException()
System\Private\Windows\Ole\TypeBinder.cs (1)
81throw new InvalidOperationException();
System\Value.cs (1)
84private static void ThrowInvalidOperation() => throw new InvalidOperationException();
Windows\Win32\Graphics\GdiPlus\StatusExtensions.cs (2)
37return new InvalidOperationException(SR.GdiplusObjectBusy); 45return new InvalidOperationException(SR.GdiplusWrongState);
Windows\Win32\System\Com\SafeArrayScope.cs (1)
129throw 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)
113throw new InvalidOperationException($"Did not dispose {nameof(NoAssertContext)}");
TestAccessor.cs (2)
171throw new InvalidOperationException(); 199_ => throw new InvalidOperationException()
ThrowingTraceListener.cs (1)
12throw new InvalidOperationException(
XUnit\InvalidEnumDataAttribute.cs (1)
42throw 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)
134graphics = provider.GetGraphics(createIfNeeded: true) ?? throw new InvalidOperationException(); 166throw new InvalidOperationException("Null HDC"); 181throw new InvalidOperationException($"Invalid handle ({type})");
Windows\Win32\Graphics\GdiPlus\GpImageExtensions.cs (1)
41_ => throw new InvalidOperationException()
System.Private.Xml (570)
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)); 8904throw new InvalidOperationException(SR.Xml_MixingReadValueChunkWithBinary); 8909throw 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)
365throw new InvalidOperationException(SR.Xml_DtdNotAllowedInFragment); 372throw new InvalidOperationException(SR.Xml_DtdAlreadyWritten); 1485throw new InvalidOperationException(SR.Xml_ClosedOrError); 1552throw new InvalidOperationException(SR.Xml_CannotStartDocumentOnFragment); 1844throw new InvalidOperationException(SR.Xml_ClosedOrError); 1848throw new InvalidOperationException(SR.Format(SR.Xml_WrongToken, tokenName[(int)token], GetStateName(_currentState))); 2077throw new InvalidOperationException($"{wrongTokenMessage} {SR.Xml_ConformanceLevelFragment}"); 2081throw 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)
470throw new InvalidOperationException(SR.Xdom_DualDocumentTypeNode); 475throw new InvalidOperationException(SR.Xdom_DualDocumentElementNode); 480throw new InvalidOperationException(SR.Xdom_DualDeclarationNode); 957throw new InvalidOperationException(SR.Xdom_Import_NullNode); 1019throw new InvalidOperationException(SR.Format(CultureInfo.InvariantCulture, SR.Xdom_Import, node.NodeType)); 1367throw new InvalidOperationException(SR.Xdom_Document_Innertext); 1487throw new InvalidOperationException(SR.XmlDocument_NoSchemaInfo); 1771throw new InvalidOperationException(SR.Xdom_Node_Insert_TypeConflict); 1774throw 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)
1000return 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)
562throw 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] })); 877throw new InvalidOperationException(SR.Sch_InvalidEndElementCall); 887throw new InvalidOperationException(SR.Format(SR.Sch_InvalidEndElementMultiple, s_methodNames[(int)ValidatorState.SkipToEndElement])); 920throw new InvalidOperationException(SR.Sch_InvalidEndValidation); 1169throw new InvalidOperationException(SR.Format(SR.Sch_InvalidEndElementMultiple, s_methodNames[(int)ValidatorState.EndElement])); 1220throw new InvalidOperationException(SR.Sch_InvalidEndElementCallTyped); 2083throw new InvalidOperationException(SR.Format(SR.Sch_InvalidStartTransition, new string[] { methodName, s_methodNames[(int)ValidatorState.Start] })); 2085throw new InvalidOperationException(SR.Format(SR.Sch_InvalidStateTransition, new string[] { s_methodNames[(int)_currentState], methodName }));
System\Xml\Serialization\CodeGenerator.cs (2)
1069throw new InvalidOperationException(SR.Format(SR.ArrayTypeIsNotSupported, arrayElementType.AssemblyQualifiedName)); 1114throw new InvalidOperationException(SR.Format(SR.ArrayTypeIsNotSupported, arrayElementType.AssemblyQualifiedName));
System\Xml\Serialization\Compilation.cs (12)
77throw new InvalidOperationException(ex.Message, ex); 90throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorDetails, "Failed to generate XmlSerializer assembly, but did not throw")); 192throw new InvalidOperationException(SR.Format(SR.XmlPregenInvalidXmlSerializerAssemblyAttribute, "AssemblyName", "CodeBase")); 352throw new InvalidOperationException(SR.Format(SR.XmlPregenTypeDynamic, types[i]!.FullName)); 592throw new InvalidOperationException(SR.Format(SR.XmlMissingType, typeName, assembly.FullName)); 618throw new InvalidOperationException(SR.Format(SR.XmlInvalidEncoding3, encodingStyle, Soap.Encoding, Soap12.Encoding)); 623throw new InvalidOperationException(SR.Format(SR.XmlInvalidEncodingNotEncoded1, encodingStyle)); 650throw new InvalidOperationException(SR.Format(SR.XmlTypeInBadLoadContext, t.FullName)); 668throw new InvalidOperationException(SR.Format(SR.XmlNotSerializable, mapping.Accessor.Name)); 676throw new InvalidOperationException(SR.XmlNoPartialTrust, e); 695throw new InvalidOperationException(SR.Format(SR.XmlNotSerializable, mapping.Accessor.Name)); 703throw new InvalidOperationException(SR.XmlNoPartialTrust, e);
System\Xml\Serialization\Mappings.cs (15)
257throw new InvalidOperationException(SR.Format(SR.Xml_InvalidNameChars, Name)); 613throw new InvalidOperationException(SR.Format(SR.XmlHiddenMember, parent, member.Name, member.TypeDesc!.FullName, this.TypeName, _members[i].Name, _members[i].TypeDesc!.FullName)); 616throw new InvalidOperationException(SR.Format(SR.XmlInvalidXmlOverride, parent, member.Name, this.TypeName, _members[i].Name)); 640throw new InvalidOperationException(SR.Format(SR.XmlIllegalSimpleContentExtension, TypeDesc!.FullName, BaseMapping.TypeDesc.FullName)); 653throw new InvalidOperationException(SR.Format(SR.XmlIllegalTypedTextAttribute, TypeDesc!.FullName, text.Name, text.Mapping.TypeDesc.FullName)); 1122throw new InvalidOperationException(SR.Format(SR.XmlCircularDerivation, TypeDesc!.FullName)); 1247throw new InvalidOperationException(SR.Format(SR.XmlSerializableSchemaError, nameof(IXmlSerializable), args.Message)); 1280throw new InvalidOperationException(SR.Format(SR.XmlSerializableRootDupName, _getSchemaMethod!.DeclaringType!.FullName, e.Name, elementNs)); 1333throw new InvalidOperationException(SR.Format(SR.XmlGetSchemaEmptyTypeName, _type!.FullName, _getSchemaMethod.Name)); 1338throw new InvalidOperationException(SR.Format(SR.XmlGetSchemaMethodReturnType, _type!.Name, _getSchemaMethod.Name, nameof(XmlSchemaProviderAttribute), typeof(XmlQualifiedName).FullName)); 1362throw new InvalidOperationException(SR.Format(SR.XmlMissingSchema, _xsiType.Namespace)); 1366throw new InvalidOperationException(SR.Format(SR.XmlGetSchemaInclude, _xsiType.Namespace, _getSchemaMethod.DeclaringType!.FullName, _getSchemaMethod.Name)); 1371throw new InvalidOperationException(SR.Format(SR.XmlMissingSchema, _xsiType.Namespace)); 1376throw new InvalidOperationException(SR.Format(SR.XmlGetSchemaTypeMissing, _getSchemaMethod.DeclaringType!.FullName, _getSchemaMethod.Name, _xsiType.Name, _xsiType.Namespace)); 1389if (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)
594throw new InvalidOperationException(SR.XmlInternalError); 636throw new InvalidOperationException(SR.XmlInternalError); 652throw new InvalidOperationException(SR.XmlInternalError); 680throw new InvalidOperationException(SR.XmlInternalError); 701throw new InvalidOperationException(SR.XmlInternalError); 998throw new InvalidOperationException(SR.XmlInternalError); 1073throw new InvalidOperationException(SR.XmlInternalError); 1078throw new InvalidOperationException(SR.XmlInternalError); 1172throw new InvalidOperationException(SR.XmlInternalError); 1217throw new InvalidOperationException(SR.XmlInternalError); 1317_ => throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorDetails, $"unknown FormatterName: {mapping.TypeDesc.FormatterName}")), 1327throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorDetails, $"unknown FormatterName: {mapping.TypeDesc.FormatterName}")); 1602throw new InvalidOperationException(SR.XmlInternalError); 1734throw new InvalidOperationException(SR.Format(SR.XmlSequenceHierarchy, structMapping.TypeDesc.FullName, mapping.Name, declaringMapping!.TypeDesc!.FullName, "Order")); 1770member.Source = (value) => throw new InvalidOperationException(SR.Format(SR.XmlReadOnlyPropertyError, pi.Name, pi.DeclaringType!.FullName)); 1789throw new InvalidOperationException(SR.Format(SR.XmlReadOnlyPropertyError, pi.Name, pi.DeclaringType!.FullName)); 2122throw new InvalidOperationException(SR.XmlInternalError);
System\Xml\Serialization\ReflectionXmlSerializationWriter.cs (11)
500throw new InvalidOperationException(SR.Format(SR.XmlChoiceMissingAnyValue, choiceMapping.TypeDesc!.FullName)); 503throw new InvalidOperationException(SR.Format(SR.XmlChoiceMissingValue, choiceMapping.TypeDesc!.FullName, element.Namespace + ":" + element.Name, element.Name, element.Namespace)); 544throw new InvalidOperationException(SR.XmlInternalError); 578throw new InvalidOperationException(SR.XmlInternalError); 684throw new InvalidOperationException(SR.XmlInternalError); 706throw new InvalidOperationException(SR.XmlInternalError); 988throw new InvalidOperationException(SR.XmlInternalError); 1112throw new InvalidOperationException(SR.XmlInternalError); 1336throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorDetails, "Invalid DateTime")); 1388throw new InvalidOperationException(SR.XmlInternalError); 1600throw 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\SoapAttributes.cs (1)
46throw new InvalidOperationException(SR.Format(SR.XmlObsoleteIsError, obsoleteAttr.Message));
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)
393_exception = new InvalidOperationException(SR.Format(SR.XmlConstructorInaccessible, FullName)); 765throw new InvalidOperationException(SR.Format(SR.XmlUnsupportedOpenGenericType, type)); 829exception = new InvalidOperationException(SR.Format(SR.XmlTypeInaccessible, type.FullName)); 834exception = new InvalidOperationException(SR.Format(SR.XmlTypeStatic, type.FullName)); 1145throw new InvalidOperationException(SR.Format(SR.XmlReadOnlyPropertyError, propertyInfo.DeclaringType, propertyInfo.Name)); 1383throw new InvalidOperationException(SR.Format(SR.XmlNoAddMethod, type.FullName, currentType, "IEnumerable")); 1434throw new InvalidOperationException(SR.Format(SR.XmlNoDefaultAccessors, type.FullName)); 1439throw new InvalidOperationException(SR.Format(SR.XmlNoAddMethod, type.FullName, indexer.PropertyType, "ICollection")); 1469throw 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\XmlAttributes.cs (1)
97throw new InvalidOperationException(SR.Format(SR.XmlObsoleteIsError, obsoleteAttr.Message));
System\Xml\Serialization\Xmlcustomformatter.cs (3)
208if (ids.Length != vals.Length) throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorDetails, "Invalid enum")); 237throw new InvalidOperationException(SR.Format(SR.XmlUnknownConstant, originalValue, typeName ?? "enum")); 513throw 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")); 879throw new InvalidOperationException(SR.Format(SR.XmlIllegalTypedTextAttribute, typeName, member.Text.Name, member.Text.Mapping.TypeDesc.FullName)); 882throw new InvalidOperationException(SR.Format(SR.XmlIllegalMultipleText, model.Type.FullName)); 889throw new InvalidOperationException(SR.Format(SR.XmlMultipleXmlns, model.Type.FullName)); 920throw new InvalidOperationException(SR.Format(SR.XmlSequenceUnique, member.SequenceId.ToString(CultureInfo.InvariantCulture), "Order", member.Name)); 926throw new InvalidOperationException(SR.Format(SR.XmlSequenceInconsistent, "Order", member.Name)); 936throw new InvalidOperationException(SR.Format(SR.XmlMultipleXmlns, model.Type.FullName)); 1178throw new InvalidOperationException(SR.Format(SR.XmlUdeclaredXsdType, dataType)); 1213throw new InvalidOperationException(SR.Format(SR.XmlIllegalAttributeFlagsArray, model.TypeDesc.FullName)); 1228throw new InvalidOperationException(SR.Format(SR.XmlNoSerializableMembers, model.TypeDesc.FullName)); 1241throw new InvalidOperationException(SR.XmlInvalidConstantAttribute); 1274throw new InvalidOperationException(SR.XmlRpcLitAttributeAttributes); 1278throw new InvalidOperationException(SR.Format(SR.XmlInvalidAttributeType, "XmlAttribute")); 1284if (i > 0) throw new InvalidOperationException(SR.XmlInvalidReturnPosition); 1300throw new InvalidOperationException(SR.XmlIllegalMultipleTextMembers); 1308throw new InvalidOperationException(SR.XmlMultipleXmlnsMembers); 1323throw new InvalidOperationException(SR.Format(SR.XmlSequenceMembers, "Order")); 1440throw new InvalidOperationException(SR.Format(SR.XmlChoiceIdentifierType, identifierName, memberName, type.GetElementType()!.FullName)); 1447throw new InvalidOperationException(SR.Format(SR.XmlChoiceIdentifierArrayType, identifierName, memberName, type.FullName)); 1453throw new InvalidOperationException(SR.Format(SR.XmlChoiceIdentifierTypeEnum, identifierName)); 1468throw new InvalidOperationException(SR.Format(SR.XmlChoiceIdentifierMemberMissing, choice.MemberName, accessorName)); 1485throw new InvalidOperationException(SR.Format(SR.XmlChoiceIdentifierMemberMissing, choice.MemberName, accessorName)); 1492throw new InvalidOperationException(SR.Format(SR.XmlChoiceIdentifierAmbiguous, choice.MemberName)); 1499throw new InvalidOperationException(SR.Format(SR.XmlChoiceIdentifierMemberMissing, choice.MemberName, accessorName)); 1582throw new InvalidOperationException(SR.XmlIllegalAttributesArrayAttribute); 1588throw new InvalidOperationException(SR.Format(SR.XmlIllegalAttrOrTextInterface, accessorName, accessor.TypeDesc.ArrayElementTypeDesc.FullName, nameof(IXmlSerializable))); 1592throw new InvalidOperationException(SR.Format(SR.XmlIllegalAttrOrText, accessorName, accessor.TypeDesc.ArrayElementTypeDesc.FullName)); 1629throw new InvalidOperationException(SR.XmlIllegalElementsArrayAttribute); 1639throw new InvalidOperationException(SR.Format(SR.XmlIllegalArrayTextAttribute, accessorName)); 1681throw new InvalidOperationException(SR.Format(SR.XmlInvalidNotNullable, typeModel.TypeDesc.BaseTypeDesc!.FullName, "XmlElement")); 1694throw new InvalidOperationException(SR.Format(SR.XmlSequenceMatch, "Order")); 1706throw new InvalidOperationException(SR.Format(SR.XmlIllegalAnyElement, arrayElementType.FullName)); 1717throw new InvalidOperationException(SR.Format(SR.XmlAnyElementDuplicate, accessorName, xmlAnyElement.Name, xmlAnyElement.Namespace ?? "null")); 1744throw new InvalidOperationException(SR.Format(SR.XmlSequenceMatch, "Order")); 1754throw new InvalidOperationException(SR.XmlIllegalArrayArrayAttribute); 1788throw new InvalidOperationException(SR.XmlIllegalAttribute); 1792if (a.XmlAnyElements.Count > 0) throw new InvalidOperationException(SR.Format(SR.XmlIllegalAnyElement, accessor.TypeDesc.FullName)); 1796if (a.XmlElements.Count > 0) throw new InvalidOperationException(SR.XmlIllegalAttribute); 1797if (a.XmlAttribute.Type != null) throw new InvalidOperationException(SR.Format(SR.XmlIllegalType, "XmlAttribute")); 1823throw new InvalidOperationException(SR.Format(SR.XmlIllegalType, "XmlText")); 1840throw new InvalidOperationException(SR.Format(SR.XmlIllegalType, "XmlElement")); 1854throw new InvalidOperationException(SR.Format(SR.XmlInvalidNotNullable, typeModel.TypeDesc.BaseTypeDesc!.FullName, "XmlElement")); 1867throw new InvalidOperationException(SR.Format(SR.XmlSequenceMatch, "Order")); 1878throw new InvalidOperationException(SR.XmlSoleXmlnsAttribute); 1882throw new InvalidOperationException(SR.Format(SR.XmlXmlnsInvalidType, accessorName, accessorType.FullName, typeof(System.Xml.Serialization.XmlSerializerNamespaces).FullName)); 1893throw new InvalidOperationException(SR.Format(SR.XmlIllegalAttrOrTextInterface, accessorName, accessor.TypeDesc.FullName, nameof(IXmlSerializable))); 1897throw new InvalidOperationException(SR.Format(SR.XmlIllegalAttrOrText, accessorName, accessor.TypeDesc)); 1922throw new InvalidOperationException(SR.Format(SR.XmlInvalidNotNullable, typeModel.TypeDesc.BaseTypeDesc!.FullName, "XmlElement")); 1935throw new InvalidOperationException(SR.Format(SR.XmlSequenceMatch, "Order")); 1947throw new InvalidOperationException(SR.Format(SR.XmlIllegalAnyElement, accessorType.FullName)); 1959throw new InvalidOperationException(SR.Format(SR.XmlAnyElementDuplicate, accessorName, xmlAnyElement.Name, xmlAnyElement.Namespace ?? "null")); 1984throw new InvalidOperationException(SR.Format(SR.XmlSequenceMatch, "Order")); 1998throw new InvalidOperationException(SR.Format(SR.XmlRpcLitArrayElement, accessor.Elements[0].Name)); 2001throw new InvalidOperationException(SR.Format(SR.XmlRpcLitXmlns, accessor.Name)); 2047throw new InvalidOperationException(SR.Format(SR.XmlChoiceMissingAnyValue, accessor.ChoiceIdentifier.Mapping!.TypeDesc!.FullName)); 2053throw new InvalidOperationException(SR.Format(SR.XmlChoiceMissingValue, accessor.ChoiceIdentifier.Mapping!.TypeDesc!.FullName, id, element.Name, element.Namespace)); 2069throw new InvalidOperationException(SR.XmlRpcLitAttributeAttributes); 2072throw new InvalidOperationException(SR.XmlRpcLitAttributes); 2078throw new InvalidOperationException(SR.XmlRpcLitElements); 2083throw new InvalidOperationException(SR.Format(SR.XmlRpcLitElementNamespace, "Namespace", xmlElement.Namespace)); 2087throw new InvalidOperationException(SR.Format(SR.XmlRpcLitElementNullable, "IsNullable", "true")); 2092throw new InvalidOperationException(SR.Format(SR.XmlRpcLitElementNamespace, "Namespace", a.XmlArray.Namespace)); 2109throw new InvalidOperationException(SR.Format(SR.XmlChoiceIdentifierMissing, nameof(XmlChoiceIdentifierAttribute), accessorName)); 2120throw new InvalidOperationException(SR.Format(SR.XmlChoiceIdentifierMissing, nameof(XmlChoiceIdentifierAttribute), accessorName)); 2135throw new InvalidOperationException(SR.Format(SR.XmlArrayItemAmbiguousTypes, accessorName, item.ElementName, items[i]!.ElementName, nameof(XmlElementAttribute), nameof(XmlChoiceIdentifierAttribute))); 2158throw new InvalidOperationException(SR.Format(SR.XmlChoiceIdDuplicate, choiceMapping.TypeName, choiceId)); 2179throw new InvalidOperationException(SR.Format(SR.XmlInvalidDefaultValue, strValue, a.XmlDefaultValue.GetType().FullName)); 2212throw new InvalidOperationException(SR.Format(SR.XmlDuplicateElementName, existing.Name, existing.Namespace)); 2218throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorDetails, "Bad accessor type " + accessor.GetType().FullName)); 2220throw new InvalidOperationException(SR.Format(SR.XmlDuplicateAttributeName, existing.Name, existing.Namespace)); 2254throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorDetails, $"The XML attribute/element '{accessor.Namespace}{accessor.Name}' does not have an existing accessor to remove.")); 2276if (isQualified && form == XmlSchemaForm.Unqualified) throw new InvalidOperationException(SR.XmlInvalidFormUnqualified); 2283if (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)); 509throw new InvalidOperationException(SR.Format(SR.XmlDuplicateNamespace, anyNs)); 558throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorDetails, $"Unsupported anonymous mapping type: {mapping}")); 615throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorDetails, "Type " + mapping.TypeName + " from namespace '" + ns + "' is an invalid array mapping")); 677throw new InvalidOperationException(SR.Format(SR.XmlInvalidContent, type.ContentModel.Content!.GetType().Name)); 788throw new InvalidOperationException(SR.XmlInternalError); 872if (value.GetType() != typeof(string)) throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorDetails, SR.Format(SR.XmlInvalidDefaultValue, value, value.GetType().FullName))); 912throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorDetails, "Mapping for " + pm.TypeDesc.Name + " missing type property")); 928throw new InvalidOperationException(SR.Format(SR.XmlInvalidDefaultValue, value, pm.TypeDesc.Name)); 931throw new InvalidOperationException(SR.Format(SR.XmlInvalidDefaultValue, value, pm.TypeDesc.Name)); 965throw new InvalidOperationException(SR.Format(SR.XmlCircularReference2, mapping.TypeDesc.Name, "AnonymousType", "false")); 971if (!mapping.IncludeInSchema) throw new InvalidOperationException(SR.Format(SR.XmlCannotIncludeInSchema, mapping.TypeDesc.Name)); 986throw new InvalidOperationException(SR.Format(SR.XmlAnonymousBaseType, mapping.TypeDesc.Name, mapping.BaseMapping.TypeDesc!.Name, "AnonymousType", "false")); 1046throw new InvalidOperationException(SR.Format(SR.XmlIllegalMultipleText, name)); 1069throw new InvalidOperationException(SR.Format(SR.XmlInvalidContent, type.ContentModel.Content!.GetType().Name)); 1091throw new InvalidOperationException(SR.Format(SR.XmlAnonymousBaseType, textMapping.TypeDesc!.Name, pm.TypeDesc!.Name, "AnonymousType", "false")); 1138if (!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)
47throw new InvalidOperationException(SR.Format(SR.XmlSchemaDuplicateNamespace, ns)); 171if (_isCompiled) throw new InvalidOperationException(SR.XmlSchemaCompiled); 260throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorDetails, "XmlSchemas.Find: Invalid object type " + type.FullName)); 393throw new InvalidOperationException(SR.Format(SR.XmlSchemaIncludeLocation, this.GetType().Name, external.SchemaLocation)); 415throw new InvalidOperationException(MergeFailedMessage(o, dest, schema.TargetNamespace)); 694throw new InvalidOperationException(GetSchemaItem(source, null, message), exception); 710throw new InvalidOperationException(SR.Format(SR.XmlSchemaSyntaxErrorDetails, ns, message, exception.LineNumber, exception.LinePosition), exception);
System\Xml\Serialization\XmlSerializationReader.cs (29)
968if (arrayInfo.dimensions != 1) throw new InvalidOperationException(SR.Format(SR.XmlInvalidArrayDimentions, CurrentTag())); 970if (qname.Name != name) throw new InvalidOperationException(SR.Format(SR.XmlInvalidArrayTypeName, qname.Name, name, CurrentTag())); 971if (qname.Namespace != ns) throw new InvalidOperationException(SR.Format(SR.XmlInvalidArrayTypeNamespace, qname.Namespace, ns, CurrentTag())); 1195throw new InvalidOperationException(SR.Format(SR.XmlUndefinedAlias, prefix)); 1320return new InvalidOperationException(SR.Format(SR.XmlUnknownType, type.Name, type.Namespace, CurrentTag())); 1325return new InvalidOperationException(SR.Format(SR.XmlReadOnlyCollection, name)); 1330return new InvalidOperationException(SR.Format(SR.XmlAbstractType, name, ns, CurrentTag())); 1335return new InvalidOperationException(SR.Format(SR.XmlConstructorInaccessible, typeName)); 1340return new InvalidOperationException(SR.Format(SR.XmlConstructorHasSecurityAttributes, typeName)); 1345return new InvalidOperationException(SR.Format(SR.XmlUnknownNode, CurrentTag())); 1350return new InvalidOperationException(SR.Format(SR.XmlUnknownConstant, value, enumType.Name)); 1370return new InvalidOperationException(SR.Format(SR.XmlSerializableBadDerivation, xsdDerived, nsDerived, xsdBase, nsBase, clrDerived, clrBase)); 1375return new InvalidOperationException(SR.Format(SR.XmlSerializableMissingClrType, name, ns, nameof(XmlIncludeAttribute), clrType)); 1462if (!href.StartsWith('#')) throw new InvalidOperationException(SR.Format(SR.XmlMissingHref, href)); 1513throw new InvalidOperationException(SR.Format(SR.XmlInvalidHref, id)); 1582throw new InvalidOperationException(SR.Format(SR.XmlInvalidArrayRef, id, o.GetType().FullName, i.ToString(CultureInfo.InvariantCulture))); 1615if (arrayInfo.dimensions != 1) throw new InvalidOperationException(SR.Format(SR.XmlInvalidArrayDimentions, CurrentTag())); 2523if (choiceSource == null) throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorDetails, "Can not find " + member.ChoiceIdentifier.MemberName + " in the members mapping.")); 2890if (enumMethodName == null) throw new InvalidOperationException(SR.Format(SR.XmlMissingMethodEnum, mapping.TypeDesc!.Name)); 3134if (methodName == null) throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorMethod, derived.TypeDesc!.Name)); 3171if (methodName == null) throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorMethod, enumMapping.TypeDesc!.Name)); 3408throw new InvalidOperationException(SR.Format(SR.XmlSequenceHierarchy, structMapping.TypeDesc.FullName, mapping.Name, declaringMapping!.TypeDesc!.FullName, "Order")); 3886throw new InvalidOperationException(SR.XmlInternalError); 4156throw new InvalidOperationException(SR.XmlInternalError); 4754if (methodName == null) throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorMethod, element.Mapping.TypeDesc!.Name)); 4921if (methodName == null) throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorMethod, mapping.TypeDesc!.Name)); 5000throw new InvalidOperationException(SR.XmlInternalError); 5005throw new InvalidOperationException(SR.XmlInternalError); 5011if (choiceSource == null) throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorDetails, "need parent for the " + source));
System\Xml\Serialization\XmlSerializationReaderILGen.cs (12)
445if (choiceSource == null) throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorDetails, "Can not find " + member.ChoiceIdentifier.MemberName + " in the members mapping.")); 761if (enumMethodName == null) throw new InvalidOperationException(SR.Format(SR.XmlMissingMethodEnum, mapping.TypeDesc!.Name)); 1218if (methodName == null) throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorMethod, derived.TypeDesc!.Name)); 1273if (methodName == null) throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorMethod, enumMapping.TypeDesc!.Name)); 1644throw new InvalidOperationException(SR.Format(SR.XmlSequenceHierarchy, structMapping.TypeDesc.FullName, mapping.Name, declaringMapping!.TypeDesc!.FullName, "Order")); 2139throw new InvalidOperationException(SR.XmlInternalError); 2428throw new InvalidOperationException(SR.XmlInternalError); 3185if (methodName == null) throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorMethod, element.Mapping.TypeDesc!.Name)); 3339if (methodName == null) throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorMethod, mapping.TypeDesc!.Name)); 3459throw new InvalidOperationException(SR.XmlInternalError); 3464throw new InvalidOperationException(SR.XmlInternalError); 3470if (choiceSource == null) throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorDetails, "need parent for the " + source));
System\Xml\Serialization\XmlSerializationWriter.cs (30)
547if (_objectsInUse.ContainsKey(o)) throw new InvalidOperationException(SR.Format(SR.XmlCircularReference, o.GetType().FullName)); 593throw new InvalidOperationException(SR.Format(SR.XmlInvalidXmlns, alias)); 705if (!_objectsInUse.ContainsKey(o)) throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorDetails, "missing stack object of type " + o.GetType().FullName)); 830throw new InvalidOperationException(SR.XmlNoAttributeHere); 846throw new InvalidOperationException(SR.Format(SR.XmlElementNameMismatch, node.LocalName, node.NamespaceURI, name, ns)); 867if (typeof(IXmlSerializable).IsAssignableFrom(type)) return new InvalidOperationException(SR.Format(SR.XmlInvalidSerializable, type.FullName)); 869if (!typeDesc.IsStructLike) return new InvalidOperationException(SR.Format(SR.XmlInvalidUseOfType, type.FullName)); 870return new InvalidOperationException(SR.Format(SR.XmlUnxpectedType, type.FullName)); 876return new InvalidOperationException(SR.Format(SR.XmlChoiceMismatchChoiceException, elementName, value, enumValue)); 881return new InvalidOperationException(SR.Format(SR.XmlUnknownAnyElement, name, ns)); 886return new InvalidOperationException(SR.Format(SR.XmlInvalidChoiceIdentifierValue, type, identifier)); 892return new InvalidOperationException(SR.Format(SR.XmlChoiceIdentifierMismatch, value, identifier, name, ns)); 897return new InvalidOperationException(SR.Format(SR.XmlUnknownConstant, value, typeName)); 907return new InvalidOperationException(SR.Format(SR.XmlIllegalAnyElement, type.FullName)); 976if (attr == null) throw new InvalidOperationException(SR.XmlNeedAttributeHere); 1331if (!typeof(IEnumerable).IsAssignableFrom(type)) throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorDetails, "not array like type " + type.FullName)); 1495throw new InvalidOperationException(SR.Format(SR.XmlDuplicateNs, prefix, ns)); 1844throw new InvalidOperationException(SR.Format(SR.XmlSerializerUnsupportedType, memberInfos[0])); 2455if (methodName == null) throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorMethod, mapping.TypeDesc!.Name) + Environment.StackTrace); 2503if (defaultValue!.GetType() != typeof(string)) throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorDetails, name + " has invalid default type " + defaultValue.GetType().Name)); 2806if (enumSource == null) throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorDetails, "Can not find " + member.ChoiceIdentifier.MemberName + " in the members mapping.")); 3034if (methodName == null) throw new InvalidOperationException("derived from " + mapping.TypeDesc!.FullName + ", " + SR.Format(SR.XmlInternalErrorMethod, derived.TypeDesc.Name) + Environment.StackTrace); 3073if (methodName == null) throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorMethod, mapping.TypeDesc.Name) + Environment.StackTrace); 3520throw new InvalidOperationException(SR.XmlInternalError); 3969throw new InvalidOperationException(SR.XmlInternalError); 4178if (methodName == null) throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorMethod, structMapping.TypeDesc!.Name) + Environment.StackTrace); 4237throw new InvalidOperationException(SR.XmlInternalError); 4462throw new InvalidOperationException(SR.Format(SR.XmlUnsupportedDefaultType, type.FullName)); 4571throw new InvalidOperationException(SR.Format(SR.XmlChoiceMissingAnyValue, choiceMapping.TypeDesc!.FullName)); 4574throw 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); 1934throw new InvalidOperationException(SR.XmlInternalError); 2037if (methodName == null) throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorMethod, structMapping.TypeDesc!.Name)); 2103throw new InvalidOperationException(SR.XmlInternalError); 2320throw new InvalidOperationException(SR.Format(SR.XmlChoiceMissingAnyValue, choiceMapping.TypeDesc!.FullName)); 2323throw 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); 495throw new InvalidOperationException(SR.Format(SR.XmlInvalidEncodingNotEncoded1, encodingStyle)); 521throw new InvalidOperationException(SR.Format(SR.XmlSerializeErrorDetails, lineInfo.LineNumber.ToString(CultureInfo.InvariantCulture), lineInfo.LinePosition.ToString(CultureInfo.InvariantCulture)), e); 525throw new InvalidOperationException(SR.XmlSerializeError, e); 679throw new InvalidOperationException(SR.XmlMelformMapping); 688throw new InvalidOperationException(SR.Format(SR.XmlPregenTypeDynamic, type.FullName)); 953throw new InvalidOperationException(SR.Format(SR.XmlUnxpectedType, _primitiveType!.FullName)); 1043throw 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); 850if (r.ReadState != ReadState.Interactive) throw new InvalidOperationException(SR.InvalidOperation_ExpectedInteractive); 862if (r.ReadState != ReadState.Interactive) throw new InvalidOperationException(SR.InvalidOperation_ExpectedInteractive); 883if (r.ReadState != ReadState.Interactive) throw new InvalidOperationException(SR.InvalidOperation_ExpectedInteractive); 1012if (!r.CanResolveEntity) throw new InvalidOperationException(SR.InvalidOperation_UnresolvedEntityReference); 1018throw new InvalidOperationException(SR.Format(SR.InvalidOperation_UnexpectedNodeType, nodeType)); 1073if (!r.CanResolveEntity) throw new InvalidOperationException(SR.InvalidOperation_UnresolvedEntityReference); 1079throw new InvalidOperationException(SR.Format(SR.InvalidOperation_UnexpectedNodeType, nodeType)); 1179if (!r.CanResolveEntity) throw new InvalidOperationException(SR.InvalidOperation_UnresolvedEntityReference); 1185throw new InvalidOperationException(SR.Format(SR.InvalidOperation_UnexpectedNodeType, nodeType)); 1303if (!r.CanResolveEntity) throw new InvalidOperationException(SR.InvalidOperation_UnresolvedEntityReference); 1309throw new InvalidOperationException(SR.Format(SR.InvalidOperation_UnexpectedNodeType, nodeType)); 1334if (n.parent != this) throw new InvalidOperationException(SR.InvalidOperation_ExternalCode);
System\Xml\Linq\XDocument.cs (5)
436if (!reader.EOF) throw new InvalidOperationException(SR.InvalidOperation_ExpectedEndOfFile); 437if (d.Root == null) throw new InvalidOperationException(SR.InvalidOperation_MissingRoot); 484if (!reader.EOF) throw new InvalidOperationException(SR.InvalidOperation_ExpectedEndOfFile); 485if (d.Root == null) throw new InvalidOperationException(SR.InvalidOperation_MissingRoot); 936if (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)
106if (parent == null) throw new InvalidOperationException(SR.InvalidOperation_MissingParent); 150if (parent == null) throw new InvalidOperationException(SR.InvalidOperation_MissingParent); 241if (p1 != p2) throw new InvalidOperationException(SR.InvalidOperation_MissingAncestor); 268throw new InvalidOperationException(SR.InvalidOperation_MissingAncestor); 427if (reader.ReadState != ReadState.Interactive) throw new InvalidOperationException(SR.InvalidOperation_ExpectedInteractive); 445throw new InvalidOperationException(SR.Format(SR.InvalidOperation_UnexpectedNodeType, reader.NodeType)); 472if (reader.ReadState != ReadState.Interactive) throw new InvalidOperationException(SR.InvalidOperation_ExpectedInteractive); 506throw new InvalidOperationException(SR.Format(SR.InvalidOperation_UnexpectedNodeType, reader.NodeType)); 523if (parent == null) throw new InvalidOperationException(SR.InvalidOperation_MissingParent); 539if (parent == null) throw new InvalidOperationException(SR.InvalidOperation_MissingParent); 545if (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)
220throw new InvalidOperationException(SR.InvalidOperation_AddNullProperty); 224throw new InvalidOperationException(SR.InvalidOperation_AddPropertyDifferentContext); 229throw 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\runtime\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); 772throw new InvalidOperationException(SR.Argument_BadExceptionCodeGen); 795throw 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)
1077throw 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)
138throw new InvalidOperationException(SR.InvalidOperation_BadTypeAttributesNotAbstract); 145throw new InvalidOperationException(SR.Format(SR.InvalidOperation_BadMethodBody, method.Name)); 155throw new InvalidOperationException(SR.InvalidOperation_TypeHasBeenCreated); 164throw new InvalidOperationException(SR.InvalidOperation_ConstructorNotAllowedOnInterface); 190throw new InvalidOperationException(SR.InvalidOperation_ConstructorNotAllowedOnInterface); 263throw 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)
543throw 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); 1111throw new InvalidOperationException(SR.StandaloneDebugMetadataImageDoesNotContainModuleTable);
System\Reflection\Metadata\TypeNameParserHelpers.cs (7)
358throw new InvalidOperationException(SR.Format(SR.InvalidOperation_MaxNodesExceeded, limit)); 369throw new InvalidOperationException(SR.InvalidOperation_NotGenericType); 380throw new InvalidOperationException(SR.InvalidOperation_NotNestedType); 391throw new InvalidOperationException(SR.InvalidOperation_NoElement); 402throw new InvalidOperationException(SR.Argument_HasToBeArrayClass); 413throw new InvalidOperationException(SR.InvalidOperation_NestedTypeNamespace); 437throw new InvalidOperationException(SR.Format(SR.Arg_NotSimpleTypeName, fullName));
System\Reflection\PortableExecutable\PEBuilder.cs (2)
80throw new InvalidOperationException(SR.Format(SR.MustNotReturnNull, nameof(CreateSections))); 482throw 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)
208public sealed override object[] GetCustomAttributes(bool inherit) => throw new InvalidOperationException(SR.Arg_ReflectionOnlyCA); 209public sealed override object[] GetCustomAttributes(Type attributeType, bool inherit) => throw new InvalidOperationException(SR.Arg_ReflectionOnlyCA); 210public sealed override bool IsDefined(Type attributeType, bool inherit) => throw new InvalidOperationException(SR.Arg_ReflectionOnlyCA);
System\Reflection\TypeLoading\Constructors\RoConstructor.cs (9)
36public sealed override object[] GetCustomAttributes(bool inherit) => throw new InvalidOperationException(SR.Arg_InvalidOperation_Reflection); 37public sealed override object[] GetCustomAttributes(Type attributeType, bool inherit) => throw new InvalidOperationException(SR.Arg_InvalidOperation_Reflection); 38public sealed override bool IsDefined(Type attributeType, bool inherit) => throw new InvalidOperationException(SR.Arg_InvalidOperation_Reflection); 74public sealed override bool IsSecurityCritical => throw new InvalidOperationException(SR.InvalidOperation_IsSecurity); 75public sealed override bool IsSecuritySafeCritical => throw new InvalidOperationException(SR.InvalidOperation_IsSecurity); 76public sealed override bool IsSecurityTransparent => throw new InvalidOperationException(SR.InvalidOperation_IsSecurity); 79public sealed override object Invoke(object? obj, BindingFlags invokeAttr, Binder? binder, object?[]? parameters, CultureInfo? culture) => throw new InvalidOperationException(SR.Arg_ReflectionOnlyInvoke); 80public sealed override object Invoke(BindingFlags invokeAttr, Binder? binder, object?[]? parameters, CultureInfo? culture) => throw new InvalidOperationException(SR.Arg_ReflectionOnlyInvoke); 81public sealed override RuntimeMethodHandle MethodHandle => throw new InvalidOperationException(SR.Arg_InvalidOperation_Reflection);
System\Reflection\TypeLoading\Events\RoEvent.cs (5)
76public sealed override object[] GetCustomAttributes(bool inherit) => throw new InvalidOperationException(SR.Arg_InvalidOperation_Reflection); 77public sealed override object[] GetCustomAttributes(Type attributeType, bool inherit) => throw new InvalidOperationException(SR.Arg_InvalidOperation_Reflection); 78public sealed override bool IsDefined(Type attributeType, bool inherit) => throw new InvalidOperationException(SR.Arg_InvalidOperation_Reflection); 79public sealed override void AddEventHandler(object? target, Delegate? handler) => throw new InvalidOperationException(SR.Arg_InvalidOperation_Reflection); 80public sealed override void RemoveEventHandler(object? target, Delegate? handler) => throw new InvalidOperationException(SR.Arg_InvalidOperation_Reflection);
System\Reflection\TypeLoading\Fields\RoField.cs (12)
129public sealed override object? GetRawConstantValue() => IsLiteral ? ComputeRawConstantValue() : throw new InvalidOperationException(); 136public sealed override bool IsSecurityCritical => throw new InvalidOperationException(SR.InvalidOperation_IsSecurity); 137public sealed override bool IsSecuritySafeCritical => throw new InvalidOperationException(SR.InvalidOperation_IsSecurity); 138public sealed override bool IsSecurityTransparent => throw new InvalidOperationException(SR.InvalidOperation_IsSecurity); 141public sealed override object[] GetCustomAttributes(bool inherit) => throw new InvalidOperationException(SR.Arg_InvalidOperation_Reflection); 142public sealed override object[] GetCustomAttributes(Type attributeType, bool inherit) => throw new InvalidOperationException(SR.Arg_InvalidOperation_Reflection); 143public sealed override bool IsDefined(Type attributeType, bool inherit) => throw new InvalidOperationException(SR.Arg_InvalidOperation_Reflection); 144public sealed override RuntimeFieldHandle FieldHandle => throw new InvalidOperationException(SR.Arg_InvalidOperation_Reflection); 145public sealed override object GetValue(object? obj) => throw new InvalidOperationException(SR.Arg_InvalidOperation_Reflection); 146public sealed override object GetValueDirect(TypedReference obj) => throw new InvalidOperationException(SR.Arg_InvalidOperation_Reflection); 147public sealed override void SetValue(object? obj, object? value, BindingFlags invokeAttr, Binder? binder, CultureInfo? culture) => throw new InvalidOperationException(SR.Arg_InvalidOperation_Reflection); 148public 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)
44public sealed override object[] GetCustomAttributes(bool inherit) => throw new InvalidOperationException(SR.Arg_InvalidOperation_Reflection); 45public sealed override object[] GetCustomAttributes(Type attributeType, bool inherit) => throw new InvalidOperationException(SR.Arg_InvalidOperation_Reflection); 46public sealed override bool IsDefined(Type attributeType, bool inherit) => throw new InvalidOperationException(SR.Arg_InvalidOperation_Reflection); 117public sealed override bool IsSecurityCritical => throw new InvalidOperationException(SR.InvalidOperation_IsSecurity); 118public sealed override bool IsSecuritySafeCritical => throw new InvalidOperationException(SR.InvalidOperation_IsSecurity); 119public sealed override bool IsSecurityTransparent => throw new InvalidOperationException(SR.InvalidOperation_IsSecurity); 122public sealed override object Invoke(object? obj, BindingFlags invokeAttr, Binder? binder, object?[]? parameters, CultureInfo? culture) => throw new InvalidOperationException(SR.Arg_ReflectionOnlyInvoke); 123public sealed override Delegate CreateDelegate(Type delegateType) => throw new InvalidOperationException(SR.Arg_InvalidOperation_Reflection); 124public sealed override Delegate CreateDelegate(Type delegateType, object? target) => throw new InvalidOperationException(SR.Arg_InvalidOperation_Reflection); 125public 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)
155throw new InvalidOperationException(SR.Arg_EnumLitValueNotFound); 166public sealed override object[] GetCustomAttributes(bool inherit) => throw new InvalidOperationException(SR.Arg_InvalidOperation_Reflection); 167public sealed override object[] GetCustomAttributes(Type attributeType, bool inherit) => throw new InvalidOperationException(SR.Arg_InvalidOperation_Reflection); 168public sealed override bool IsDefined(Type attributeType, bool inherit) => throw new InvalidOperationException(SR.Arg_InvalidOperation_Reflection); 169public sealed override object GetConstantValue() => throw new InvalidOperationException(SR.Arg_InvalidOperation_Reflection); 170public sealed override object GetValue(object? obj, BindingFlags invokeAttr, Binder? binder, object?[]? index, CultureInfo? culture) => throw new InvalidOperationException(SR.Arg_InvalidOperation_Reflection); 171public 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)); 230public sealed override GenericParameterAttributes GenericParameterAttributes => throw new InvalidOperationException(SR.Arg_NotGenericParameter); 231public sealed override int GenericParameterPosition => throw new InvalidOperationException(SR.Arg_NotGenericParameter); 232public sealed override Type[] GetGenericParameterConstraints() => throw new InvalidOperationException(SR.Arg_NotGenericParameter); 233public sealed override MethodBase DeclaringMethod => throw new InvalidOperationException(SR.Arg_NotGenericParameter); 234public sealed override Type GetFunctionPointerReturnType() => throw new InvalidOperationException(SR.InvalidOperation_NotFunctionPointer); 235public 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)
182public override Type GetFunctionPointerReturnType() => throw new InvalidOperationException(SR.InvalidOperation_NotFunctionPointer); 183public override Type[] GetFunctionPointerParameterTypes() => throw new InvalidOperationException(SR.InvalidOperation_NotFunctionPointer);
System\Reflection\TypeLoading\Types\RoType.cs (10)
62throw new InvalidOperationException(SR.InvalidOperation_NotFunctionPointer); 328public sealed override Array GetEnumValues() => throw new InvalidOperationException(SR.Arg_InvalidOperation_Reflection); 383public sealed override bool IsSecurityCritical => throw new InvalidOperationException(SR.InvalidOperation_IsSecurity); 384public sealed override bool IsSecuritySafeCritical => throw new InvalidOperationException(SR.InvalidOperation_IsSecurity); 385public sealed override bool IsSecurityTransparent => throw new InvalidOperationException(SR.InvalidOperation_IsSecurity); 388public sealed override RuntimeTypeHandle TypeHandle => throw new InvalidOperationException(SR.Arg_InvalidOperation_Reflection); 389public sealed override object[] GetCustomAttributes(bool inherit) => throw new InvalidOperationException(SR.Arg_ReflectionOnlyCA); 390public sealed override object[] GetCustomAttributes(Type attributeType, bool inherit) => throw new InvalidOperationException(SR.Arg_ReflectionOnlyCA); 391public sealed override bool IsDefined(Type attributeType, bool inherit) => throw new InvalidOperationException(SR.Arg_ReflectionOnlyCA); 392public 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\runtime\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\runtime\src\libraries\System.Private.CoreLib\src\System\Resources\ResourceReader.cs (13)
235throw new InvalidOperationException(SR.ResourceReaderIsClosed); 483throw new InvalidOperationException(SR.Format(SR.InvalidOperation_ResourceNotString_Type, FindType(typeIndex).FullName)); 496throw new InvalidOperationException(SR.Format(SR.InvalidOperation_ResourceNotString_Type, typeString)); 1085if (_currentName == ENUM_DONE) throw new InvalidOperationException(SR.InvalidOperation_EnumEnded); 1086if (!_currentIsValid) throw new InvalidOperationException(SR.InvalidOperation_EnumNotStarted); 1087if (_reader._resCache == null) throw new InvalidOperationException(SR.ResourceReaderIsClosed); 1102if (_currentName == ENUM_DONE) throw new InvalidOperationException(SR.InvalidOperation_EnumEnded); 1103if (!_currentIsValid) throw new InvalidOperationException(SR.InvalidOperation_EnumNotStarted); 1104if (_reader._resCache == null) throw new InvalidOperationException(SR.ResourceReaderIsClosed); 1139if (_currentName == ENUM_DONE) throw new InvalidOperationException(SR.InvalidOperation_EnumEnded); 1140if (!_currentIsValid) throw new InvalidOperationException(SR.InvalidOperation_EnumNotStarted); 1141if (_reader._resCache == null) throw new InvalidOperationException(SR.ResourceReaderIsClosed); 1153if (_reader._resCache == null) throw new InvalidOperationException(SR.ResourceReaderIsClosed);
System.Resources.Writer (7)
src\runtime\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.InteropServices.JavaScript (17)
System\Runtime\InteropServices\JavaScript\CancelablePromise.cs (1)
20if (holder == null) throw new InvalidOperationException("Expected Task converted from JS Promise");
System\Runtime\InteropServices\JavaScript\Interop\JavaScriptExports.CoreCLR.cs (3)
58throw new InvalidOperationException(SR.NullToManagedCallback); 116throw new InvalidOperationException(SR.UnableToResolveHandleAsException); 156argException.ToJS(new InvalidOperationException("Unable to resolve JSExport by handle"));
System\Runtime\InteropServices\JavaScript\JSHostImplementation.cs (8)
33throw new InvalidOperationException(); 64throw new InvalidOperationException(); 78throw new InvalidOperationException(); 217throw new InvalidOperationException(SR.CannotResolveManagedEntrypointHandle); 262throw new InvalidOperationException(SR.Format(SR.ReturnTypeNotSupportedForMain, method.ReturnType.FullName)); 355throw new InvalidOperationException("No assembly name specified " + fqn); 357throw new InvalidOperationException("No class name specified " + fqn); 359throw new InvalidOperationException("No method name specified " + fqn);
System\Runtime\InteropServices\JavaScript\JSProxyContext.cs (4)
381throw new InvalidOperationException("ReleasePromiseHolder expected PromiseHolder " + holderGCHandle); 395throw new InvalidOperationException("ReleasePromiseHolder expected PromiseHolder" + holderGCHandle); 422throw new InvalidOperationException("ReleaseJSOwnedObjectByGCHandle expected in ThreadJsOwnedHolders"); 437throw new InvalidOperationException("ReleaseJSOwnedObjectByGCHandle expected in ThreadJsOwnedObjects");
System\Runtime\InteropServices\JavaScript\Marshaling\JSMarshalerArgument.Task.cs (1)
132if (fail == null) throw new InvalidOperationException(SR.FailedToMarshalException);
System.Runtime.Serialization.Schema (11)
System\Runtime\Serialization\Schema\CodeExporter.cs (7)
81throw ExceptionUtil.ThrowHelperError(new InvalidOperationException(SR.Format(SR.CLRNamespaceMappedMultipleTimes, currentDataContractNamespace, dataContractNamespace, clrNamespace))); 561throw 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, type.AssemblyQualifiedName, dataContract.XmlName.Name, dataContract.XmlName.Namespace))); 589throw ExceptionUtil.ThrowHelperError(new InvalidOperationException(SR.Format(SR.ReferencedTypeDoesNotMatch, 1068throw ExceptionUtil.ThrowHelperError(new InvalidOperationException(SR.Format(SR.CannotDeriveFromSealedReferenceType, dataContract.XmlName.Name, dataContract.XmlName.Namespace, GetClrTypeFullName(baseType)))); 1218throw ExceptionUtil.ThrowHelperError(new InvalidOperationException( 1247throw 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))); 52throw 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.AccessControl (48)
System\Security\AccessControl\ACE.cs (5)
95throw new InvalidOperationException(); 645throw new InvalidOperationException(); 882throw new InvalidOperationException(); 1215throw new InvalidOperationException(); 1687throw new InvalidOperationException();
System\Security\AccessControl\ACL.cs (14)
36throw new InvalidOperationException(SR.Arg_InvalidOperationException); 191throw new InvalidOperationException(SR.AccessControl_AclTooLong); 247throw new InvalidOperationException(); 349throw new InvalidOperationException(); 379throw new InvalidOperationException(); 1454throw new InvalidOperationException(SR.InvalidOperation_ModificationOfNonCanonicalAcl); 2340throw new InvalidOperationException( 2358throw new InvalidOperationException( 2376throw new InvalidOperationException( 2393throw new InvalidOperationException( 2472throw new InvalidOperationException( 2492throw new InvalidOperationException( 2512throw new InvalidOperationException( 2531throw new InvalidOperationException(
System\Security\AccessControl\CommonObjectSecurity.cs (3)
252throw new InvalidOperationException(); 293throw new InvalidOperationException(); 372throw new InvalidOperationException();
System\Security\AccessControl\NativeObjectSecurity.cs (8)
107exception = new InvalidOperationException(SR.AccessControl_InvalidOwner); 111exception = new InvalidOperationException(SR.AccessControl_InvalidGroup); 115exception = new InvalidOperationException(SR.Format(SR.AccessControl_UnexpectedError, error)); 139exception = new InvalidOperationException(SR.InvalidOperation_DisconnectedPipe); 144exception = new InvalidOperationException(SR.Format(SR.AccessControl_UnexpectedError, error)); 253exception = new InvalidOperationException(SR.AccessControl_InvalidOwner); 257exception = new InvalidOperationException(SR.AccessControl_InvalidGroup); 278exception = new InvalidOperationException(SR.Format(SR.AccessControl_UnexpectedError, error));
System\Security\AccessControl\ObjectSecurity.cs (8)
149throw new InvalidOperationException(SR.InvalidOperation_MustLockForReadOrWrite); 159throw new InvalidOperationException(SR.InvalidOperation_MustLockForWrite); 172throw new InvalidOperationException(SR.InvalidOperation_MustLockForReadOrWrite); 182throw new InvalidOperationException(SR.InvalidOperation_MustLockForWrite); 195throw new InvalidOperationException(SR.InvalidOperation_MustLockForReadOrWrite); 205throw new InvalidOperationException(SR.InvalidOperation_MustLockForWrite); 218throw new InvalidOperationException(SR.InvalidOperation_MustLockForReadOrWrite); 228throw new InvalidOperationException(SR.InvalidOperation_MustLockForWrite);
System\Security\AccessControl\Privilege.cs (7)
113throw new InvalidOperationException(); 263throw new InvalidOperationException(); 373throw new InvalidOperationException(SR.InvalidOperation_MustBeSameThread); 379throw new InvalidOperationException(SR.InvalidOperation_MustRevertPrivilege); 456throw new InvalidOperationException(); 466throw new InvalidOperationException(SR.InvalidOperation_MustBeSameThread); 521throw new InvalidOperationException();
System\Security\AccessControl\SecurityDescriptor.cs (2)
185throw new InvalidOperationException(); 190throw new InvalidOperationException();
System\Security\AccessControl\Win32.cs (1)
136throw new InvalidOperationException(SR.InvalidOperation_NoSecurityDescriptor);
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 (65)
src\runtime\src\libraries\Common\src\System\Security\Cryptography\Asn1\DirectoryStringAsn.xml.cs (1)
21throw new InvalidOperationException($"Tag '{tag}' is in use by both '{existing}' and '{fieldName}'");
src\runtime\src\libraries\Common\src\System\Security\Cryptography\Asn1\ECDomainParameters.xml.cs (1)
21throw new InvalidOperationException($"Tag '{tag}' is in use by both '{existing}' and '{fieldName}'");
src\runtime\src\libraries\Common\src\System\Security\Cryptography\Asn1\GeneralNameAsn.xml.cs (1)
21throw new InvalidOperationException($"Tag '{tag}' is in use by both '{existing}' and '{fieldName}'");
src\runtime\src\libraries\Common\src\System\Security\Cryptography\Asn1\MLDsaPrivateKeyAsn.xml.cs (1)
21throw new InvalidOperationException($"Tag '{tag}' is in use by both '{existing}' and '{fieldName}'");
src\runtime\src\libraries\Common\src\System\Security\Cryptography\Asn1\MLKemPrivateKeyAsn.xml.cs (1)
21throw new InvalidOperationException($"Tag '{tag}' is in use by both '{existing}' and '{fieldName}'");
src\runtime\src\libraries\Common\src\System\Security\Cryptography\Asn1\Pbkdf2SaltChoice.xml.cs (1)
21throw new InvalidOperationException($"Tag '{tag}' is in use by both '{existing}' and '{fieldName}'");
src\runtime\src\libraries\Common\src\System\Security\Cryptography\Asn1\Pkcs7\CertificateChoiceAsn.xml.cs (1)
21throw new InvalidOperationException($"Tag '{tag}' is in use by both '{existing}' and '{fieldName}'");
src\runtime\src\libraries\Common\src\System\Security\Cryptography\Asn1\Pkcs7\SignerIdentifierAsn.xml.cs (1)
21throw new InvalidOperationException($"Tag '{tag}' is in use by both '{existing}' and '{fieldName}'");
src\runtime\src\libraries\Common\src\System\Security\Cryptography\CryptographicAttributeObject.cs (1)
45throw new InvalidOperationException(SR.Format(SR.InvalidOperation_WrongOidInAsnCollection, oid.Value, asn.Oid.Value));
src\runtime\src\libraries\Common\src\System\Security\Cryptography\CryptographicAttributeObjectCollection.cs (1)
54throw new InvalidOperationException(SR.InvalidOperation_DuplicateItemNotAllowed);
src\runtime\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\runtime\src\libraries\Common\src\System\Security\Cryptography\Pkcs\Pkcs12CertBag.cs (1)
84throw new InvalidOperationException(SR.Cryptography_Pkcs12_CertBagNotX509);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\Pkcs\Pkcs12Info.cs (1)
41throw new InvalidOperationException(
src\runtime\src\libraries\Common\src\System\Security\Cryptography\Pkcs\Pkcs12SafeContents.cs (8)
79throw new InvalidOperationException(SR.Cryptography_Pkcs12_SafeContentsIsReadOnly); 91throw new InvalidOperationException(SR.Cryptography_Pkcs12_SafeContentsIsReadOnly); 103throw new InvalidOperationException(SR.Cryptography_Pkcs12_SafeContentsIsReadOnly); 118throw new InvalidOperationException(SR.Cryptography_Pkcs12_SafeContentsIsReadOnly); 145throw new InvalidOperationException(SR.Cryptography_Pkcs12_SafeContentsIsReadOnly); 173throw new InvalidOperationException(SR.Cryptography_Pkcs12_SafeContentsIsReadOnly); 219throw new InvalidOperationException( 280throw new InvalidOperationException(SR.Cryptography_Pkcs12_SafeContentsIsEncrypted);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\RsaPaddingProcessor.cs (1)
639throw new InvalidOperationException();
src\runtime\src\libraries\Common\src\System\Security\Cryptography\X509Certificates\Pkcs12LoaderLimits.cs (1)
146throw new InvalidOperationException(SR.Cryptography_X509_PKCS12_LimitsReadOnly);
System\Security\Cryptography\CapiHelper.Windows.cs (2)
1184throw new InvalidOperationException(); 1208throw new InvalidOperationException();
System\Security\Cryptography\ECDiffieHellmanCng.Derive.cs (1)
79throw new InvalidOperationException(SR.Cryptography_TlsRequiresLabelAndSeed);
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\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\TimeAsn.xml.cs (1)
21throw new InvalidOperationException($"Tag '{tag}' is in use by both '{existing}' and '{fieldName}'");
System\Security\Cryptography\X509Certificates\CertificateRequest.cs (9)
448throw new InvalidOperationException(SR.Cryptography_CertReq_NoKeyProvided); 512throw new InvalidOperationException(SR.Cryptography_CertReq_NoHashAlgorithmProvided); 529throw new InvalidOperationException( 535throw new InvalidOperationException( 541throw new InvalidOperationException(SR.Cryptography_CertReq_ExtensionRequestInOtherAttributes); 684throw new InvalidOperationException(SR.Cryptography_CertReq_NoKeyProvided); 902throw new InvalidOperationException(SR.Cryptography_CertReq_RSAPaddingRequired); 1024throw new InvalidOperationException(SR.Cryptography_CertReq_NoHashAlgorithmProvided); 1072throw 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\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 (5)
763throw new InvalidOperationException(SR.Cryptography_Cert_AlreadyHasPrivateKey); 851throw new InvalidOperationException(SR.Cryptography_Cert_AlreadyHasPrivateKey); 953throw new InvalidOperationException(SR.Cryptography_Cert_AlreadyHasPrivateKey); 1049throw new InvalidOperationException(SR.Cryptography_Cert_AlreadyHasPrivateKey); 1159throw 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.CoseHeaderMapCborEncodedValueNotValid); 164throw new InvalidOperationException(SR.CoseHeaderValueErrorWhileDecoding, ex); 169throw new InvalidOperationException(SR.CoseHeaderMapCborEncodedValueNotValid); 191throw new InvalidOperationException(SR.CoseHeaderValueErrorWhileDecoding, ex); 196throw new InvalidOperationException(SR.CoseHeaderMapCborEncodedValueNotValid); 223throw new InvalidOperationException(SR.CoseHeaderValueErrorWhileDecoding, ex); 228throw new InvalidOperationException(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); 859throw new InvalidOperationException(SR.ContentWasEmbedded); 921throw new InvalidOperationException(SR.ContentWasEmbedded); 996throw 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 (43)
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);
Internal\Cryptography\Pal\Windows\KeyAgreeRecipientInfoPalWindows.cs (2)
116throw new InvalidOperationException(SR.Cryptography_Cms_Key_Agree_Date_Not_Available); 137throw new InvalidOperationException(SR.Cryptography_Cms_Key_Agree_Date_Not_Available);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\Asn1\DirectoryStringAsn.xml.cs (1)
21throw new InvalidOperationException($"Tag '{tag}' is in use by both '{existing}' and '{fieldName}'");
src\runtime\src\libraries\Common\src\System\Security\Cryptography\Asn1\GeneralNameAsn.xml.cs (1)
21throw new InvalidOperationException($"Tag '{tag}' is in use by both '{existing}' and '{fieldName}'");
src\runtime\src\libraries\Common\src\System\Security\Cryptography\Asn1\Pbkdf2SaltChoice.xml.cs (1)
21throw new InvalidOperationException($"Tag '{tag}' is in use by both '{existing}' and '{fieldName}'");
src\runtime\src\libraries\Common\src\System\Security\Cryptography\Asn1\Pkcs7\CertificateChoiceAsn.xml.cs (1)
21throw new InvalidOperationException($"Tag '{tag}' is in use by both '{existing}' and '{fieldName}'");
src\runtime\src\libraries\Common\src\System\Security\Cryptography\Asn1\Pkcs7\SignerIdentifierAsn.xml.cs (1)
21throw new InvalidOperationException($"Tag '{tag}' is in use by both '{existing}' and '{fieldName}'");
src\runtime\src\libraries\Common\src\System\Security\Cryptography\CryptographicAttributeObject.cs (1)
45throw new InvalidOperationException(SR.Format(SR.InvalidOperation_WrongOidInAsnCollection, oid.Value, asn.Oid.Value));
src\runtime\src\libraries\Common\src\System\Security\Cryptography\CryptographicAttributeObjectCollection.cs (1)
54throw new InvalidOperationException(SR.InvalidOperation_DuplicateItemNotAllowed);
src\runtime\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\runtime\src\libraries\Common\src\System\Security\Cryptography\Pkcs\Pkcs12CertBag.cs (1)
84throw new InvalidOperationException(SR.Cryptography_Pkcs12_CertBagNotX509);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\Pkcs\Pkcs12Info.cs (1)
41throw new InvalidOperationException(
src\runtime\src\libraries\Common\src\System\Security\Cryptography\Pkcs\Pkcs12SafeContents.cs (8)
79throw new InvalidOperationException(SR.Cryptography_Pkcs12_SafeContentsIsReadOnly); 91throw new InvalidOperationException(SR.Cryptography_Pkcs12_SafeContentsIsReadOnly); 103throw new InvalidOperationException(SR.Cryptography_Pkcs12_SafeContentsIsReadOnly); 118throw new InvalidOperationException(SR.Cryptography_Pkcs12_SafeContentsIsReadOnly); 145throw new InvalidOperationException(SR.Cryptography_Pkcs12_SafeContentsIsReadOnly); 173throw new InvalidOperationException(SR.Cryptography_Pkcs12_SafeContentsIsReadOnly); 219throw new InvalidOperationException( 280throw new InvalidOperationException(SR.Cryptography_Pkcs12_SafeContentsIsEncrypted);
System\Security\Cryptography\Pkcs\Asn1\KeyAgreeRecipientIdentifierAsn.xml.cs (1)
21throw new InvalidOperationException($"Tag '{tag}' is in use by both '{existing}' and '{fieldName}'");
System\Security\Cryptography\Pkcs\Asn1\OriginatorIdentifierOrKeyAsn.xml.cs (1)
21throw new InvalidOperationException($"Tag '{tag}' is in use by both '{existing}' and '{fieldName}'");
System\Security\Cryptography\Pkcs\Asn1\RecipientIdentifierAsn.xml.cs (1)
21throw new InvalidOperationException($"Tag '{tag}' is in use by both '{existing}' and '{fieldName}'");
System\Security\Cryptography\Pkcs\Asn1\RecipientInfoAsn.xml.cs (1)
21throw new InvalidOperationException($"Tag '{tag}' is in use by both '{existing}' and '{fieldName}'");
System\Security\Cryptography\Pkcs\Asn1\SignedAttributesSet.xml.cs (1)
22throw 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); 320throw new InvalidOperationException(SR.Cryptography_Cms_NoSignerCertSilent); 380throw new InvalidOperationException(SR.Cryptography_Cms_MessageNotSigned); 594throw new InvalidOperationException(SR.Cryptography_Cms_MessageNotSigned); 629throw new InvalidOperationException(SR.Cryptography_Cms_MessageNotSigned);
System.Security.Principal.Windows (1)
System\Security\Principal\NTAccount.cs (1)
239throw new InvalidOperationException();
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.Http (22)
System\ServiceModel\BasicHttpBinding.cs (1)
58throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SR.Format(SR.HttpClientCredentialTypeInvalid, BasicHttpSecurity.Transport.ClientCredentialType)));
System\ServiceModel\BasicHttpMessageSecurity.cs (1)
76throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SR.BasicHttpMessageSecurityRequiresCertificate));
System\ServiceModel\BasicHttpsBinding.cs (1)
57throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SR.Format(SR.HttpClientCredentialTypeInvalid, BasicHttpSecurity.Transport.ClientCredentialType)));
System\ServiceModel\Channels\ClientWebSocketTransportDuplexSessionChannel.cs (1)
134throw FxTrace.Exception.AsError(new InvalidOperationException(SR.Format(SR.WebSocketInvalidProtocolNotInClientList, obtained, requested)));
System\ServiceModel\Channels\HttpChannelFactory.cs (7)
107throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SR.UseDefaultWebProxyCantBeUsedWithExplicitProxyAddress)); 526throw FxTrace.Exception.AsError(new InvalidOperationException(SR.Format( 538throw FxTrace.Exception.AsError(new InvalidOperationException(SR.Format( 707throw TraceUtility.ThrowHelperError(new InvalidOperationException(SR.ManualAddressingRequiresAddressedMessages), message); 1282throw FxTrace.Exception.AsError(new InvalidOperationException(SR.Format( 1396throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SR.Format( 1405throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SR.Format(
System\ServiceModel\Channels\HttpChannelHelpers.cs (1)
93new InvalidOperationException(SR.CredentialDisallowsNtlm));
System\ServiceModel\Channels\HttpTransportSecurityHelpers.cs (1)
50throw Fx.Exception.AsError(new InvalidOperationException(SR.OnlyDefaultSpnServiceSupported));
System\ServiceModel\Channels\TransportDuplexSessionChannel.cs (1)
608throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.SendCannotBeCalledAfterCloseOutputSession));
System\ServiceModel\Channels\WebSocketTransportDuplexSessionChannel.cs (2)
701throw FxTrace.Exception.AsError(new InvalidOperationException()); 1099throw FxTrace.Exception.AsError(new InvalidOperationException(SR.WebSocketStreamWriteCalledAfterEOMSent));
System\ServiceModel\HttpTransportSecurity.cs (1)
132throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SR.CertificateUnsupportedForHttpTransportCredentialOnly));
System\ServiceModel\MessageSecurityOverHttp.cs (2)
61throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SR.SecureConversationRequiredByReliableSession)); 73throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SR.ClientCredentialTypeMustBeSpecifiedForMixedMode));
System\ServiceModel\NetHttpBinding.cs (1)
98throw FxTrace.Exception.AsError(new InvalidOperationException(SR.Format(SR.HttpClientCredentialTypeInvalid, BasicHttpSecurity.Transport.ClientCredentialType)));
System\ServiceModel\NetHttpsBinding.cs (1)
90throw FxTrace.Exception.AsError(new InvalidOperationException(SR.Format(SR.HttpClientCredentialTypeInvalid, BasicHttpSecurity.Transport.ClientCredentialType)));
System\ServiceModel\WSHttpBinding.cs (1)
55throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SR.Format(SR.HttpClientCredentialTypeInvalid, _security.Transport.ClientCredentialType)));
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.NetTcp (3)
System\ServiceModel\MessageSecurityOverTcp.cs (1)
72throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SR.ClientCredentialTypeMustBeSpecifiedForMixedMode));
System\ServiceModel\NetTcpBinding.cs (1)
137new InvalidOperationException(SR.Format(SR.TransferModeNotSupported,
System\ServiceModel\TcpTransportSecurity.cs (1)
98throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SR.Format(
System.ServiceModel.Primitives (456)
Internals\System\Runtime\ActionItem.cs (2)
56throw Fx.Exception.AsError(new InvalidOperationException(InternalSR.ActionItemIsAlreadyScheduled)); 67throw Fx.Exception.AsError(new InvalidOperationException(InternalSR.ActionItemIsAlreadyScheduled));
Internals\System\Runtime\AsyncResult.cs (6)
94throw Fx.Exception.AsError(new InvalidOperationException(InternalSR.AsyncResultCompletedTwice(GetType()))); 171throw Fx.Exception.AsError(new InvalidOperationException(InternalSR.InvalidNullAsyncResult)); 268throw Fx.Exception.AsError(new InvalidOperationException(InternalSR.InvalidNullAsyncResult)); 301throw Fx.Exception.AsError(new InvalidOperationException(InternalSR.InvalidAsyncResultImplementation(result.GetType()))); 313throw Fx.Exception.AsError(new InvalidOperationException(message)); 334throw Fx.Exception.AsError(new InvalidOperationException(InternalSR.AsyncResultAlreadyEnded));
Internals\System\Runtime\BufferedOutputStream.cs (1)
254return new InvalidOperationException(InternalSR.BufferedOutputStreamQuotaExceeded(maxSizeQuota));
Internals\System\Runtime\SignalGate.cs (1)
86throw Fx.Exception.AsError(new InvalidOperationException(InternalSR.InvalidSemaphoreExit));
Internals\System\Xml\XmlMtomReader.cs (2)
1780throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.MimeMessageGetContentStreamCalledAlready)); 2803throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.MimeReaderResetCalledBeforeEOF));
Internals\System\Xml\XmlMtomWriter.cs (9)
128throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.XmlWriterClosed)); 1206throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.MimeWriterInvalidStateForStartPreface, state.ToString()))); 1217throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.MimeWriterInvalidStateForStartPart, state.ToString()))); 1241throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.MimeWriterInvalidStateForStartPart, state.ToString()))); 1263throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.MimeWriterInvalidStateForClose, state.ToString()))); 1288throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.MimeWriterInvalidStateForClose, state.ToString()))); 1338throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.MimeWriterInvalidStateForHeader, state.ToString()))); 1358throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.MimeWriterInvalidStateForContent, state.ToString()))); 1377throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.MimeWriterInvalidStateForContent, state.ToString())));
SMDiagnostics\System\ServiceModel\Diagnostics\ExceptionUtility.cs (1)
49return ThrowHelperError(new InvalidOperationException(message));
System\IdentityModel\CryptoHelper.cs (4)
72throw DiagnosticUtility.ExceptionUtility.ThrowHelperWarning(new InvalidOperationException(SRP.Format(SRP.CustomCryptoAlgorithmIsNotValidKeyedHashAlgorithm, algorithm))); 84throw DiagnosticUtility.ExceptionUtility.ThrowHelperWarning(new InvalidOperationException(SRP.Format(SRP.UnsupportedCryptoAlgorithm, algorithm))); 189throw DiagnosticUtility.ExceptionUtility.ThrowHelperWarning(new InvalidOperationException(SRP.Format(SRP.CustomCryptoAlgorithmIsNotValidHashAlgorithm, algorithm))); 205throw DiagnosticUtility.ExceptionUtility.ThrowHelperWarning(new InvalidOperationException(SRP.Format(SRP.UnsupportedCryptoAlgorithm, algorithm)));
System\IdentityModel\Selectors\SecurityTokenResolver.cs (3)
23throw DiagnosticUtility.ExceptionUtility.ThrowHelperWarning(new InvalidOperationException(SRP.Format(SRP.UnableToResolveTokenReference, keyIdentifier))); 46throw DiagnosticUtility.ExceptionUtility.ThrowHelperWarning(new InvalidOperationException(SRP.Format(SRP.UnableToResolveTokenReference, keyIdentifierClause))); 69throw DiagnosticUtility.ExceptionUtility.ThrowHelperWarning(new InvalidOperationException(SRP.Format(SRP.UnableToResolveKeyReference, keyIdentifierClause)));
System\IdentityModel\Tokens\KeyInfoSerializer.cs (3)
129throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.StandardsManagerCannotWriteObject, token.GetType()))); 219throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.StandardsManagerCannotWriteObject, keyIdentifier.GetType()))); 316throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.StandardsManagerCannotWriteObject, keyIdentifierClause.GetType())));
System\IdentityModel\Tokens\SecurityKeyIdentifier.cs (2)
68throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.ObjectIsReadOnly)); 86throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.KeyIdentifierCannotCreateKey));
System\IdentityModel\Tokens\WSSecurityJan2004.cs (1)
247throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.StandardsManagerCannotWriteObject, keyIdentifierClause.GetType())));
System\IdentityModel\Tokens\WSSecurityXXX2005.cs (1)
71throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.StandardsManagerCannotWriteObject, keyIdentifierClause.GetType())));
System\ServiceModel\CallbackBehaviorAttribute.cs (2)
52throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException( 69throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(
System\ServiceModel\ChannelFactory.cs (10)
119throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.SFxChannelFactoryEndpointAddressUri)); 129throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.SFxChannelFactoryCannotCreateFactoryWithoutDescription)); 134throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.SFxChannelFactoryNoBindingFoundInConfigOrCode)); 338throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.InnerChannelFactoryWasNotSet)); 359throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.SFxChannelFactoryTypeMustBeInterface)); 473throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.SFxCreateNonDuplexChannel1, Endpoint.Contract.Name))); 519throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.SfxCallbackTypeCannotBeNull, endpoint.Contract.ContractType.FullName))); 528throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.SfxCallbackTypeCannotBeNull, endpoint.Contract.ContractType.FullName))); 555throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.SFxInvalidStaticOverloadCalledForDuplexChannelFactory1, channelFactory._channelType.Name))); 569throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.SFxInvalidStaticOverloadCalledForDuplexChannelFactory1, channelFactory._channelType.Name)));
System\ServiceModel\Channels\BinaryMessageEncodingBindingElement.cs (1)
75throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(errorMsg));
System\ServiceModel\Channels\Binding.cs (6)
192new InvalidOperationException(SRP.Format(SRP.SecurityCapabilitiesMismatched, this))); 240throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException( 245throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException( 251throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException( 256throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException( 262throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(
System\ServiceModel\Channels\BindingContext.cs (2)
96throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format( 115throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.NotAllBindingElementsBuilt, builder.ToString())));
System\ServiceModel\Channels\BodyWriter.cs (3)
56throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.BodyWriterCanOnlyBeWrittenOnce)); 64throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.BodyWriterReturnedIsNotBuffered)); 121throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.BodyWriterCanOnlyBeWrittenOnce));
System\ServiceModel\Channels\ChannelBuilder.cs (1)
51throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.TransportBindingElementNotFound));
System\ServiceModel\Channels\ChannelFactoryBase.cs (1)
163throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.ChannelFactoryCannotBeUsedToCreateChannels, GetType().ToString())));
System\ServiceModel\Channels\ChannelParameterCollection.cs (2)
101throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(text)); 136throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(text));
System\ServiceModel\Channels\ChannelRequirements.cs (9)
236exception = new InvalidOperationException(SRP.Format(SRP.EndpointListenerRequirementsCannotBeMetBy3, 254exception = new InvalidOperationException(SRP.Format(SRP.CouldnTCreateChannelForType2, bindingName, contractChannelTypesString)); 349return new InvalidOperationException(SRP.Format(SRP.BindingDoesnTSupportAnyChannelTypes1, bindingName)); 353return new InvalidOperationException(SRP.Format(SRP.BindingDoesnTSupportSessionButContractRequires1, bindingName)); 357return new InvalidOperationException(SRP.Format(SRP.BindingDoesntSupportDatagramButContractRequires, bindingName)); 361return new InvalidOperationException(SRP.Format(SRP.BindingDoesnTSupportDuplexButContractRequires1, bindingName)); 365return new InvalidOperationException(SRP.Format(SRP.BindingDoesnTSupportRequestReplyButContract1, bindingName)); 369return new InvalidOperationException(SRP.Format(SRP.BindingDoesnTSupportOneWayButContractRequires1, bindingName)); 373return new InvalidOperationException(SRP.Format(SRP.BindingDoesnTSupportTwoWayButContractRequires1, bindingName));
System\ServiceModel\Channels\ClientReliableDuplexSessionChannel.cs (1)
1039throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.SendCannotBeCalledAfterCloseOutputSession));
System\ServiceModel\Channels\CommunicationObject.cs (3)
334return new InvalidOperationException(SRP.Format(SRP.CommunicationObjectCannotBeUsed, GetCommunicationObjectType().ToString(), _state.ToString())); 339return new InvalidOperationException(SRP.Format(SRP.CommunicationObjectCannotBeModifiedInState, GetCommunicationObjectType().ToString(), _state.ToString())); 344return new InvalidOperationException(SRP.Format(SRP.CommunicationObjectBaseClassMethodNotCalled, GetCommunicationObjectType().ToString(), method));
System\ServiceModel\Channels\FaultConverter.cs (4)
38Exception error = new InvalidOperationException(text); 47Exception error = new InvalidOperationException(text, exception); 64Exception error = new InvalidOperationException(text); 73Exception error = new InvalidOperationException(text);
System\ServiceModel\Channels\IntDecoder.cs (2)
20throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.FramingValueNotAvailable)); 41throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.FramingValueNotAvailable));
System\ServiceModel\Channels\Message.cs (21)
99throw TraceUtility.ThrowHelperError(new InvalidOperationException(SRP.MessageHasBeenCopied), this); 101throw TraceUtility.ThrowHelperError(new InvalidOperationException(SRP.MessageHasBeenRead), this); 103throw TraceUtility.ThrowHelperError(new InvalidOperationException(SRP.MessageHasBeenWritten), this); 106throw TraceUtility.ThrowHelperError(new InvalidOperationException(SRP.InvalidMessageState), this); 350throw TraceUtility.ThrowHelperError(new InvalidOperationException(SRP.MessageIsEmpty), this); 364throw TraceUtility.ThrowHelperError(new InvalidOperationException(SRP.MessageHasBeenCopied), this); 366throw TraceUtility.ThrowHelperError(new InvalidOperationException(SRP.MessageHasBeenRead), this); 368throw TraceUtility.ThrowHelperError(new InvalidOperationException(SRP.MessageHasBeenWritten), this); 373throw TraceUtility.ThrowHelperError(new InvalidOperationException(SRP.InvalidMessageState), this); 380Headers.RelatesTo = requestMessageID ?? throw TraceUtility.ThrowHelperError(new InvalidOperationException(SRP.RequestMessageDoesNotHaveAMessageID), request); 597throw TraceUtility.ThrowHelperError(new InvalidOperationException(SRP.MessageHasBeenCopied), this); 599throw TraceUtility.ThrowHelperError(new InvalidOperationException(SRP.MessageHasBeenRead), this); 601throw TraceUtility.ThrowHelperError(new InvalidOperationException(SRP.MessageHasBeenWritten), this); 606throw TraceUtility.ThrowHelperError(new InvalidOperationException(SRP.InvalidMessageState), this); 750throw TraceUtility.ThrowHelperError(new InvalidOperationException(SRP.MessageHasBeenCopied), this); 752throw TraceUtility.ThrowHelperError(new InvalidOperationException(SRP.MessageHasBeenRead), this); 754throw TraceUtility.ThrowHelperError(new InvalidOperationException(SRP.MessageHasBeenWritten), this); 759throw TraceUtility.ThrowHelperError(new InvalidOperationException(SRP.InvalidMessageState), this); 853throw TraceUtility.ThrowHelperError(new InvalidOperationException(String.Format(CultureInfo.InvariantCulture, "IMessageHeaderWithSharedNamespace must use a single lowercase letter prefix.")), this); 860throw TraceUtility.ThrowHelperError(new InvalidOperationException(String.Format(CultureInfo.InvariantCulture, "IMessageHeaderWithSharedNamespace must use a single lowercase letter prefix.")), this); 1264throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.MessageBodyReaderInvalidReadState, bodyReader.ReadState.ToString())));
System\ServiceModel\Channels\MessageFault.cs (3)
103throw TraceUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.EnvelopeVersionUnknown, envelopeVersion.ToString())), message); 209throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.FaultDoesNotHaveAnyDetail)); 318throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.EnvelopeVersionUnknown, version.ToString())));
System\ServiceModel\Channels\MessageHeader.cs (1)
437throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.EnvelopeVersionUnknown, messageVersion.Envelope.ToString())));
System\ServiceModel\Channels\MessageHeaders.cs (9)
599throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.InvalidEnumValue, header.HeaderType))); 669throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.InvalidEnumValue, kind))); 1087new InvalidOperationException(SRP.Format(SRP.HeadersCannotBeAddedToEnvelopeVersion, MessageVersion.Envelope))); 1097new InvalidOperationException(message, new ProtocolException(message))); 1124throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.InvalidEnumValue, _headers[headerIndex].HeaderType))); 1233throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.InvalidEnumValue, _headers[index].HeaderType))); 1473new InvalidOperationException(message, new ProtocolException(message))); 1789throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.InvalidEnumValue, _headers[headerIndex].HeaderType))); 1821throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.InvalidEnumValue, _headers[headerIndex].HeaderType)));
System\ServiceModel\Channels\MessageProperties.cs (1)
771throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException());
System\ServiceModel\Channels\MessageVersion.cs (1)
171throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(String.Format(CultureInfo.InvariantCulture, "MessageVersion.Addressing cannot be null")));
System\ServiceModel\Channels\MtomMessageEncoder.cs (1)
60throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(CultureInfo.InvariantCulture, "Invalid MessageVersion")));
System\ServiceModel\Channels\ProducerConsumerStream.cs (1)
263throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.ObjectIsReadOnly));
System\ServiceModel\Channels\ReliableChannelBinder.cs (1)
515e = new InvalidOperationException(SRP.Format(
System\ServiceModel\Channels\ReliableSessionBindingElement.cs (2)
392new InvalidOperationException(SRP.ManualAddressingNotSupported)); 412new InvalidOperationException(SRP.Format(SRP.TransferModeNotSupported,
System\ServiceModel\Channels\RequestContextBase.cs (1)
196throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.ReplyAlreadySent));
System\ServiceModel\Channels\RequestReplyCorrelator.cs (1)
153throw TraceUtility.ThrowHelperError(new InvalidOperationException(SRP.MissingMessageID), reply);
System\ServiceModel\Channels\SecurityBindingElement.cs (1)
340throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.EncodingBindingElementDoesNotHandleReaderQuotas));
System\ServiceModel\Channels\SecurityChannelFactory.cs (1)
241throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(
System\ServiceModel\Channels\ServiceChannel.cs (13)
538throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.SFxCallbackRequestReplyInOrder1, typeof(CallbackBehaviorAttribute).Name))); 545throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.SFxNonInitiatingOperation1, operation.Name))); 550throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.SFxTerminatingOperationAlreadyCalled1, _terminatingOperationName))); 580Exception error = new InvalidOperationException(text); 588Exception error = new InvalidOperationException(text); 598Exception error = new InvalidOperationException(text); 1109throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException( 1120Exception error = new InvalidOperationException(text); 1139Exception error = new InvalidOperationException(text); 1148throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.SFxCannotCallAutoOpenWhenExplicitOpenCalled)); 1183throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException( 1429throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.channelIsNotAvailable0)); 1435throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.channelDoesNotHaveADuplexSession0));
System\ServiceModel\Channels\ServiceChannelFactory.cs (3)
137throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException( 159throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException( 369throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.SFxChannelFactoryTypeMustBeInterface));
System\ServiceModel\Channels\ServiceChannelProxy.cs (3)
34throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.FailedToCreateTypedProxy, typeof(TChannel)))); 135throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.InvalidTypedProxyMethodHandle, _proxiedType.Name))); 157throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(String.Format(CultureInfo.InvariantCulture, "Invalid proxy method type")));
System\ServiceModel\Channels\TextMessageEncoder.cs (2)
87throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException( 305throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(
System\ServiceModel\Channels\TransportChannelFactory.cs (1)
33throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.MultipleMebesInParameters));
System\ServiceModel\Channels\TransportSecurityBindingElement.cs (1)
117throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.SecureConversationSecurityTokenParametersRequireBootstrapBinding));
System\ServiceModel\Channels\TransportSecurityHelpers.cs (2)
143throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format( 164throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.NoUserNameTokenProvided));
System\ServiceModel\ClientBase.cs (2)
232throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.SFxImmutableClientBaseCacheSetting, typeof(TChannel).ToString()))); 926throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.SFxChannelFactoryEndpointAddressUri));
System\ServiceModel\DeliveryRequirementsAttribute.cs (5)
88throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException( 96throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException( 101throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException( 115throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException( 122throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(
System\ServiceModel\Description\CallbackDebugBehavior.cs (1)
34throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(
System\ServiceModel\Description\ClientCredentials.cs (2)
181throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.MultipleSecurityCredentialsManagersInChannelBindingParameters, otherCredentialsManager))); 188throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(
System\ServiceModel\Description\ContractDescription.cs (5)
201throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException( 206throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException( 211throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException( 227throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException( 233throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(
System\ServiceModel\Description\DispatcherBuilder.cs (2)
176throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.SFxMultipleContractStarOperations0)); 308Exception error = new InvalidOperationException(text);
System\ServiceModel\Description\OperationDescription.cs (1)
178throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.SFxOperationMustHaveOneOrTwoMessages, Name)));
System\ServiceModel\Description\ServiceEndpoint.cs (2)
173throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.AChannelServiceEndpointSBindingIsNull0)); 177throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.AChannelServiceEndpointSContractIsNull0));
System\ServiceModel\Description\ServiceReflector.cs (20)
151throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(String.Format(CultureInfo.InvariantCulture, "Cannot generate unique name for name {0}", baseName))); 425throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.SFxContractInheritanceRequiresInterfaces2, service, t))); 432throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.ServicesWithoutAServiceContractAttributeCan2, operationContractProviderType.Name, method.Name, service.FullName))); 442throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.SFxContractInheritanceRequiresInterfaces, service, t))); 524throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException( 529throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException( 538throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException( 543throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException( 574throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.tooManyAttributesOfTypeOn2, attrType, attrProvider.ToString()))); 587throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.couldnTFindRequiredAttributeOfTypeOn2, typeof(T), attrProvider.ToString()))); 607throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.SFxDisallowedAttributeCombination, attrProvider, attrType.FullName, otherType.FullName))); 619throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.couldnTFindRequiredAttributeOfTypeOn2, typeof(T), attrProvider.ToString()))); 640throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.AttemptedToGetContractTypeForButThatTypeIs1, interfaceType.Name))); 660throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException( 703new InvalidOperationException(SRP.Format(SRP.SFxBadByValueParameterMetadata, 712new InvalidOperationException(SRP.Format(SRP.SFxBadByReferenceParameterMetadata, 830throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.NoEndMethodFoundForAsyncBeginMethod3, beginMethod.Name, beginMethod.DeclaringType.FullName, endMethodName))); 834throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.MoreThanOneEndMethodFoundForAsyncBeginMethod3, beginMethod.Name, beginMethod.DeclaringType.FullName, endMethodName))); 845throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.InvalidAsyncEndMethodSignatureForMethod2, endMethod.Name, endMethod.DeclaringType.FullName))); 878throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.InvalidAsyncBeginMethodSignatureForMethod2, method.Name, method.DeclaringType.FullName)));
System\ServiceModel\Description\TypedMessageConverter.cs (1)
107throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.SFxActionMismatch, this.Action, message.Headers.Action)));
System\ServiceModel\Description\TypeLoader.cs (50)
111throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException( 143throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format( 148throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format( 379throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.SFxKnownTypeAttributeUnknownMethod3, provider, knownTypeAttribute.MethodName, type.FullName))); 384throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.SFxKnownTypeAttributeReturnType3, provider, knownTypeAttribute.MethodName, type.FullName))); 397throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.SFxKnownTypeAttributeInvalid1, provider.ToString()))); 479new InvalidOperationException(SRP.Format(SRP.SyncAsyncMatchConsistency_Attributes6, 490new InvalidOperationException(SRP.Format(SRP.SyncTaskMatchConsistency_Attributes6, 500new InvalidOperationException(SRP.Format(SRP.TaskAsyncMatchConsistency_Attributes6, 695throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException( 737throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException( 743throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException( 795throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException( 871throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException( 895throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.CannotHaveTwoOperationsWithTheSameName3, method1Name, method2Name, reflectionInfo.iface))); 901throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.CannotHaveTwoOperationsWithTheSameName3, method1Name, method2Name, reflectionInfo.iface))); 907throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.CannotHaveTwoOperationsWithTheSameName3, method1Name, method2Name, reflectionInfo.iface))); 991throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.OneWayAndFaultsIncompatible2, methodInfo.DeclaringType.FullName, operationName.EncodedName))); 1074throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.ServiceOperationsMarkedWithIsOneWayTrueMust0)); 1079throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.OneWayOperationShouldNotSpecifyAReplyAction1, operationName))); 1105throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException( 1111throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException( 1217throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.SFxMultipleUnknownHeaders, methodInfo, methodInfo.DeclaringType))); 1243throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.SFxInvalidMessageContractSignature, methodName))); 1248throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.SFxInvalidMessageContractSignature, methodName))); 1329throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.SFxMessageContractBaseTypeNotValid, baseType, typedMessageType))); 1512throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.SFxInvalidMessageHeaderArrayType, defaultName))); 1524throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.SFxStaticMessageHeaderPropertiesNotAllowed, defaultName))); 1651new InvalidOperationException(SRP.Format(SRP.SyncAsyncMatchConsistency_Parameters5, 1667new InvalidOperationException(SRP.Format(SRP.SyncAsyncMatchConsistency_Parameters5, 1684new InvalidOperationException(SRP.Format(SRP.SyncAsyncMatchConsistency_Parameters5, 1699new InvalidOperationException(SRP.Format(SRP.SyncAsyncMatchConsistency_ReturnType5, 1713new InvalidOperationException(SRP.Format(SRP.SyncAsyncMatchConsistency_Attributes6, 1728new InvalidOperationException(SRP.Format(SRP.SyncAsyncMatchConsistency_Attributes6, 1743new InvalidOperationException(SRP.Format(SRP.SyncAsyncMatchConsistency_Property6, 1760new InvalidOperationException(SRP.Format(SRP.SyncAsyncMatchConsistency_Property6, 1792new InvalidOperationException(SRP.Format(SRP.SyncTaskMatchConsistency_Parameters5, 1807new InvalidOperationException(SRP.Format(SRP.SyncTaskMatchConsistency_Parameters5, 1821new InvalidOperationException(SRP.Format(SRP.SyncTaskMatchConsistency_ReturnType5, 1834new InvalidOperationException(SRP.Format(SRP.SyncTaskMatchConsistency_Attributes6, 1848new InvalidOperationException(SRP.Format(SRP.SyncTaskMatchConsistency_Attributes6, 1862new InvalidOperationException(SRP.Format(SRP.SyncTaskMatchConsistency_Property6, 1878new InvalidOperationException(SRP.Format(SRP.SyncTaskMatchConsistency_Property6, 1909new InvalidOperationException(SRP.Format(SRP.TaskAsyncMatchConsistency_Parameters5, 1925new InvalidOperationException(SRP.Format(SRP.TaskAsyncMatchConsistency_Parameters5, 1940new InvalidOperationException(SRP.Format(SRP.TaskAsyncMatchConsistency_ReturnType5, 1954new InvalidOperationException(SRP.Format(SRP.TaskAsyncMatchConsistency_Attributes6, 1969new InvalidOperationException(SRP.Format(SRP.TaskAsyncMatchConsistency_Attributes6, 1984new InvalidOperationException(SRP.Format(SRP.TaskAsyncMatchConsistency_Property6, 2001new InvalidOperationException(SRP.Format(SRP.TaskAsyncMatchConsistency_Property6,
System\ServiceModel\Description\XmlSerializerOperationBehavior.cs (16)
387throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.SFxKnownTypeNull, Operation.Name))); 399throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.SFxRpcMessageBodyPartNameInvalid, Operation.Name, Operation.Messages[0].MessageName, _request.BodyMapping.XsdElementName, Operation.Name))); 408throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.SFxRpcMessageBodyPartNameInvalid, Operation.Name, Operation.Messages[1].MessageName, _reply.BodyMapping.XsdElementName, responseName.EncodedName))); 499throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.SFxHeaderNameMismatchInMessageContract, message.MessageType, header.MemberInfo.Name, header.Name, headerName))); 503throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.SFxHeaderNameMismatchInOperation, Operation.Name, Operation.DeclaringContract.Name, Operation.DeclaringContract.Namespace, header.Name, headerName))); 510throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.SFxHeaderNamespaceMismatchInMessageContract, message.MessageType, header.MemberInfo.Name, header.Namespace, headerNs))); 514throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.SFxHeaderNamespaceMismatchInOperation, Operation.Name, Operation.DeclaringContract.Name, Operation.DeclaringContract.Namespace, header.Namespace, headerNs))); 578throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.SFxRpcMessageMustHaveASingleBody, Operation.Name, message.MessageName))); 585throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.SFxBodyObjectTypeCannotBeInherited, bodyObjectType.FullName))); 590throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.SFxBodyObjectTypeCannotBeInterface, bodyObjectType.FullName, typeof(IEnumerable).FullName))); 595throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.SFxBodyObjectTypeCannotBeInterface, bodyObjectType.FullName, typeof(IXmlSerializable).FullName))); 692throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.SFxFaultTypeAnonymous, Operation.Name, fault.DetailType.FullName))); 1062throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.SFxMultiplePartsNotAllowedInEncoded, elementName.DecodedName, ns))); 1114throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.SFxInvalidSoapAttribute, invalidAttributeType, elementName.DecodedName))); 1163throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(isWrapped ? SRP.SFxInvalidXmlAttributeInWrapped : SRP.SFxInvalidXmlAttributeInBare, invalidAttributeType, elementName.DecodedName))); 1168throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.SFxXmlArrayNotAllowedForMultiple, elementName.DecodedName, ns)));
System\ServiceModel\Dispatcher\ChannelDispatcher.cs (4)
472return new InvalidOperationException(SRP.Format(SRP.SFxChannelDispatcherUnableToOpen1, _listener.Uri), e); 476return new InvalidOperationException(SRP.Format(SRP.SFxChannelDispatcherUnableToOpen2, _listener.Uri, endpointContractNames), e); 624Exception error = new InvalidOperationException(SRP.SFxChannelDispatcherNoMessageVersion); 668Exception error = new InvalidOperationException(SRP.SFxCollectionDoesNotSupportSet0);
System\ServiceModel\Dispatcher\ChannelHandler.cs (3)
255throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(String.Format(CultureInfo.InvariantCulture, "No DispatchOperationRuntime found to process message."))); 260throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.SFxNoEndpointMatchingAddressForConnectionOpeningMessage, message.Headers.Action, "Open"))); 514throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.SFxNonExceptionThrown));
System\ServiceModel\Dispatcher\ClientRuntime.cs (2)
245throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(text)); 299throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(text));
System\ServiceModel\Dispatcher\DataContractSerializerOperationFormatter.cs (2)
93throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.SFxKnownTypeNull, description.Name))); 525throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(
System\ServiceModel\Dispatcher\DispatchOperationRuntime.cs (5)
29throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.RuntimeRequiresInvoker0)); 49throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.DispatchRuntimeRequiresFormatter0, Name))); 259ErrorBehavior.ThrowAndCatch(new InvalidOperationException(message)); 267ErrorBehavior.ThrowAndCatch(new InvalidOperationException(message)); 274throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.SFxInvalidReplyAction, Name, reply.Headers.Action ?? "{NULL}", ReplyAction)));
System\ServiceModel\Dispatcher\DispatchRuntime.cs (3)
525throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.SFxCannotActivateCallbackInstace)); 530throw TraceUtility.ThrowHelperError(new InvalidOperationException(SRP.SFxCannotActivateCallbackInstace), message); 535throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.SFxCannotActivateCallbackInstace));
System\ServiceModel\Dispatcher\EndpointDispatcher.cs (2)
76Exception error = new InvalidOperationException(SRP.SFxEndpointDispatcherMultipleChannelDispatcher0); 93Exception error = new InvalidOperationException(SRP.SFxEndpointDispatcherDifferentChannelDispatcher0);
System\ServiceModel\Dispatcher\ImmutableDispatchRuntime.cs (2)
156ErrorBehavior.ThrowAndCatch(new InvalidOperationException(message)); 959throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.SFxActionDemuxerDuplicate, existingOperation.Name, operation.Name, action)));
System\ServiceModel\Dispatcher\InstanceBehavior.cs (2)
72throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.SFxNoDefaultConstructor)); 82throw TraceUtility.ThrowHelperError(new InvalidOperationException(SRP.SFxNoDefaultConstructor), request);
System\ServiceModel\Dispatcher\ListenerBinder.cs (1)
50throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.UnknownListenerType1, listener.Uri.AbsoluteUri)));
System\ServiceModel\Dispatcher\MessageRpc.cs (1)
575Exception error = new InvalidOperationException(text);
System\ServiceModel\Dispatcher\OperationFormatter.cs (5)
174throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.SFxMessageContractRequiresDefaultConstructor, messageContractType.FullName), mme)); 528throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.SFxDocEncodedNotSupported, operation.Name))); 543throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.SFxTypedMessageCannotBeRpcLiteral, operation.Name))); 559throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.SFxTypedOrUntypedMessageCannotBeMixedWithParameters, operation.Name))); 564throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.SFxTypedOrUntypedMessageCannotBeMixedWithVoidInRpc, operation.Name)));
System\ServiceModel\Dispatcher\PrimitiveOperationFormatter.cs (8)
219new InvalidOperationException(SRP.Format(SRP.AddressingVersionNotSupported, addressing))); 245new InvalidOperationException(SRP.Format(SRP.AddressingVersionNotSupported, addressing))); 268throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.SFxInvalidUseOfPrimitiveOperationFormatter)); 376throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.SFxMessagePartDescriptionMissingType, bodyDescription.Name, bodyDescription.Namespace))); 912throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.SFxInvalidUseOfPrimitiveOperationFormatter)); 943throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.SFxInvalidUseOfPrimitiveOperationFormatter)); 1004throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.SFxInvalidUseOfPrimitiveOperationFormatter)); 1036throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.SFxInvalidUseOfPrimitiveOperationFormatter));
System\ServiceModel\Dispatcher\ProxyOperationRuntime.cs (3)
80throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.ClientRuntimeRequiresFormatter0, Name))); 235throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.SFxProxyRuntimeMessageCannotBeNull, Name))); 241throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.SFxInvalidRequestAction, Name, rpc.Request.Headers.Action ?? "{NULL}", Action)));
System\ServiceModel\Dispatcher\SharedRuntimeState.cs (2)
41throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.SFxImmutableServiceHostBehavior0)); 45throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.SFxImmutableChannelFactoryBehavior0));
System\ServiceModel\Dispatcher\StreamFormatter.cs (3)
217throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.SFxInvalidStreamInTypedMessage, messageDescription.MessageName))); 221throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.SFxInvalidStreamInRequest, operationName))); 225throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.SFxInvalidStreamInResponse, operationName)));
System\ServiceModel\Dispatcher\SyncMethodInvoker.cs (3)
72throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.SFxNoServiceObject)); 79throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.SFxInputParametersToServiceNull, _inputParameterCount))); 84throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.SFxInputParametersToServiceInvalid, _inputParameterCount, inputs.Length)));
System\ServiceModel\Dispatcher\TaskMethodInvoker.cs (3)
131new InvalidOperationException(SRP.SFxNoServiceObject)); 139new InvalidOperationException(SRP.Format(SRP.SFxInputParametersToServiceNull, _inputParameterCount))); 145new InvalidOperationException(SRP.Format(SRP.SFxInputParametersToServiceInvalid, _inputParameterCount,
System\ServiceModel\Dispatcher\ThreadBehavior.cs (1)
121throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(text));
System\ServiceModel\Dispatcher\XmlSerializerOperationFormatter.cs (2)
33throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.SFxDocEncodedNotSupported, description.Name))); 338throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.SFxBodyCannotBeNull, messageDescription.MessageName)));
System\ServiceModel\DuplexChannelFactory.cs (5)
174throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.SFxCreateDuplexChannelNoCallback1)); 178throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.SFxCreateDuplexChannelNoCallback)); 183throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.SFxCreateDuplexChannelNoCallbackUserObject)); 188throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.SFxCreateDuplexChannel1, Endpoint.Contract.Name))); 195throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(
System\ServiceModel\EndpointIdentity.cs (1)
226throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.UnrecognizedIdentityPropertyType, IdentityClaim.GetType().ToString())));
System\ServiceModel\ExtensionCollection.cs (1)
123throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.SFxCannotSetExtensionsByIndex));
System\ServiceModel\InstanceContext.cs (1)
183Exception error = new InvalidOperationException(SRP.SFxInstanceNotInitialized);
System\ServiceModel\OperationContext.cs (1)
63throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.SFxInvalidChannelToOperationContext));
System\ServiceModel\OperationContextScope.cs (2)
65throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.SFxInterleavedContextScopes0)); 70throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.SFxContextModifiedInsideScope0));
System\ServiceModel\OperationContractAttribute.cs (1)
110throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(
System\ServiceModel\Security\AcceleratedTokenProvider.cs (3)
93throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.BootstrapSecurityBindingElementNotSet, GetType()))); 104throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.BootstrapSecurityBindingElementNotSet, GetType()))); 130throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.EncodingBindingElementDoesNotHandleReaderQuotas));
System\ServiceModel\Security\ChannelProtectionRequirements.cs (1)
266throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.OnlyBodyReturnValuesSupported));
System\ServiceModel\Security\ClientCredentialsSecurityTokenManager.cs (3)
99throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.ClientCertificateNotProvidedOnClientCredentials))); 121throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.ClientCertificateNotProvidedOnClientCredentials))); 136throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.UserNamePasswordNotProvidedOnClientCredentials));
System\ServiceModel\Security\HttpDigestClientCredential.cs (1)
48throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.ObjectIsReadOnly));
System\ServiceModel\Security\IssuanceTokenProviderBase.cs (3)
250Exception e = new InvalidOperationException(SRP.Format(SRP.CommunicationObjectCannotBeUsed, GetType().ToString(), state.ToString())); 266throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.TargetAddressIsNotSet, GetType()))); 271throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.SecurityAlgorithmSuiteNotSet, GetType())));
System\ServiceModel\Security\IssuanceTokenProviderState.cs (2)
38throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.NegotiationIsCompleted)); 48throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.NegotiationIsNotCompleted));
System\ServiceModel\Security\MessagePartSpecification.cs (3)
54throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.ObjectIsReadOnly)); 81throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.ObjectIsReadOnly)); 96throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.ObjectIsReadOnly));
System\ServiceModel\Security\NegotiationTokenProvider.cs (1)
102throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.IssuerBuildContextNotSet, GetType())));
System\ServiceModel\Security\RequestSecurityToken.cs (13)
164throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.ObjectIsReadOnly)); 181throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.ObjectIsReadOnly)); 198throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.ObjectIsReadOnly)); 224throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.ItemNotAvailableInDeserializedRST, "RequestProperties"))); 232throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.ObjectIsReadOnly)); 268throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.ObjectIsReadOnly)); 285throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.ObjectIsReadOnly)); 302throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.ObjectIsReadOnly)); 315throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.ItemAvailableInDeserializedRSTOnly, "RequestSecurityTokenXml"))); 329throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.ItemNotAvailableInDeserializedRST, nameof(AppliesTo)))); 341throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.ItemNotAvailableInDeserializedRST, nameof(AppliesToSerializer)))); 353throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.ItemNotAvailableInDeserializedRST, nameof(AppliesToType)))); 390throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.ObjectIsReadOnly));
System\ServiceModel\Security\RequestSecurityTokenResponse.cs (22)
165throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.ObjectIsReadOnly)); 182throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.ObjectIsReadOnly)); 199throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.ObjectIsReadOnly)); 216throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.ObjectIsReadOnly)); 243throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.ObjectIsReadOnly)); 260throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.ObjectIsReadOnly)); 282throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.ObjectIsReadOnly)); 311throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.ObjectIsReadOnly)); 324throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.ItemNotAvailableInDeserializedRSTR, nameof(EntropyToken)))); 336throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.ItemNotAvailableInDeserializedRSTR, "IssuedToken"))); 344throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.ObjectIsReadOnly)); 357throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.ItemNotAvailableInDeserializedRSTR, "ProofToken"))); 365throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.ObjectIsReadOnly)); 378throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.ItemAvailableInDeserializedRSTROnly, "RequestSecurityTokenXml"))); 390throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.ItemNotAvailableInDeserializedRST, nameof(AppliesTo)))); 402throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.ItemNotAvailableInDeserializedRST, nameof(AppliesToSerializer)))); 414throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.ItemNotAvailableInDeserializedRST, nameof(AppliesToType)))); 426throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.ItemNotAvailableInDeserializedRSTR, nameof(IsLifetimeSet)))); 461throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.ObjectIsReadOnly)); 477throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.ObjectIsReadOnly)); 493throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.ItemAvailableInDeserializedRSTOnly, "MatchesAppliesTo"))); 636throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.ItemAvailableInDeserializedRSTROnly, nameof(GetIssuedToken))));
System\ServiceModel\Security\ScopedMessagePartSpecification.cs (1)
220throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.ObjectIsReadOnly));
System\ServiceModel\Security\SecureConversationDriver.cs (4)
16throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.SecureConversationDriverVersionDoesNotSupportSession)); 24throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.SecureConversationDriverVersionDoesNotSupportSession)); 44throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.SecureConversationDriverVersionDoesNotSupportSession)); 52throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.SecureConversationDriverVersionDoesNotSupportSession));
System\ServiceModel\Security\SecurityAlgorithmSuite.cs (2)
102throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.SigningTokenHasNoKeys, token))); 123throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.SigningTokenHasNoKeysSupportingTheAlgorithmSuite, token, this)));
System\ServiceModel\Security\SecurityAppliedMessage.cs (2)
45return new InvalidOperationException(SRP.Format(SRP.MessageBodyOperationNotValidInBodyState, operation, _state)); 52throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.DelayedSecurityApplicationAlreadyCompleted));
System\ServiceModel\Security\SecurityHeader.cs (1)
117throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.OperationCannotBeDoneAfterProcessingIsStarted));
System\ServiceModel\Security\SecurityProtocolFactory.cs (1)
496throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.NoncesCachedInfinitely));
System\ServiceModel\Security\SecuritySessionClientSettings.cs (7)
222throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.SecuritySessionProtocolFactoryShouldBeSetBeforeThisOperation)); 226throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.SecurityStandardsManagerNotSet, GetType().ToString()))); 230throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.IssuedSecurityTokenParametersNotSet, GetType()))); 234throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.KeyRolloverGreaterThanKeyRenewal)); 447throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.ProtocolMisMatch, nameof(IInitiatorSecuritySessionProtocol), GetType().ToString()))); 1366throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.ChannelMustBeOpenedToGetSessionId)); 1774throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.ChannelNotOpen));
System\ServiceModel\Security\SecuritySessionSecurityTokenProvider.cs (8)
272throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.TargetAddressIsNotSet, GetType()))); 276throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.IssuerBuildContextNotSet, GetType()))); 280throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.IssuedSecurityTokenParametersNotSet, GetType()))); 284throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.BootstrapSecurityBindingElementNotSet, GetType()))); 288throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.SecurityAlgorithmSuiteNotSet, GetType()))); 300throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.IssuerBuildContextNotSet, GetType()))); 304throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.BootstrapSecurityBindingElementNotSet, GetType()))); 336throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.EncodingBindingElementDoesNotHandleReaderQuotas));
System\ServiceModel\Security\SecurityUtils.cs (5)
851throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.CannotFindCert, storeName, storeLocation, findType, findValue))); 907return new InvalidOperationException(SRP.Format(SRP.CannotFindCert, storeName, storeLocation, findType, findValue)); 909return new InvalidOperationException(SRP.Format(SRP.CannotFindCertForTarget, storeName, storeLocation, findType, findValue, target)); 913return new InvalidOperationException(SRP.Format(SRP.FoundMultipleCerts, storeName, storeLocation, findType, findValue)); 915return new InvalidOperationException(SRP.Format(SRP.FoundMultipleCertsForTarget, storeName, storeLocation, findType, findValue, target));
System\ServiceModel\Security\SecurityVerifiedMessage.cs (1)
112return new InvalidOperationException(SRP.Format(SRP.MessageBodyOperationNotValidInBodyState,
System\ServiceModel\Security\SecurityVersion.cs (2)
99throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException( 129throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(
System\ServiceModel\Security\SendSecurityHeader.cs (5)
397throw TraceUtility.ThrowHelperError(new InvalidOperationException(SRP.TimestampAlreadySetForSecurityHeader), Message); 429throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException( 617throw TraceUtility.ThrowHelperError(new InvalidOperationException( 625throw TraceUtility.ThrowHelperError(new InvalidOperationException( 630throw TraceUtility.ThrowHelperError(new InvalidOperationException(
System\ServiceModel\Security\Tokens\DerivedKeySecurityToken.cs (1)
100throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.DerivedKeyNotInitialized));
System\ServiceModel\Security\Tokens\SecurityTokenParameters.cs (1)
61throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.SecurityTokenParametersCloneInvalidResult, GetType().ToString())));
System\ServiceModel\Security\TrustDriver.cs (4)
35throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.TrustDriverVersionDoesNotSupportIssuedTokens)); 44throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.TrustDriverVersionDoesNotSupportIssuedTokens)); 68throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.TrustDriverVersionDoesNotSupportSession)); 79throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.TrustDriverVersionDoesNotSupportSession));
System\ServiceModel\Security\UserNamePasswordClientCredential.cs (1)
61throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.ObjectIsReadOnly));
System\ServiceModel\Security\WindowsClientCredential.cs (1)
96throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.ObjectIsReadOnly));
System\ServiceModel\Security\WSSecurityOneDotZeroSendSecurityHeader.cs (6)
371throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.TimestampToSignHasNoId)); 391throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.TransportSecurityRequireToHeader)); 550throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException( 559throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException( 566throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException( 593throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.ElementToSignMustHaveId));
System\ServiceModel\Security\WSSecurityTokenSerializer.cs (1)
267throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.StandardsManagerCannotWriteObject, token.GetType())));
System\ServiceModel\Security\WSTrust.cs (16)
569throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.RstrHasMultipleIssuedTokens)); 577throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.RstrHasMultipleProofTokens)); 615throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.BadIssuedTokenType, rstr.TokenType, expectedTokenType))); 633throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.NoLicenseXml)); 640throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.BearerKeyTypeCannotHaveProofKey)); 652throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.EntropyModeRequiresRequestorEntropy, keyEntropyMode))); 657throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.EntropyModeCannotHaveProofTokenOrIssuerEntropy, keyEntropyMode))); 665throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.EntropyModeCannotHaveRequestorEntropy, keyEntropyMode))); 669throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.EntropyModeCannotHaveComputedKey, keyEntropyMode))); 673throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.EntropyModeRequiresProofToken, keyEntropyMode))); 687throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.EntropyModeRequiresComputedKey, keyEntropyMode))); 691throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.EntropyModeRequiresIssuerEntropy, keyEntropyMode))); 695throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.EntropyModeRequiresRequestorEntropy, keyEntropyMode))); 699throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.RstrKeySizeNotProvided)); 1260throw DiagnosticUtility.ExceptionUtility.ThrowHelperWarning(new InvalidOperationException(SRP.Format(SRP.EntropyModeRequiresRequestorEntropy, mode))); 1264throw DiagnosticUtility.ExceptionUtility.ThrowHelperWarning(new InvalidOperationException(SRP.Format(SRP.EntropyModeCannotHaveRequestorEntropy, mode)));
System\ServiceModel\Security\X509CertificateInitiatorClientCredential.cs (1)
84throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.ObjectIsReadOnly)));
System\ServiceModel\Security\X509CertificateRecipientClientCredential.cs (1)
132throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.ObjectIsReadOnly)));
System\ServiceModel\Security\X509ServiceCertificateAuthentication.cs (2)
157throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.MissingCustomCertificateValidator))); 171throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.ObjectIsReadOnly)));
System\ServiceModel\XmlBuffer.cs (1)
131return new InvalidOperationException(SRP.XmlBufferInInvalidState);
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)
1076throw new InvalidOperationException(SR.FeedFormatterDoesNotHaveFeed);
System\ServiceModel\Syndication\Atom10ItemFormatter.cs (1)
118throw new InvalidOperationException(SR.ItemFormatterDoesNotHaveItem);
System\ServiceModel\Syndication\AtomPub10CategoriesDocumentFormatter.cs (2)
83throw new InvalidOperationException(SR.DocumentFormatterDoesNotHaveDocument); 107throw new InvalidOperationException(SR.DocumentFormatterDoesNotHaveDocument);
System\ServiceModel\Syndication\AtomPub10ServiceDocumentFormatter.cs (2)
69throw new InvalidOperationException(SR.DocumentFormatterDoesNotHaveDocument); 94throw new InvalidOperationException(SR.DocumentFormatterDoesNotHaveDocument);
System\ServiceModel\Syndication\Rss20FeedFormatter.cs (1)
807throw new InvalidOperationException(SR.FeedFormatterDoesNotHaveFeed);
System\ServiceModel\Syndication\Rss20ItemFormatter.cs (1)
141throw new InvalidOperationException(SR.ItemFormatterDoesNotHaveItem);
System\ServiceModel\Syndication\SyndicationFeed.cs (1)
103throw new InvalidOperationException(SR.UnbufferedItemsCannotBeCloned);
System\ServiceModel\Syndication\SyndicationFeedFormatter.cs (1)
469throw new InvalidOperationException(errorMsg);
System\ServiceModel\XmlBuffer.cs (1)
96private 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.ServiceProcess.ServiceController (19)
System\ServiceProcess\ServiceBase.cs (7)
67throw new InvalidOperationException(SR.NotInPendingState); 132throw new InvalidOperationException(SR.CannotChangeProperties); 158throw new InvalidOperationException(SR.CannotChangeProperties); 184throw new InvalidOperationException(SR.CannotChangeProperties); 210throw new InvalidOperationException(SR.CannotChangeProperties); 236throw new InvalidOperationException(SR.CannotChangeProperties); 281throw new InvalidOperationException(SR.CannotChangeName);
System\ServiceProcess\ServiceController.cs (12)
523throw new InvalidOperationException(SR.Format(SR.ServiceName, userGivenName, ServiceBase.MaxNameLength.ToString())); 542throw new InvalidOperationException(SR.Format(SR.NoService, userGivenName, _machineName), new Win32Exception(Interop.Errors.ERROR_SERVICE_DOES_NOT_EXIST)); 556throw new InvalidOperationException(SR.Format(SR.NoService, _name, _machineName), new Win32Exception(Interop.Errors.ERROR_SERVICE_DOES_NOT_EXIST)); 589throw new InvalidOperationException(SR.Format(SR.NoService, serviceDisplayName, _machineName), new Win32Exception(lastError)); 619throw new InvalidOperationException(SR.Format(SR.NoService, serviceName, _machineName), new Win32Exception(lastError)); 640throw new InvalidOperationException(SR.Format(SR.OpenSC, machineName), inner); 691throw new InvalidOperationException(SR.Format(SR.OpenService, ServiceName, _machineName), inner); 812throw new InvalidOperationException(SR.Format(SR.PauseService, ServiceName, _machineName), inner); 827throw new InvalidOperationException(SR.Format(SR.ResumeService, ServiceName, _machineName), inner); 843throw new InvalidOperationException(SR.Format(SR.ControlService, ServiceName, MachineName), inner); 901throw new InvalidOperationException(SR.Format(SR.CannotStart, ServiceName, _machineName), inner); 962throw new InvalidOperationException(SR.Format(SR.StopService, ServiceName, _machineName), inner);
System.Speech (72)
Internal\ObjectToken\RegistryDataKey.cs (1)
26throw new InvalidOperationException();
Internal\RBList.cs (4)
32throw new InvalidOperationException(); 48throw new InvalidOperationException(); 207throw new InvalidOperationException(); 601throw new InvalidOperationException();
Internal\ResourceLoader.cs (1)
36throw new InvalidOperationException(SR.Get(SRID.CannotReadFromDirectory, file));
Internal\SapiInterop\SapiProxy.cs (1)
119throw new InvalidOperationException();
Internal\SapiInterop\SapiRecognizer.cs (1)
113throw new InvalidOperationException(SR.Get(SRID.RecognizerNotFound));
Internal\SrgsCompiler\AppDomainGrammarProxy.cs (1)
47throw new InvalidOperationException(SR.Get(SRID.ArgumentMismatch));
Internal\SrgsCompiler\Arc.cs (1)
667throw new InvalidOperationException();
Internal\StringBlob.cs (1)
99throw new InvalidOperationException();
Internal\Synthesis\AudioBase.cs (1)
393throw new InvalidOperationException();
Internal\Synthesis\AudioDeviceOut.cs (3)
65throw new InvalidOperationException(); 105throw new InvalidOperationException(); 271throw new InvalidOperationException();
Internal\Synthesis\AudioFileOut.cs (2)
65throw new InvalidOperationException(); 92throw new InvalidOperationException();
Internal\Synthesis\SpeechSeg.cs (1)
75throw new InvalidOperationException();
Internal\Synthesis\SSmlParser.cs (1)
1632throw new InvalidOperationException();
Internal\Synthesis\VoiceSynthesis.cs (6)
348throw new InvalidOperationException(SR.Get(SRID.SynthesizerSetOutputSpeaking)); 353throw new InvalidOperationException(SR.Get(SRID.SynthesizerSyncSetOutputWhilePaused)); 503throw new InvalidOperationException(SR.Get(SRID.DuplicatedEntry)); 524throw new InvalidOperationException(SR.Get(SRID.FileNotFound, uri.ToString())); 1143voice ??= defaultVoice ?? throw new InvalidOperationException(SR.Get(SRID.SynthesizerVoiceFailed)); 1578throw new InvalidOperationException(SR.Get(SRID.SynthesizerUnknownEvent));
Recognition\DictationGrammar.cs (1)
36throw new InvalidOperationException(SR.Get(SRID.GrammarNotLoaded));
Recognition\Grammar.cs (1)
429throw new InvalidOperationException();
Recognition\RecognizerBase.cs (17)
528throw new InvalidOperationException(SR.Get(SRID.RecognizerAlreadyRecognizing)); 532throw new InvalidOperationException(SR.Get(SRID.RecognizerNoInputSource)); 750throw new InvalidOperationException(SR.Get(SRID.RecognizerAlreadyRecognizing)); 786throw new InvalidOperationException(SR.Get(SRID.RecognizerAlreadyRecognizing)); 901exReturn = new InvalidOperationException(SR.Get(srid)); 955throw new InvalidOperationException(SR.Get(SRID.RecognizerAlreadyRecognizing)); 977throw new InvalidOperationException(SR.Get(SRID.RecognizerAlreadyRecognizing)); 1807throw new InvalidOperationException(SR.Get(SRID.SapiErrorTooManyGrammars)); 1823throw new InvalidOperationException(SR.Get(SRID.GrammarWrongRecognizer)); 1835throw new InvalidOperationException(SR.Get(SRID.GrammarNotLoaded)); 1837throw new InvalidOperationException(SR.Get(SRID.GrammarLoadingInProgress)); 1839throw new InvalidOperationException(SR.Get(SRID.GrammarLoadFailed)); 1841throw new InvalidOperationException(SR.Get(SRID.GrammarAlreadyLoaded)); 1883throw new InvalidOperationException(SR.Get(SRID.RecognizerAlreadyRecognizing)); 2624throw new InvalidOperationException(SR.Get(srid)); 2634return new InvalidOperationException(SR.Get(srid)); 2708throw new InvalidOperationException(SR.Get(SRID.RecognizerUpdateTableTooLarge));
Recognition\SpeechRecognitionEngine.cs (6)
268throw new InvalidOperationException(SR.Get(SRID.RecognizerHasNoGrammar)); 285throw new InvalidOperationException(SR.Get(SRID.RecognizerHasNoGrammar)); 340throw new InvalidOperationException(SR.Get(SRID.RecognizerHasNoGrammar)); 349throw new InvalidOperationException(SR.Get(SRID.RecognizerHasNoGrammar)); 362throw new InvalidOperationException(SR.Get(SRID.RecognizerHasNoGrammar)); 371throw new InvalidOperationException(SR.Get(SRID.RecognizerHasNoGrammar));
Recognition\SpeechRecognizer.cs (6)
138throw new InvalidOperationException(SR.Get(SRID.RecognizerNotEnabled)); 149throw new InvalidOperationException(SR.Get(SRID.RecognizerNotEnabled)); 160throw new InvalidOperationException(SR.Get(SRID.RecognizerNotEnabled)); 171throw new InvalidOperationException(SR.Get(SRID.RecognizerNotEnabled)); 182throw new InvalidOperationException(SR.Get(SRID.RecognizerNotEnabled)); 193throw new InvalidOperationException(SR.Get(SRID.RecognizerNotEnabled));
Recognition\SrgsGrammar\SrgsGrammar.cs (3)
427throw new InvalidOperationException(); 473throw new InvalidOperationException(); 488throw new InvalidOperationException();
Result\RecognizedPhrase.cs (4)
485throw new InvalidOperationException(SR.Get(SRID.DupSemanticValue, ruleTree._name)); 622throw new InvalidOperationException(SR.Get(SRID.DupSemanticValue, semanticValue.KeyName)); 641throw new InvalidOperationException(SR.Get(SRID.DupSemanticKey, propertyName, semanticValue.KeyName)); 805throw new InvalidOperationException(error);
Result\SemanticValue.cs (1)
94set { throw new InvalidOperationException(SR.Get(SRID.CollectionReadOnly)); }
Synthesis\PromptBuilder.cs (6)
257throw new InvalidOperationException(SR.Get(SRID.PromptBuilderMismatchStyle)); 345throw new InvalidOperationException(SR.Get(SRID.PromptBuilderMismatchVoice)); 384throw new InvalidOperationException(SR.Get(SRID.PromptBuilderMismatchParagraph)); 421throw new InvalidOperationException(SR.Get(SRID.PromptBuilderMismatchSentence)); 809throw new InvalidOperationException(sMsg); 958throw new InvalidOperationException(string.Format(CultureInfo.InvariantCulture, SR.Get(SRID.PromptBuilderInvalidElement), currentElement.ToString(), stackElement._state.ToString()));
Synthesis\SpeechSynthesizer.cs (2)
82throw new InvalidOperationException(SR.Get(SRID.SynthesizerSetVoiceNoMatch)); 128throw new InvalidOperationException(SR.Get(SRID.SynthesizerSyncSpeakWhilePaused));
System.Text.Encoding.CodePages (1)
System\Text\BaseCodePageEncoding.cs (1)
240throw new InvalidOperationException();
System.Text.Json (121)
System\Text\Json\Document\JsonElement.cs (1)
1709throw 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)
309static void Throw() => throw new InvalidOperationException();
System\Text\Json\Serialization\Converters\Collection\IAsyncEnumerableOfTConverter.cs (1)
106throw new InvalidOperationException("Invalid async enumerator state.");
System\Text\Json\Serialization\Converters\FSharp\FSharpUnionConverter.cs (4)
90throw new InvalidOperationException(SR.Format(SR.FSharpUnionFieldConflictsWithDiscriminator, typeof(T), fields[i].FieldName, typeDiscriminatorPropertyName)); 126throw new InvalidOperationException(SR.Format(SR.FSharpUnionDuplicateCaseName, typeof(T), discriminatorName)); 131throw new InvalidOperationException(SR.Format(SR.FSharpUnionDuplicateCaseName, typeof(T), discriminatorName)); 503throw new InvalidOperationException(SR.Format(SR.FSharpUnionDuplicateFieldName, declaringType, caseName, fields[i].FieldName));
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)
114throw new InvalidOperationException(); 121throw 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 (3)
509throw new InvalidOperationException(); 697=> throw new InvalidOperationException(); 700=> throw new InvalidOperationException();
System\Text\Json\Serialization\JsonSerializerOptions.cs (2)
410throw new InvalidOperationException(SR.DefaultIgnoreConditionAlreadySpecified); 445throw new InvalidOperationException(SR.DefaultIgnoreConditionAlreadySpecified);
System\Text\Json\Serialization\Metadata\JsonMetadataServices.Converters.cs (1)
326throw new InvalidOperationException(SR.Format(SR.SerializationConverterNotCompatible, typedConverter, typeof(T)));
System\Text\Json\Serialization\Metadata\JsonMetadataServices.cs (1)
43throw new InvalidOperationException(SR.Format(SR.FieldCannotBeVirtual, nameof(propertyInfo.IsProperty), nameof(propertyInfo.IsVirtual)));
System\Text\Json\Serialization\Metadata\JsonTypeInfo.cs (1)
1781throw new InvalidOperationException();
System\Text\Json\Serialization\Metadata\ReflectionEmitMemberAccessor.cs (2)
297_ => throw new InvalidOperationException() 324_ => throw new InvalidOperationException()
System\Text\Json\Serialization\Metadata\ReflectionMemberAccessor.cs (1)
106throw 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 (69)
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)); 241throw new InvalidOperationException(SR.Format(SR.SerializationConverterOnAttributeOpenGenericNotCompatible, location, converterType)); 251throw new InvalidOperationException(message); 257throw new InvalidOperationException(SR.DefaultTypeInfoResolverImmutable); 263throw new InvalidOperationException(SR.TypeInfoResolverChainImmutable); 269throw new InvalidOperationException(SR.TypeInfoImmutable); 275throw new InvalidOperationException(SR.SerializerOptions_InvalidChainedResolver); 281throw new InvalidOperationException(SR.Format(SR.SerializerPropertyNameConflict, type, propertyName)); 287throw new InvalidOperationException(SR.Format(SR.SerializerPropertyNameNull, jsonPropertyInfo.DeclaringType, jsonPropertyInfo.MemberName)); 293throw new InvalidOperationException(SR.Format(SR.JsonPropertyRequiredAndNotDeserializable, jsonPropertyInfo.Name, jsonPropertyInfo.DeclaringType)); 299throw new InvalidOperationException(SR.Format(SR.JsonPropertyRequiredAndExtensionData, jsonPropertyInfo.Name, jsonPropertyInfo.DeclaringType)); 391throw new InvalidOperationException(SR.Format(SR.NamingPolicyReturnNull, namingPolicy)); 397throw new InvalidOperationException(SR.Format(SR.SerializerConverterFactoryReturnsNull, converterType)); 403throw new InvalidOperationException(SR.Format(SR.SerializerConverterFactoryReturnsJsonConverterFactory, converterType)); 413throw new InvalidOperationException( 425throw new InvalidOperationException(SR.Format(SR.ConstructorParamIncompleteBinding, parentType)); 431throw new InvalidOperationException(SR.Format(SR.ExtensionDataCannotBindToCtorParam, propertyName, jsonPropertyInfo.DeclaringType)); 437throw new InvalidOperationException(SR.Format(SR.JsonIncludeOnInaccessibleProperty, memberName, declaringType)); 443throw new InvalidOperationException(SR.Format(SR.IgnoreConditionOnValueTypeInvalid, clrPropertyName, propertyDeclaringType)); 450throw new InvalidOperationException(SR.Format(SR.NumberHandlingOnPropertyInvalid, jsonPropertyInfo.MemberName, jsonPropertyInfo.DeclaringType)); 456throw new InvalidOperationException(SR.Format(SR.ConverterCanConvertMultipleTypes, jsonConverter.GetType(), jsonConverter.Type, runtimePropertyType)); 476throw new InvalidOperationException(SR.Format(SR.InvalidJsonTypeInfoOperationForKind, kind)); 482throw new InvalidOperationException(SR.Format(SR.OnDeserializingCallbacksNotSupported, type)); 488throw new InvalidOperationException(SR.Format(SR.CreateObjectConverterNotCompatible, type)); 591throw new InvalidOperationException(SR.Format(SR.SerializationDuplicateAttribute, attribute, location)); 597throw new InvalidOperationException(SR.Format(SR.SerializationDuplicateTypeAttribute, classType, attribute)); 603throw new InvalidOperationException(SR.Format(SR.SerializationDuplicateTypeAttribute, classType, typeof(TAttribute))); 609throw new InvalidOperationException(SR.Format(SR.ExtensionDataConflictsWithUnmappedMemberHandling, classType, jsonPropertyInfo.MemberName)); 615throw new InvalidOperationException(SR.Format(SR.SerializationDataExtensionPropertyInvalid, jsonPropertyInfo.PropertyType, jsonPropertyInfo.MemberName)); 621throw new InvalidOperationException(SR.Format(SR.PropertyTypeNotNullable, jsonPropertyInfo.PropertyType)); 627throw new InvalidOperationException(SR.NodeJsonObjectCustomConverterNotAllowedOnExtensionProperty); 848throw new InvalidOperationException(SR.Format(SR.MetadataReferenceOfTypeCannotBeAssignedToType, referenceId, currentType, typeToConvert)); 855throw new InvalidOperationException(SR.Format(SR.JsonPropertyInfoBoundToDifferentParent, propertyInfo.Name, propertyInfo.DeclaringTypeInfo.Type.FullName)); 896throw new InvalidOperationException(SR.Format(SR.NoMetadataForType, type, resolver?.ToString() ?? "<null>")); 901return new InvalidOperationException(SR.Format(SR.NoMetadataForTypeProperties, resolver?.ToString() ?? "<null>", type)); 943throw new InvalidOperationException(SR.Format(SR.Polymorphism_TypeDoesNotSupportPolymorphism, baseType)); 949throw new InvalidOperationException(SR.Format(SR.Polymorphism_DerivedTypeIsNotSupported, derivedType, baseType)); 955throw new InvalidOperationException(SR.Format(SR.Polymorphism_DerivedTypeIsAlreadySpecified, baseType, derivedType)); 961throw new InvalidOperationException(SR.Format(SR.Polymorphism_OpenGenericDerivedTypeCouldNotBeResolved, derivedType, baseType, reason)); 967throw new InvalidOperationException(SR.Format(SR.Polymorphism_TypeDicriminatorIdIsAlreadySpecified, baseType, typeDiscriminator)); 973throw new InvalidOperationException(SR.Format(SR.Polymorphism_InferredDerivedTypeIsNotAccessible, derivedType, baseType)); 979throw new InvalidOperationException(SR.Format(SR.Polymorphism_InferClosedTypePolymorphismOnNonClosedType, baseType)); 985throw new InvalidOperationException(SR.Polymorphism_InvalidCustomTypeDiscriminatorPropertyName); 991throw new InvalidOperationException(SR.Format(SR.Polymorphism_PropertyConflictsWithMetadataPropertyName, type, propertyName)); 997throw new InvalidOperationException(SR.Format(SR.Polymorphism_ConfigurationDoesNotSpecifyDerivedTypes, baseType)); 1045throw new InvalidOperationException(SR.Format(SR.UnionCasesNotPopulated, unionType)); 1051throw new InvalidOperationException(SR.Format(SR.UnionCannotCreateValue, unionType)); 1057throw new InvalidOperationException(SR.Format(SR.UnionCannotReadValue, unionType)); 1063throw new InvalidOperationException(SR.Format(SR.UnionTypeStructuralClassifierOnlyForUnions, unionType)); 1120throw new InvalidOperationException(SR.Format(SR.TypeClassifierMustDeriveFromJsonTypeClassifierFactory, classifierType, type)); 1126throw new InvalidOperationException(SR.Format(SR.TypeClassifierNotSupported, classifierType, type)); 1132throw new InvalidOperationException(SR.Format(SR.UnsupportedEnumIdentifier, enumType.Name, enumName)); 1162throw new InvalidOperationException(SR.Format(SR.PipeWriter_DoesNotImplementUnflushedBytes, pipeWriter.GetType().Name)); 1174throw new InvalidOperationException(SR.JsonSchemaExporter_DepthTooLarge);
System.Text.Json.SourceGeneration (4)
JsonSourceGenerator.Emitter.cs (1)
2389_ => throw new InvalidOperationException(),
JsonSourceGenerator.Parser.cs (2)
585throw new InvalidOperationException(); 650throw new InvalidOperationException();
src\runtime\src\libraries\Common\src\Roslyn\GetBestTypeByMetadataName.cs (1)
184_ => throw new InvalidOperationException("Unreachable"),
System.Text.RegularExpressions (5)
System\Text\RegularExpressions\CaptureCollection.cs (1)
301throw new InvalidOperationException(SR.EnumNotStarted);
System\Text\RegularExpressions\GroupCollection.cs (2)
422throw new InvalidOperationException(SR.EnumNotStarted); 435throw new InvalidOperationException(SR.EnumNotStarted);
System\Text\RegularExpressions\MatchCollection.cs (1)
389throw new InvalidOperationException(SR.EnumNotStarted);
System\Text\RegularExpressions\RegexAssemblyCompiler.cs (1)
40throw new InvalidOperationException("DefinePersistedAssembly returned null");
System.Text.RegularExpressions.Generator (1)
src\runtime\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); 430throw new InvalidOperationException(SR.Barrier_InvalidOperation_CalledFromPHA); 449throw new InvalidOperationException(SR.Barrier_RemoveParticipants_InvalidOperation); 655throw new InvalidOperationException(SR.Barrier_InvalidOperation_CalledFromPHA); 674throw new InvalidOperationException(SR.Barrier_SignalAndWait_InvalidOperation_ZeroTotal); 680throw new InvalidOperationException(SR.Barrier_SignalAndWait_InvalidOperation_ThreadsExceeded); 929throw 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)
421if (_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)
1948throw new InvalidOperationException(SR.Parallel_ForEach_OrderedPartitionerKeysNotNormalized); 2106throw new InvalidOperationException(SR.Parallel_ForEach_OrderedPartitionerKeysNotNormalized); 2310throw new InvalidOperationException(SR.Parallel_ForEach_OrderedPartitionerKeysNotNormalized); 2494throw new InvalidOperationException(SR.Parallel_ForEach_OrderedPartitionerKeysNotNormalized); 2524throw new InvalidOperationException(SR.Parallel_ForEach_PartitionerNotDynamic); 2571throw new InvalidOperationException(SR.Parallel_ForEach_PartitionerReturnedNull); 2579throw new InvalidOperationException(SR.Parallel_ForEach_PartitionerReturnedNull); 2638throw new InvalidOperationException(SR.Parallel_ForEach_NullEnumerator); 2684throw 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 (47)
System\Transactions\DtcProxyShim\EnlistmentNotifyShim.cs (1)
42throw new InvalidOperationException("Unexpected null in pEnlistmentAsync");
System\Transactions\InternalTransaction.cs (1)
216throw new InvalidOperationException(SR.PromoterTypeInvalid);
System\Transactions\Oletx\OletxTransactionManager.cs (2)
500throw new InvalidOperationException(SR.ReenlistAfterRecoveryComplete); 515throw new InvalidOperationException(SR.DuplicateRecoveryComplete);
System\Transactions\Oletx\OletxVolatileEnlistment.cs (24)
340throw new InvalidOperationException(SR.InternalError); 372throw new InvalidOperationException(SR.InternalError); 404throw new InvalidOperationException(SR.InternalError); 500throw new InvalidOperationException(SR.InternalError); 524throw new InvalidOperationException(SR.InternalError); 843throw new InvalidOperationException(SR.InternalError); 873throw new InvalidOperationException(SR.InternalError); 903throw new InvalidOperationException(SR.InternalError); 970throw new InvalidOperationException(SR.InternalError); 1076throw new InvalidOperationException(SR.InternalError); 1111throw new InvalidOperationException(SR.InternalError); 1157throw new InvalidOperationException(SR.InternalError); 1173throw new InvalidOperationException(SR.InternalError); 1240throw new InvalidOperationException(SR.InternalError); 1292throw new InvalidOperationException(SR.InternalError); 1308throw new InvalidOperationException(SR.InternalError); 1388throw new InvalidOperationException(SR.InternalError); 1423throw new InvalidOperationException(SR.InternalError); 1464throw new InvalidOperationException(SR.InternalError); 1481void IPromotedEnlistment.Committed() => throw new InvalidOperationException(); 1482void IPromotedEnlistment.Aborted() => throw new InvalidOperationException(); 1483void IPromotedEnlistment.Aborted(Exception? e) => throw new InvalidOperationException(); 1484void IPromotedEnlistment.InDoubt() => throw new InvalidOperationException(); 1485void IPromotedEnlistment.InDoubt(Exception? e) => throw new InvalidOperationException();
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 (2)
127throw new InvalidOperationException(SR.CurrentDelegateSet); 402throw new InvalidOperationException(SR.ImplicitDistributedTransactionsCannotBeChanged);
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(); 4333throw 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); 1445throw new InvalidOperationException(Microsoft.Windows.Controls.SR.Ribbon_ContextualTabHeadersSourceInvalid); 1455throw 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.Extensions (11)
System\Media\SoundPlayer.cs (11)
557throw new InvalidOperationException(SR.Format(SR.SoundAPIInvalidWaveFile, _soundLocation)); 564throw new InvalidOperationException(SR.SoundAPIInvalidWaveHeader); 581throw new InvalidOperationException(SR.Format(SR.SoundAPIReadError, _soundLocation)); 599throw new InvalidOperationException(SR.SoundAPIInvalidWaveHeader); 605throw new InvalidOperationException(SR.SoundAPIFormatNotSupported); 625throw new InvalidOperationException(SR.SoundAPIInvalidWaveHeader); 652throw new InvalidOperationException(SR.SoundAPIInvalidWaveHeader); 659throw new InvalidOperationException(SR.SoundAPIInvalidWaveHeader); 666throw new InvalidOperationException(SR.SoundAPIInvalidWaveHeader); 680throw new InvalidOperationException(SR.SoundAPIInvalidWaveHeader); 687throw new InvalidOperationException(SR.SoundAPIFormatNotSupported);
System.Windows.Forms (601)
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)
1840throw new InvalidOperationException(SR.AXOcxStateLoaded); 2775throw new InvalidOperationException(SR.UnableToInitComponent); 2842throw new InvalidOperationException(SR.UnableToInitComponent);
System\Windows\Forms\ActiveX\AxHost.OleInterfaces.cs (1)
320throw new InvalidOperationException(SR.AXWindowlessControl);
System\Windows\Forms\Application.cs (3)
743throw new InvalidOperationException(SR.Application_VisualStylesModeCanOnlyBeSetOnce); 1529throw new InvalidOperationException(string.Format(SR.Win32WindowAlreadyCreated, nameof(SetCompatibleTextRenderingDefault))); 1558throw 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\Components\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\Components\ImageList\ImageList.ImageCollection.cs (2)
173throw new InvalidOperationException(SR.ImageListReplaceFailed); 550throw new InvalidOperationException(SR.ImageListRemoveFailed);
System\Windows\Forms\Components\ImageList\ImageList.NativeImageList.cs (2)
59throw new InvalidOperationException(SR.ImageListCreateFailed); 109throw new InvalidOperationException(SR.ImageListDuplicateFailed);
System\Windows\Forms\Components\ImageList\ImageList.Original.cs (1)
34throw new InvalidOperationException(SR.ImageListEntryType);
System\Windows\Forms\Components\ImageList\ImageListStreamer.cs (3)
82throw new InvalidOperationException(SR.ImageListStreamerLoadFailed); 94throw new InvalidOperationException(SR.ImageListStreamerSaveFailed); 105throw new InvalidOperationException(SR.ImageListStreamerSaveFailed);
System\Windows\Forms\Control_InvokeAsync.cs (4)
56throw new InvalidOperationException(SR.ErrorNoMarshalingThread); 181throw new InvalidOperationException(SR.ErrorNoMarshalingThread); 282throw new InvalidOperationException(SR.ErrorNoMarshalingThread); 387throw new InvalidOperationException(SR.ErrorNoMarshalingThread);
System\Windows\Forms\Control.cs (10)
2386throw new InvalidOperationException(string.Format(SR.IllegalCrossThreadCall, Name)); 5017throw new InvalidOperationException(string.Format(SR.ClosingWhileCreatingHandle, "Dispose")); 5119throw new InvalidOperationException(string.Format(SR.ClipboardOrDragDrop_CannotJsonSerializeDataObject, nameof(DoDragDrop))); 5909Control? parent = ctl._parent ?? throw new InvalidOperationException( 5912ControlCollection? siblings = parent.ChildControls ?? throw new InvalidOperationException( 5919throw new InvalidOperationException(string.Format( 6719throw new InvalidOperationException(SR.ErrorNoMarshalingThread); 10322throw new InvalidOperationException(SR.DragDropRegFailed, e); 11107throw new InvalidOperationException(SR.TopLevelNotAllowedIfActiveX); 12085throw 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)
2950throw 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); 1658throw new InvalidOperationException(SR.DataGridView_ColumnHeadersCannotBeInvisible); 1734throw new InvalidOperationException(SR.DataGridView_CellChangeCannotBeCommittedOrAborted); 1746throw new InvalidOperationException(SR.DataGridView_CurrentCellCannotBeInvisible); 1751throw new InvalidOperationException(SR.DataGridView_CellChangeCannotBeCommittedOrAborted); 1767throw new InvalidOperationException(SR.DataGridView_CellChangeCannotBeCommittedOrAborted); 2305throw new InvalidOperationException(SR.DataGridView_FirstDisplayedCellCannotBeAHeaderOrSharedCell); 2315throw new InvalidOperationException(SR.DataGridView_FirstDisplayedCellCannotBeInvisible); 2456throw new InvalidOperationException(SR.DataGridView_FirstDisplayedScrollingColumnCannotBeInvisible); 2461throw new InvalidOperationException(SR.DataGridView_FirstDisplayedScrollingColumnCannotBeFrozen); 2472throw new InvalidOperationException(SR.DataGridView_NoRoomForDisplayedColumns); 2479throw new InvalidOperationException(SR.DataGridView_FrozenColumnsPreventFirstDisplayedScrollingColumn); 2536throw new InvalidOperationException(SR.DataGridView_FirstDisplayedScrollingRowCannotBeInvisible); 2541throw new InvalidOperationException(SR.DataGridView_FirstDisplayedScrollingRowCannotBeFrozen); 2552throw new InvalidOperationException(SR.DataGridView_NoRoomForDisplayedRows); 2559throw new InvalidOperationException(SR.DataGridView_FrozenRowsPreventFirstDisplayedScrollingRow); 3085throw new InvalidOperationException(SR.DataGridView_CommitFailedCannotCompleteOperation); 3150throw new InvalidOperationException(SR.DataGridView_CellChangeCannotBeCommittedOrAborted); 3184throw new InvalidOperationException(SR.DataGridView_CannotSetRowCountOnDataBoundDataGridView); 3353throw new InvalidOperationException(SR.DataGridView_RowHeadersCannotBeInvisible); 3549throw new InvalidOperationException(SR.DataGridView_RowAlreadyBelongsToDataGridView); 3602throw new InvalidOperationException(SR.DataGridView_CellChangeCannotBeCommittedOrAborted); 3759throw new InvalidOperationException(string.Format(SR.DataGridView_SelectionModeAndSortModeClash, (value).ToString())); 4938throw new InvalidOperationException(SR.DataGridViewBeginInit); 4967throw 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); 4193throw new InvalidOperationException(SR.DataGridView_AColumnHasNoCellTemplate); 5025throw new InvalidOperationException(SR.DataGridView_CannotAddFrozenColumn); 5039throw new InvalidOperationException(SR.DataGridView_CannotAddNonFrozenColumn); 5164throw new InvalidOperationException(SR.DataGridView_CannotMoveNonFrozenColumn); 5183throw new InvalidOperationException(SR.DataGridView_CannotMoveFrozenColumn); 5231throw new InvalidOperationException(SR.DataGridView_CannotAddFrozenRow); 5244throw new InvalidOperationException(SR.DataGridView_CannotAddNonFrozenRow); 5273throw new InvalidOperationException(SR.DataGridView_CannotAddFrozenRow); 5279throw new InvalidOperationException(SR.DataGridView_CannotAddNonFrozenRow); 10738throw new InvalidOperationException(SR.DataGridView_ColumnAlreadyBelongsToDataGridView); 10745throw new InvalidOperationException(string.Format(SR.DataGridViewColumn_SortModeAndSelectionModeClash, DataGridViewColumnSortMode.Automatic.ToString(), SelectionMode.ToString())); 10758throw new InvalidOperationException(SR.DataGridView_CannotAddAutoSizedColumn); 10767throw new InvalidOperationException(SR.DataGridView_CannotAddAutoFillColumn); 10778throw new InvalidOperationException(string.Format(SR.DataGridView_WeightSumCannotExceedLongMaxValue, ushort.MaxValue)); 10790throw new InvalidOperationException(SR.DataGridView_CannotAddUntypedColumn); 10857throw new InvalidOperationException(SR.DataGridView_AtLeastOneColumnIsNull); 10862throw new InvalidOperationException(SR.DataGridView_ColumnAlreadyBelongsToDataGridView); 10868throw new InvalidOperationException(SR.DataGridView_CannotAddUntypedColumn); 10875throw new InvalidOperationException(string.Format( 10891throw new InvalidOperationException(SR.DataGridView_CannotAddAutoSizedColumn); 10900throw new InvalidOperationException(SR.DataGridView_CannotAddAutoFillColumn); 10910throw new InvalidOperationException(string.Format(SR.DataGridView_WeightSumCannotExceedLongMaxValue, ushort.MaxValue)); 10924throw new InvalidOperationException(SR.DataGridView_CannotAddIdenticalColumns); 11038throw new InvalidOperationException(SR.DataGridView_AtLeastOneRowIsNull); 11043throw new InvalidOperationException(SR.DataGridView_RowAlreadyBelongsToDataGridView); 11048throw new InvalidOperationException(SR.DataGridViewRowCollection_CannotAddOrInsertSelectedRow); 11053throw new InvalidOperationException(SR.DataGridViewRowCollection_TooManyCells); 11065throw new InvalidOperationException(SR.DataGridView_CannotAddIdenticalRows); 11159?? throw new InvalidOperationException(string.Format(SR.InvalidNullArgument, "e.Column")); 11439throw new InvalidOperationException(SR.DataGridView_CannotAlterAutoFillColumnParameter); 13368throw new InvalidOperationException(SR.DataGridView_CannotAlterDisplayIndexWithinAdjustments); 13521throw new InvalidOperationException(SR.DataGridView_CannotAlterAutoFillColumnParameter); 13528throw new InvalidOperationException(string.Format(SR.DataGridView_WeightSumCannotExceedLongMaxValue, ushort.MaxValue)); 14710throw new InvalidOperationException(SR.DataGridView_CannotMakeAutoSizedColumnVisible); 14762throw new InvalidOperationException(SR.DataGridView_CommitFailedCannotCompleteOperation); 14793throw new InvalidOperationException(SR.DataGridView_CurrencyManagerRowCannotBeInvisible); 14824throw new InvalidOperationException(SR.DataGridView_CommitFailedCannotCompleteOperation); 14865throw new InvalidOperationException(SR.DataGridView_CommitFailedCannotCompleteOperation); 15368throw new InvalidOperationException(SR.DataGridView_ColumnAlreadyBelongsToDataGridView); 15375throw new InvalidOperationException(string.Format( 15391throw new InvalidOperationException(SR.DataGridView_CannotAddAutoSizedColumn); 15400throw new InvalidOperationException(SR.DataGridView_CannotAddAutoFillColumn); 15425throw new InvalidOperationException(SR.DataGridView_CannotAddUntypedColumn); 19706throw new InvalidOperationException(SR.DataGridView_CannotAlterAutoFillColumnParameter); 19845throw new InvalidOperationException(); 19885throw new InvalidOperationException(); 26471throw new InvalidOperationException(); 26765throw new InvalidOperationException(SR.DataGridView_CurrentCellCannotBeInvisible); 26771throw new InvalidOperationException(SR.DataGridView_SetCurrentCellAddressCoreNotReentrant); 27734throw new InvalidOperationException(SR.DataGridView_CurrentCellCannotBeInvisible); 28172throw new InvalidOperationException(SR.DataGridView_OperationDisabledInVirtualMode); 28184throw new InvalidOperationException(SR.DataGridView_OperationDisabledInVirtualMode); 28190throw new InvalidOperationException(SR.DataGridView_CannotUseAComparerToSortDataGridViewWhenDataBound); 28200throw new InvalidOperationException(SR.DataGridView_CannotSortDataBoundDataGridViewBoundToNonIBindingList); 28205throw new InvalidOperationException(SR.DataGridView_IBindingListNeedsToSupportSorting); 30114throw 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)
407throw new InvalidOperationException(string.Format(SR.DataGridView_InvalidPropertySetOnSharedRow, nameof(ReadOnly))); 538throw new InvalidOperationException(string.Format(SR.DataGridView_InvalidPropertySetOnSharedRow, nameof(Selected))); 558throw new InvalidOperationException(SR.DataGridViewBand_CannotSelect); 686throw 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)
394throw new InvalidOperationException(SR.DataGridView_InvalidOperationOnSharedCell); 448throw new InvalidOperationException(SR.DataGridView_InvalidOperationOnSharedCell); 466throw new InvalidOperationException(SR.DataGridViewCell_CannotSetReadOnlyState); 550throw new InvalidOperationException(SR.DataGridView_InvalidOperationOnSharedCell); 559throw new InvalidOperationException(SR.DataGridViewCell_CannotSetSelectedState); 1043throw new InvalidOperationException(); 1721throw new InvalidOperationException(); 1863throw new InvalidOperationException(SR.DataGridView_CellNeedsDataGridViewForInheritedStyle); 1871throw new InvalidOperationException(); 2346throw new InvalidOperationException(string.Format(SR.DataGridView_InvalidPropertyGetOnSharedCell, "Size")); 2409throw new InvalidOperationException(); 2455throw new InvalidOperationException(); 3783throw 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\Labels\LinkLabel.cs (2)
1682throw new InvalidOperationException(SR.LinkLabelOverlap); 1694throw 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)
375throw 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)
1716throw new InvalidOperationException(SR.ListViewGetTopItem); 1731throw new InvalidOperationException(SR.ListViewSetTopItem); 1927throw new InvalidOperationException(SR.ListViewVirtualListViewRequiresNoItems); 1932throw new InvalidOperationException(SR.ListViewVirtualListViewRequiresNoCheckedItems); 1937throw new InvalidOperationException(SR.ListViewVirtualListViewRequiresNoSelectedItems); 3226throw new InvalidOperationException(SR.ListViewFindNearestItemWorksOnlyInIconView); 3837throw new InvalidOperationException(SR.ListViewAddColumnFailed); 4215throw new InvalidOperationException(SR.ListViewAddItemFailed); 5297throw new InvalidOperationException(SR.ListViewColumnInfoSet); 5592throw new InvalidOperationException(SR.ListViewSortNotAllowedInVirtualListView); 6830ListViewItem lvItem = rVI.Item ?? throw new InvalidOperationException(SR.ListViewVirtualItemRequired); 6844throw 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)
800throw new InvalidOperationException(SR.InvalidSingleMonthSize); 1742throw new InvalidOperationException(
System\Windows\Forms\Controls\PictureBox\PictureBox.cs (2)
461throw new InvalidOperationException(SR.PictureBoxNoImageLocation); 521throw new InvalidOperationException(SR.PictureBoxNoImageLocation);
System\Windows\Forms\Controls\ProgressBar\ProgressBar.cs (2)
581throw new InvalidOperationException(SR.ProgressBarIncrementMarqueeException); 652throw 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)
1669throw new InvalidOperationException("PERF REGRESSION - Creating item in grid view create"); 2034throw new InvalidOperationException(); 2135throw new InvalidOperationException(); 2474throw new InvalidOperationException(); 2521throw 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)
1510throw new InvalidOperationException(); 1676throw new InvalidOperationException(); 1788throw 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)
3016throw new InvalidOperationException(SR.LoadTextError); 3107throw 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)
717throw 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)
1400return _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)
217throw new InvalidOperationException(string.Format(SR.IllegalCrossThreadCall, nameof(TaskDialog))); 408?? throw new InvalidOperationException(SR.FormOrTaskDialog_NoSyncContextForShowAsync); 553throw new InvalidOperationException(string.Format(SR.TaskDialogInstanceAlreadyShown, nameof(TaskDialog))); 615throw 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(); 739throw new InvalidOperationException(); 758throw new InvalidOperationException(string.Format( 769throw new InvalidOperationException(string.Format( 782throw new InvalidOperationException(string.Format( 795throw new InvalidOperationException(SR.TaskDialogTooManyButtonsAdded); 800throw new InvalidOperationException(SR.TaskDialogOnlySingleRadioButtonCanBeChecked); 820throw new InvalidOperationException(SR.TaskDialogCannotShowCustomButtonsAndCommandLinks); 828throw new InvalidOperationException(SR.TaskDialogButtonTextMustNotBeNull); 833throw new InvalidOperationException(SR.TaskDialogRadioButtonTextMustNotBeNull); 839throw new InvalidOperationException(SR.TaskDialogDefaultButtonMustExistInCollection); 856throw new InvalidOperationException(); 977throw new InvalidOperationException(); 1012throw 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)
1771throw new InvalidOperationException(SR.FormScreenCaptureModeRequiresTopLevel); 3248throw new InvalidOperationException(string.Format(SR.ClosingWhileCreatingHandle, "Close")); 5139throw new InvalidOperationException(SR.TooManyResumeUpdateMenuHandles); 5479throw new InvalidOperationException(string.Format(SR.OwnsSelfOrOwner, nameof(Show))); 5484throw new InvalidOperationException(string.Format(SR.ShowDialogOnVisible, nameof(Show))); 5489throw new InvalidOperationException(string.Format(SR.ShowDialogOnDisabled, nameof(Show))); 5494throw new InvalidOperationException(string.Format(SR.ShowDialogOnNonTopLevel, nameof(Show))); 5499throw new InvalidOperationException(SR.CantShowModalOnNonInteractive); 5639throw new InvalidOperationException(SR.Form_HasAlreadyBeenShownAsync); 5653?? throw new InvalidOperationException(SR.FormOrTaskDialog_NoSyncContextForShowAsync); 5705throw new InvalidOperationException(string.Format(SR.ShowDialogOnVisible, nameof(ShowDialog))); 5710throw new InvalidOperationException(string.Format(SR.ShowDialogOnDisabled, nameof(ShowDialog))); 5715throw new InvalidOperationException(string.Format(SR.ShowDialogOnNonTopLevel, nameof(ShowDialog))); 5720throw new InvalidOperationException(string.Format(SR.ShowDialogOnModal, nameof(ShowDialog))); 5725throw new InvalidOperationException(SR.CantShowModalOnNonInteractive); 5939throw new InvalidOperationException(SR.Form_HasAlreadyBeenShownAsync); 5953?? 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)
295throw new InvalidOperationException(SR.ErrorSettingWindowRegion); 300throw new InvalidOperationException(SR.ErrorSettingWindowRegion); 305throw 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)
857throw 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\SuspendPaintingScope.cs (1)
160?? throw new InvalidOperationException(SR.ControlMutationExtensionsLayoutSuspensionRequiresControl);
System\Windows\Forms\ToolTip\ToolTip.cs (1)
843throw 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(); 201throw 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)
911throw 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)
667?? throw new InvalidOperationException(string.Format(
System\ComponentModel\Design\DesignerHost.cs (12)
187throw new InvalidOperationException(SR.DesignerHostUnloading) 196throw new InvalidOperationException(string.Format( 248throw new InvalidOperationException(string.Format(SR.DesignerHostNoTopLevelDesigner, component.GetType().FullName)) 273throw new InvalidOperationException(SR.DesignerHostDesignerNeedsComponent); 306throw new InvalidOperationException(SR.DesignerHostLoaderSpecified) 348e = new InvalidOperationException(string.Format(SR.DesignSurfaceFatalError, e), e); 421throw new InvalidOperationException(SR.DesignSurfaceContainerDispose); 945throw new InvalidOperationException(); 957throw new InvalidOperationException(string.Format(SR.DesignerHostFailedComponentCreate, componentType.Name)) 996throw new InvalidOperationException(string.Format(SR.DesignerHostCantDestroyInheritedComponent, name)) 1060new InvalidOperationException(SR.DesignerHostNoBaseClass) 1091?? 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) 596typeResolutionService = TypeResolutionService ?? throw 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)
189throw 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)
386throw new InvalidOperationException(SR.DataGridViewDataSourceNoLongerValid, ex); 563throw 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)
918throw new InvalidOperationException(); 1060throw new InvalidOperationException(SR.DesignerBeginDragNotCalled); 1106throw new InvalidOperationException(); 1223throw new InvalidOperationException();
System\Windows\Forms\Design\VsPropertyGrid.cs (1)
24BitmapSelector.GetResourceStream(typeof(PropertyGrid), resourceName) ?? throw new InvalidOperationException(),
System.Windows.Forms.Primitives (6)
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\Animation\HighPrecisionTimer.cs (1)
102?? throw new InvalidOperationException(
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.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\wpf\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\wpf\src\Microsoft.DotNet.Wpf\src\Shared\MS\Utility\FrugalList.cs (2)
1789throw new InvalidOperationException(SR.FrugalList_CannotPromoteBeyondArray); 2169throw new InvalidOperationException(SR.FrugalList_CannotPromoteBeyondArray);
src\wpf\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"));
testhost (2)
src\vstest\src\Microsoft.TestPlatform.Execution.Shared\DebuggerBreakpoint.cs (2)
83throw new InvalidOperationException($"Cannot find AttachVS.exe tool."); 88throw new InvalidOperationException($"Cannot start tool, path {vsAttachPath} does not exist.");
testhost.arm64 (2)
src\vstest\src\Microsoft.TestPlatform.Execution.Shared\DebuggerBreakpoint.cs (2)
83throw new InvalidOperationException($"Cannot find AttachVS.exe tool."); 88throw new InvalidOperationException($"Cannot start tool, path {vsAttachPath} does not exist.");
testhost.x86 (2)
src\vstest\src\Microsoft.TestPlatform.Execution.Shared\DebuggerBreakpoint.cs (2)
83throw new InvalidOperationException($"Cannot find AttachVS.exe tool."); 88throw new InvalidOperationException($"Cannot start tool, path {vsAttachPath} does not exist.");
TestingAppHost1.AppHost (8)
Program.cs (4)
82throw new InvalidOperationException("Crashing: before-build."); 89throw new InvalidOperationException("Crashing: after-build."); 107throw new InvalidOperationException("Crashing: after-start."); 114throw new InvalidOperationException("Crashing after-shutdown.");
TestingAppHostEntryPointProbe.cs (4)
19throw new InvalidOperationException($"Could not create entry-point probe '{id}'."); 38throw new InvalidOperationException($"Entry-point probe '{id}' was not registered."); 52throw new InvalidOperationException($"Could not create entry-point breakpoint probe '{id}'."); 71throw new InvalidOperationException($"Entry-point breakpoint probe '{id}' was not registered.");
TypeScriptApiCompat (2)
AtsSurface.cs (2)
56throw new InvalidOperationException($"Duplicate ATS surface for package '{packageName}' under '{rootPath}'."); 72throw new InvalidOperationException($"ATS surface file '{filePath}' does not end with '{suffix}'.");
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\roslyn\src\Compilers\Shared\BuildProtocol.cs (1)
356throw new InvalidOperationException("Received invalid response type from server.");
src\roslyn\src\Compilers\Shared\BuildServerConnection.cs (3)
823throw new InvalidOperationException("Unable to acquire guard"); 892throw new InvalidOperationException("Lock already held"); 1004throw new InvalidOperationException("Lock already held");
src\roslyn\src\Compilers\Shared\ConsoleUtil.cs (1)
47throw new InvalidOperationException("Utf8Output is only supported when writing to Console.Out");
VBCSCompiler (8)
src\roslyn\src\Compilers\Server\VBCSCompiler\NamedPipeClientConnectionHost.cs (3)
51throw new InvalidOperationException(); 82throw new InvalidOperationException(); 139throw new InvalidOperationException();
src\roslyn\src\Compilers\Shared\BuildProtocol.cs (1)
356throw new InvalidOperationException("Received invalid response type from server.");
src\roslyn\src\Compilers\Shared\BuildServerConnection.cs (3)
823throw new InvalidOperationException("Unable to acquire guard"); 892throw new InvalidOperationException("Lock already held"); 1004throw new InvalidOperationException("Lock already held");
src\roslyn\src\Compilers\Shared\ConsoleUtil.cs (1)
47throw new InvalidOperationException("Utf8Output is only supported when writing to Console.Out");
vstest.console (3)
Internal\ConsoleLogger.cs (1)
543throw new InvalidOperationException($"ExecutionId {executionId} already exists.");
src\vstest\src\Microsoft.TestPlatform.Execution.Shared\DebuggerBreakpoint.cs (2)
83throw new InvalidOperationException($"Cannot find AttachVS.exe tool."); 88throw new InvalidOperationException($"Cannot start tool, path {vsAttachPath} does not exist.");
vstest.console.arm64 (3)
src\vstest\src\Microsoft.TestPlatform.Execution.Shared\DebuggerBreakpoint.cs (2)
83throw new InvalidOperationException($"Cannot find AttachVS.exe tool."); 88throw new InvalidOperationException($"Cannot start tool, path {vsAttachPath} does not exist.");
src\vstest\src\vstest.console\Internal\ConsoleLogger.cs (1)
543throw new InvalidOperationException($"ExecutionId {executionId} already exists.");
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);
WithDockerfile.AppHost (2)
AppHost.cs (2)
63throw new InvalidOperationException("Container image name not found."); 77throw new InvalidOperationException("Container image name not found.");
4078 references to InvalidOperationException
aspire (68)
Agents\AspireSkills\AspireSkillsInstaller.cs (3)
262catch (Exception ex) when (ex is IOException or UnauthorizedAccessException or InvalidDataException or InvalidOperationException) 360catch (Exception ex) when (ex is IOException or UnauthorizedAccessException or InvalidDataException or InvalidOperationException) 716catch (Exception ex) when (ex is IOException or UnauthorizedAccessException or InvalidOperationException)
Agents\ClaudeCode\ClaudeCodeCliRunner.cs (1)
85catch (Exception ex) when (ex is InvalidOperationException or System.ComponentModel.Win32Exception)
Agents\CopilotCli\CopilotCliRunner.cs (1)
65catch (Exception ex) when (ex is InvalidOperationException or System.ComponentModel.Win32Exception)
Agents\McpConfigFileHelper.cs (1)
67/// <exception cref="InvalidOperationException">Thrown when the file exists but contains malformed JSON, wrapping the underlying <see cref="JsonException"/>.</exception>
Agents\OpenCode\OpenCodeCliRunner.cs (1)
78catch (Exception ex) when (ex is InvalidOperationException or System.ComponentModel.Win32Exception)
Agents\Playwright\PlaywrightCliRunner.cs (2)
73catch (Exception ex) when (ex is InvalidOperationException or System.ComponentModel.Win32Exception) 123catch (Exception ex) when (ex is InvalidOperationException or System.ComponentModel.Win32Exception)
Agents\VsCode\VsCodeCliRunner.cs (1)
89catch (Exception ex) when (ex is InvalidOperationException or System.ComponentModel.Win32Exception)
Backchannel\AppHostAuxiliaryBackchannel.cs (1)
111/// <exception cref="InvalidOperationException">Thrown if not connected to the backchannel.</exception>
Certificates\CertificateGeneration\CertificateManager.cs (2)
267/// <exception cref="InvalidOperationException">There was an error ensuring the certificate exists.</exception> 940/// <exception cref="InvalidOperationException">If a key with the specified minimum size cannot be created.</exception>
Certificates\CertificateGeneration\CertificateProcessRunner.cs (1)
43catch (Exception ex) when (ex is InvalidOperationException or NotSupportedException or System.ComponentModel.Win32Exception)
Commands\AgentInitCommand.cs (4)
230catch (InvalidOperationException ex) 431catch (InvalidOperationException ex) 449catch (InvalidOperationException ex) 746catch (Exception ex) when (ex is IOException or UnauthorizedAccessException or InvalidOperationException)
Commands\AppHostFollowDisconnectHelpers.cs (1)
46catch (InvalidOperationException)
Commands\Sdk\SdkDumpCommand.cs (1)
366catch (Exception ex) when (ex is IOException or UnauthorizedAccessException or InvalidDataException or InvalidOperationException or RemoteInvocationException or AppHostCodeGenerationException)
Configuration\AspireConfigFile.cs (1)
129/// <exception cref="InvalidOperationException">Thrown when the file exists but contains invalid JSON.</exception>
Configuration\IConfigurationService.cs (1)
28/// Throws <see cref="System.InvalidOperationException"/> if any settings file encountered
DotNet\DotNetCliRunner.cs (1)
903var ex = new InvalidOperationException(ErrorStrings.CantUseBothWatchAndNoBuild);
DotNet\DotNetSdkInstaller.cs (1)
63catch (InvalidOperationException)
DotNet\ProcessExecution.cs (2)
331catch (InvalidOperationException) 414catch (InvalidOperationException ex)
Git\GitRepository.cs (3)
81catch (Exception ex) when (ex is InvalidOperationException or System.ComponentModel.Win32Exception) 172catch (Exception ex) when (ex is InvalidOperationException or System.ComponentModel.Win32Exception) 201catch (InvalidOperationException)
Npm\NpmRunner.cs (1)
325catch (Exception ex) when (ex is InvalidOperationException or System.ComponentModel.Win32Exception)
Npm\SigstoreNpmProvenanceChecker.cs (1)
221catch (InvalidOperationException)
NuGet\BundleNuGetService.cs (1)
271catch (Exception ex) when (ex is InvalidOperationException or JsonException or IOException or UnauthorizedAccessException)
OpenCode\OpenCodeCliRunner.cs (1)
71catch (Exception ex) when (ex is InvalidOperationException or System.ComponentModel.Win32Exception)
Processes\IsolatedProcess.cs (2)
169/// override <see cref="Process.ExitCode"/> throws <see cref="InvalidOperationException"/> 467catch (Exception ex) when (ex is ArgumentException or InvalidOperationException or System.ComponentModel.Win32Exception)
Processes\ProcessTreeGracefulShutdownService.cs (1)
388catch (InvalidOperationException)
Projects\AppHostServerSession.cs (2)
156/// <exception cref="InvalidOperationException">Thrown if <see cref="StartAsync"/> has already been called.</exception> 258/// <exception cref="InvalidOperationException">Thrown if <see cref="StartAsync"/> has not been called.</exception>
Projects\GuestAppHostProject.cs (2)
733var error = new InvalidOperationException($"The {DisplayName} apphost failed."); 1226var error = new InvalidOperationException($"The {DisplayName} apphost failed.");
src\Shared\BackchannelConstants.cs (2)
423catch (InvalidOperationException) 554/// <exception cref="InvalidOperationException">Thrown when the path exceeds the platform byte limit.</exception>
src\Shared\BundleVersionLease.cs (1)
268catch (Exception ex) when (ex is InvalidOperationException or NotSupportedException or System.ComponentModel.Win32Exception)
src\Shared\IConfigurationExtensions.cs (4)
116/// <exception cref="InvalidOperationException">The configuration value could not be accessed, or contained incorrectly formatted data.</exception> 146/// <exception cref="InvalidOperationException">The configuration value could not be accessed, or contained incorrectly formatted data.</exception> 185/// <exception cref="InvalidOperationException">The configuration value is not a valid member of the enum.</exception> 213/// <exception cref="InvalidOperationException">The configuration value is empty or not a valid member of the enum.</exception>
src\Shared\ProcessSignaler.cs (3)
60catch (InvalidOperationException) 112catch (InvalidOperationException) 164catch (InvalidOperationException)
src\Shared\ProcessStartTimeHelper.cs (4)
91catch (Exception ex) when (ex is ArgumentException or InvalidOperationException or Win32Exception) 113catch (Exception ex) when (ex is ArgumentException or InvalidOperationException or Win32Exception) 205catch (InvalidOperationException) 256catch (InvalidOperationException)
Telemetry\InternalMicrosoftDetector.cs (2)
663catch (Exception ex) when (ex is HttpRequestException or JsonException or InvalidOperationException or TaskCanceledException) 685catch (Exception ex) when (ex is OperationCanceledException or TimeoutException or HttpRequestException or JsonException or InvalidOperationException or TaskCanceledException)
Telemetry\MacOSXMachineInformationProvider.cs (2)
22/// cref="InvalidOperationException"/> is thrown. The returned path is typically located under the 26/// <exception cref="InvalidOperationException">Thrown if the user's profile directory and the "HOME"
Telemetry\UnixMachineInformationProvider.cs (2)
20/// <exception cref="InvalidOperationException">If there is no folder to persist data in.</exception> 30catch (InvalidOperationException ex)
Utils\AspireAnsiConsoleOutput.cs (2)
93catch (Exception ex) when (ex is IOException or InvalidOperationException) 105catch (Exception ex) when (ex is IOException or InvalidOperationException)
Utils\ConsoleActivityLogger.cs (1)
786catch (InvalidOperationException ex)
Utils\EnvironmentChecker\DcpConnectionChecker.cs (1)
294catch (InvalidOperationException) when (process.HasExited)
Utils\ProcessCaptureRunner.cs (3)
50catch (Exception ex) when (ex is System.ComponentModel.Win32Exception or InvalidOperationException or IOException) 179catch (Exception ex) when (ex is InvalidOperationException or NotSupportedException or System.ComponentModel.Win32Exception) 214catch (InvalidOperationException)
Utils\StringUtils.cs (1)
21catch (InvalidOperationException)
aspire-managed (5)
src\Shared\BundleVersionLease.cs (1)
268catch (Exception ex) when (ex is InvalidOperationException or NotSupportedException or System.ComponentModel.Win32Exception)
src\Shared\ProcessStartTimeHelper.cs (4)
91catch (Exception ex) when (ex is ArgumentException or InvalidOperationException or Win32Exception) 113catch (Exception ex) when (ex is ArgumentException or InvalidOperationException or Win32Exception) 205catch (InvalidOperationException) 256catch (InvalidOperationException)
Aspire.Acquisition.Tests (2)
Scripts\Common\RealGitHubPRFixture.cs (2)
102catch (Exception ex) when (ex is ToolCommandException or JsonException or InvalidOperationException) 139catch (Exception ex) when (ex is ToolCommandException or JsonException or InvalidOperationException)
Aspire.Azure.AI.Inference (4)
AspireAzureAIInferenceExtensions.cs (4)
36/// <exception cref="InvalidOperationException">Thrown when endpoint is missing from settings.</exception> 87/// <exception cref="InvalidOperationException">Thrown when endpoint is missing from settings.</exception> 292/// <exception cref="InvalidOperationException">Thrown when endpoint is missing from settings.</exception> 343/// <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> 69/// <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)
155var 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"> 79/// <exception cref="InvalidOperationException"> 122/// <exception cref="InvalidOperationException"> 156/// <exception cref="InvalidOperationException">
Aspire.Azure.Storage.Files.DataLake (4)
AspireDataLakeExtensions.cs (4)
27/// <exception cref="InvalidOperationException"> 65/// <exception cref="InvalidOperationException"> 100/// <exception cref="InvalidOperationException"> 136/// <exception cref="InvalidOperationException">
Aspire.Azure.Storage.Queues (6)
AspireQueueStorageExtensions.cs (6)
35/// <exception cref="InvalidOperationException">Thrown when neither <see cref="AzureStorageQueuesSettings.ConnectionString"/> nor <see cref="AzureStorageQueuesSettings.ServiceUri"/> is provided.</exception> 57/// <exception cref="InvalidOperationException">Thrown when neither <see cref="AzureStorageQueuesSettings.ConnectionString"/> nor <see cref="AzureStorageQueuesSettings.ServiceUri"/> is provided.</exception> 80/// <exception cref="InvalidOperationException">Thrown when neither <see cref="AzureStorageQueuesSettings.ConnectionString"/> nor <see cref="AzureStorageQueuesSettings.ServiceUri"/> is provided.</exception> 102/// <exception cref="InvalidOperationException">Thrown when neither <see cref="AzureStorageQueuesSettings.ConnectionString"/> nor <see cref="AzureStorageQueuesSettings.ServiceUri"/> is provided.</exception> 130/// <exception cref="InvalidOperationException"> 164/// <exception cref="InvalidOperationException">
Aspire.Cli.EndToEnd.Tests (20)
Helpers\CliInstallStrategyTests.cs (19)
235var exception = Assert.Throws<InvalidOperationException>(() => 284var exception = Assert.Throws<InvalidOperationException>(() => 315var exception = Assert.Throws<InvalidOperationException>(() => 360var exception = Assert.Throws<InvalidOperationException>(() => 601var exception = Assert.Throws<InvalidOperationException>(DotnetToolSmokeTests.GetDotnetToolStrategy); 816var exception = Assert.Throws<InvalidOperationException>(() => CliInstallStrategy.FromLocalArchive(tempDir.FullName)); 835var exception = Assert.Throws<InvalidOperationException>(() => CliInstallStrategy.FromDotnetToolLocalSource(tempDir.FullName)); 913Assert.Throws<InvalidOperationException>(CliInstallStrategy.FromPullRequest); 939var exception = Assert.Throws<InvalidOperationException>(() => CliE2ETestHelpers.TryGetPullRequestHeadSha(out _)); 952var exception = Assert.Throws<InvalidOperationException>(() => CliE2ETestHelpers.TryGetPullRequestHeadSha(out _));
TypeScriptBlazorGatewayTests.cs (1)
137catch (InvalidOperationException)
Aspire.Cli.Tests (138)
Acquisition\IdentityResolverTests.cs (8)
161var ex = Assert.Throws<InvalidOperationException>(() => resolver.ResolveVersion()); 173var ex = Assert.Throws<InvalidOperationException>(() => resolver.ResolveVersion()); 204var ex = Assert.Throws<InvalidOperationException>(() => resolver.ResolveCommit()); 232var ex = Assert.Throws<InvalidOperationException>(() => resolver.ResolveNuGetServiceIndexOverride());
Agents\AspireSkillsBundleTests.cs (33)
129var exception = await Assert.ThrowsAsync<InvalidOperationException>(() => LoadBundleAsync(s_bundleProvider, bundleDirectory)); 214var exception = await Assert.ThrowsAsync<InvalidOperationException>( 234var exception = await Assert.ThrowsAsync<InvalidOperationException>( 260var exception = await Assert.ThrowsAsync<InvalidOperationException>( 293var exception = await Assert.ThrowsAsync<InvalidOperationException>( 316var exception = await Assert.ThrowsAsync<InvalidOperationException>(() => LoadBundleAsync(s_bundleProvider, bundleDirectory)); 349var exception = await Assert.ThrowsAsync<InvalidOperationException>(() => LoadBundleAsync(s_bundleProvider, bundleDirectory)); 377var exception = await Assert.ThrowsAsync<InvalidOperationException>( 400var exception = await Assert.ThrowsAsync<InvalidOperationException>( 448var exception = await Assert.ThrowsAsync<InvalidOperationException>( 471var exception = await Assert.ThrowsAsync<InvalidOperationException>( 494var exception = await Assert.ThrowsAsync<InvalidOperationException>( 538var exception = await Assert.ThrowsAsync<InvalidOperationException>(() => LoadBundleAsync(s_bundleProvider, bundleDirectory)); 591var exception = await Assert.ThrowsAsync<InvalidOperationException>( 712var exception = await Assert.ThrowsAsync<InvalidOperationException>(() => LoadBundleAsync(s_bundleProvider, bundleDirectory)); 735var exception = await Assert.ThrowsAsync<InvalidOperationException>(() => LoadBundleAsync(bundleProvider, bundleDirectory)); 808await Assert.ThrowsAsync<InvalidOperationException>(() => LoadBundleAsync(
Agents\AspireSkillsInstallerTests.cs (4)
1484var exception = await Assert.ThrowsAsync<InvalidOperationException>(() => provider.CreateAsync( 1514var exception = await Assert.ThrowsAsync<InvalidOperationException>(() => provider.CreateAsync(
Agents\ClaudeCodeAgentEnvironmentScannerTests.cs (5)
40var ex = await Assert.ThrowsAsync<InvalidOperationException>( 66var ex = await Assert.ThrowsAsync<InvalidOperationException>( 92await Assert.ThrowsAsync<InvalidOperationException>(
Agents\CopilotCliAgentEnvironmentScannerTests.cs (5)
223var ex = await Assert.ThrowsAsync<InvalidOperationException>( 249var ex = await Assert.ThrowsAsync<InvalidOperationException>( 275await Assert.ThrowsAsync<InvalidOperationException>(
Agents\OpenCodeAgentEnvironmentScannerTests.cs (5)
37var ex = await Assert.ThrowsAsync<InvalidOperationException>( 61var ex = await Assert.ThrowsAsync<InvalidOperationException>( 85await Assert.ThrowsAsync<InvalidOperationException>(
Agents\TelemetryHookScriptTests.cs (1)
536catch (InvalidOperationException)
Agents\VsCodeAgentEnvironmentScannerTests.cs (5)
296var ex = await Assert.ThrowsAsync<InvalidOperationException>( 322var ex = await Assert.ThrowsAsync<InvalidOperationException>( 348await Assert.ThrowsAsync<InvalidOperationException>(
Backchannel\AppHostCliBackchannelTests.cs (2)
37var ex = await Assert.ThrowsAsync<InvalidOperationException>(
Backchannel\ExtensionBackchannelTests.cs (3)
31var setupException = new InvalidOperationException("Simulated setup failure."); 57var retryException = await Assert.ThrowsAsync<InvalidOperationException>(() => backchannel.ConnectAsync(CancellationToken.None)).DefaultTimeout();
Commands\AgentInitCommandTests.cs (1)
973/// script surfacing as <see cref="InvalidOperationException"/>) so the best-effort catch in
Commands\AppHostLauncherTests.cs (1)
1525catch (Exception ex) when (ex is ArgumentException or InvalidOperationException or System.ComponentModel.Win32Exception)
Commands\InitCommandTests.cs (2)
707var ex = Assert.ThrowsAny<InvalidOperationException>(() =>
Commands\McpIconHelperTests.cs (2)
68var exception = Assert.Throws<InvalidOperationException>(() =>
Configuration\ConfigurationHelperTests.cs (1)
278Assert.True(ex is null or InvalidOperationException, $"Unexpected exception type: {ex?.GetType().FullName}");
Interaction\ConsoleInteractionServiceTests.cs (8)
389var exception = await Assert.ThrowsAsync<InvalidOperationException>(() => 402var exception = await Assert.ThrowsAsync<InvalidOperationException>(() => 415var exception = await Assert.ThrowsAsync<InvalidOperationException>(() => 427var exception = await Assert.ThrowsAsync<InvalidOperationException>(() =>
Interaction\ExtensionInteractionServiceTests.cs (2)
201var exception = await Assert.ThrowsAsync<InvalidOperationException>(() =>
Mcp\Docs\DocsIndexServiceTests.cs (2)
799await Assert.ThrowsAsync<InvalidOperationException>(() => service.ListDocumentsAsync().AsTask()); 839await Assert.ThrowsAsync<InvalidOperationException>(() => service.EnsureIndexedAsync().AsTask());
Mcp\Docs\DocsSearchServiceTests.cs (1)
361await Assert.ThrowsAsync<InvalidOperationException>(() => searchService.SearchAsync("Redis"));
Npm\AspireJsLauncherTests.cs (1)
392catch (InvalidOperationException)
NuGet\NuGetPackagePrefetcherTests.cs (1)
188var ex = new InvalidOperationException("Something went wrong");
Packaging\PackagingServiceTests.cs (6)
2238var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => packagingService.GetChannelsAsync()).DefaultTimeout(); 2268var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => packagingService.GetChannelsAsync()).DefaultTimeout(); 2288var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => packagingService.GetChannelsAsync()).DefaultTimeout();
Processes\IsolatedProcessTests.cs (2)
107var fault = await Assert.ThrowsAsync<InvalidOperationException>(
Processes\ProcessTreeGracefulShutdownServiceTests.cs (1)
393catch (InvalidOperationException)
ProfileCaptureServiceTests.cs (9)
125var exception = await Assert.ThrowsAsync<InvalidOperationException>( 147var exception = await Assert.ThrowsAsync<InvalidOperationException>( 151Assert.IsType<InvalidOperationException>(exception.InnerException); 178var exception = await Assert.ThrowsAsync<InvalidOperationException>( 248var exception = await Assert.ThrowsAsync<InvalidOperationException>(
Projects\AppHostServerSessionTests.cs (6)
148var exception = await Assert.ThrowsAsync<InvalidOperationException>( 180await Assert.ThrowsAsync<InvalidOperationException>(session.StartAsync); 401if (e.Exception.InnerExceptions.Any(static ex => ex is InvalidOperationException { Message: "simulated launch failure" })) 438await Assert.ThrowsAsync<InvalidOperationException>(session.StartAsync); 515catch (InvalidOperationException)
Projects\JavaAppHostToolchainResolverTests.cs (4)
290var ex = Assert.Throws<InvalidOperationException>( 378var ex = Assert.Throws<InvalidOperationException>(
Projects\PrebuiltAppHostServerTests.cs (6)
1162var ex = await Assert.ThrowsAsync<InvalidOperationException>( 1177var ex = await Assert.ThrowsAsync<InvalidOperationException>( 1196var ex = await Assert.ThrowsAsync<InvalidOperationException>(
Telemetry\AspireCliTelemetryTests.cs (6)
101var exception = new InvalidOperationException("Test exception"); 115var exception = new InvalidOperationException("Test exception"); 127Assert.Equal(typeof(InvalidOperationException).FullName, eventTags[TelemetryConstants.Tags.ExceptionType]); 147var exception = new InvalidOperationException("Test exception"); 170var exception = new InvalidOperationException("Test exception"); 197var exception = new InvalidOperationException("Test exception");
Templating\ConditionalBlockProcessorTests.cs (1)
233Assert.Throws<InvalidOperationException>(
TestServices\ProcessTestHelpers.cs (2)
63catch (InvalidOperationException) 84catch (InvalidOperationException)
Utils\GitTestHelper.cs (1)
57catch (Exception ex) when (ex is InvalidOperationException or Win32Exception)
Utils\ReparsePointTests.cs (1)
86Assert.Throws<InvalidOperationException>(() => ReparsePoint.CreateOrReplace(real, target));
Aspire.Components.Common.TestUtilities (2)
ConformanceTests.cs (2)
291Assert.Throws<InvalidOperationException>(host.Services.GetRequiredService<TService>); 463Assert.Throws<InvalidOperationException>(() =>
Aspire.Confluent.Kafka (4)
AspireKafkaConsumerExtensions.cs (2)
216catch (InvalidOperationException) 240catch (InvalidOperationException)
AspireKafkaProducerExtensions.cs (2)
216catch (InvalidOperationException) 241catch (InvalidOperationException)
Aspire.Dashboard (8)
Model\GenAI\GenAIMessageParsingHelper.cs (1)
73catch (InvalidOperationException)
Model\GenAI\GenAIMessages.cs (1)
237var wrappedEx = new InvalidOperationException($"Error reading message part '{type ?? "(missing)"}': {ex.Message}", ex);
Model\TelemetryImportService.cs (1)
49/// <exception cref="InvalidOperationException">Thrown when import is disabled.</exception>
ServiceClient\DashboardClient.cs (1)
753catch (InvalidOperationException)
src\Shared\IConfigurationExtensions.cs (4)
116/// <exception cref="InvalidOperationException">The configuration value could not be accessed, or contained incorrectly formatted data.</exception> 146/// <exception cref="InvalidOperationException">The configuration value could not be accessed, or contained incorrectly formatted data.</exception> 185/// <exception cref="InvalidOperationException">The configuration value is not a valid member of the enum.</exception> 213/// <exception cref="InvalidOperationException">The configuration value is empty or not a valid member of the enum.</exception>
Aspire.Dashboard.Components.Tests (2)
Dialogs\InteractionsInputDialogTests.cs (2)
115var exception = await Assert.ThrowsAsync<InvalidOperationException>(
Aspire.Dashboard.Tests (9)
Integration\StartupTests.cs (1)
90catch (InvalidOperationException)
Model\ResourceViewModelTests.cs (2)
103var ex = Assert.Throws<InvalidOperationException>(() => ToViewModel(resource));
Model\TelemetryImportServiceTests.cs (1)
45await Assert.ThrowsAsync<InvalidOperationException>(() => service.ImportAsync("logs.json", stream, CancellationToken.None));
Terminal\TerminalWebSocketProxyEndpointTests.cs (5)
41var ex = await Assert.ThrowsAsync<InvalidOperationException>(async () => 63var ex = await Assert.ThrowsAsync<InvalidOperationException>(async () => 92await Assert.ThrowsAsync<InvalidOperationException>(async () =>
Aspire.Deployment.EndToEnd.Tests (1)
Helpers\AzureAuthenticationHelpers.cs (1)
58/// <exception cref="InvalidOperationException">Thrown when subscription ID is not configured.</exception>
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 (61)
ApplicationModel\CommandLineArgsCallbackAnnotation.cs (1)
147/// <exception cref="InvalidOperationException">Thrown when the CommandLineArgsCallbackContext was created without a specified resource.</exception>
ApplicationModel\ContainerImagePushOptions.cs (1)
59/// <exception cref="InvalidOperationException">Thrown when <see cref="RemoteImageName"/> is <c>null</c> or empty.</exception>
ApplicationModel\DebugSupportExtensions.cs (2)
106/// <exception cref="InvalidOperationException">The resource does not declare debug launch support.</exception> 149/// <exception cref="InvalidOperationException">The resource does not declare debug launch support.</exception>
ApplicationModel\EndpointReference.cs (2)
344/// <exception cref="InvalidOperationException">Throws when the selected <see cref="EndpointProperty"/> enumeration is not known.</exception> 356/// <exception cref="InvalidOperationException">Throws when the selected <see cref="EndpointProperty"/> enumeration is not known.</exception>
ApplicationModel\EnvironmentCallbackContext.cs (1)
67/// <exception cref="InvalidOperationException">Thrown when the EnvironmentCallbackContext was created without a specified resource.</exception>
ApplicationModel\IComputeEnvironmentResource.cs (1)
38/// <exception cref="InvalidOperationException">Thrown when the requested endpoint property is unsupported, or when a non-HTTP/HTTPS endpoint does not specify a port.</exception>
ApplicationModel\ProjectResourceExtensions.cs (1)
38/// <exception cref="InvalidOperationException">Thrown when the project resource doesn't have exactly one project metadata annotation.</exception>
ApplicationModel\ReferenceExpression.cs (10)
374/// <exception cref="InvalidOperationException"></exception> 397/// <exception cref="InvalidOperationException"></exception> 412/// <exception cref="InvalidOperationException"></exception> 424/// <exception cref="InvalidOperationException"></exception> 548/// <exception cref="InvalidOperationException"></exception> 571/// <exception cref="InvalidOperationException"></exception> 679/// <exception cref="InvalidOperationException"></exception> 690/// <exception cref="InvalidOperationException"></exception> 700/// <exception cref="InvalidOperationException"></exception> 712/// <exception cref="InvalidOperationException"></exception>
ApplicationModel\ResourceExtensions.cs (4)
1250/// Throws <see cref="InvalidOperationException"/> if the resource has no resolved names or multiple resolved names. 1351/// <exception cref="InvalidOperationException">Thrown when the resource does not have a container registry reference.</exception> 1400/// <exception cref="InvalidOperationException">Thrown when the resource does not have a container registry reference.</exception> 1838catch (InvalidOperationException)
ApplicationModel\TerminalAnnotation.cs (1)
63/// <exception cref="InvalidOperationException">Thrown when called more than once.</exception>
Backchannel\AuxiliaryBackchannelRpcTarget.cs (1)
852/// <exception cref="InvalidOperationException">Thrown when AppHost information is not available.</exception>
ContainerResourceBuilderExtensions.cs (3)
1122/// <exception cref="InvalidOperationException"> 1172/// <exception cref="InvalidOperationException"> 1250/// <exception cref="InvalidOperationException">
Dashboard\DashboardService.cs (1)
538catch (InvalidOperationException ex)
Dashboard\InteractionFileUploadStore.cs (1)
323private static InvalidOperationException CreateFileMismatchException(string inputName, Exception? innerException = null)
Dcp\DcpProcessMonitor.cs (1)
42catch (InvalidOperationException)
Dcp\Process\ProcessUtil.cs (1)
309catch (InvalidOperationException) when (process.HasExited)
Dcp\ProxylessEndpointPortAllocator.cs (1)
193private InvalidOperationException CreateNoAvailablePortsException()
DistributedApplicationExecutionContext.cs (2)
75/// <exception cref="InvalidOperationException" accessor="get">Thrown when the <see cref="IServiceProvider"/> is not available.</exception> 82/// <exception cref="InvalidOperationException" accessor="get">Thrown when the <see cref="IServiceProvider"/> is not available.</exception>
IInteractionService.cs (3)
700/// <exception cref="InvalidOperationException">Thrown when the input has no value.</exception> 716/// <exception cref="InvalidOperationException">Thrown when the input has no value.</exception> 729/// <exception cref="InvalidOperationException">Thrown when the input has no value.</exception>
OtlpConfigurationExtensions.cs (1)
199catch (InvalidOperationException)
Pipelines\DistributedApplicationPipeline.cs (1)
889var wrappedException = new InvalidOperationException(message, ex);
Pipelines\IDeploymentStateManager.cs (2)
34/// <exception cref="InvalidOperationException">Thrown when a version conflict is detected, indicating the section was modified after it was acquired.</exception> 43/// <exception cref="InvalidOperationException">Thrown when a version conflict is detected, indicating the section was modified after it was acquired.</exception>
ProjectResourceBuilderExtensions.cs (1)
459/// <exception cref="InvalidOperationException">The resource does not carry exactly one <see cref="IProjectMetadata"/> annotation, project metadata changes after defaults are applied, or defaults were already applied.</exception>
ResourceBuilderExtensions.cs (4)
58/// <exception cref="InvalidOperationException">Thrown when the resource does not support lifetime configuration.</exception> 90/// <exception cref="InvalidOperationException">Thrown when the resource does not support lifetime configuration.</exception> 114/// <exception cref="InvalidOperationException">Thrown when the resource does not support lifetime configuration.</exception> 163/// <exception cref="InvalidOperationException">Thrown when the resource does not support lifetime configuration.</exception>
src\Shared\BackchannelConstants.cs (2)
423catch (InvalidOperationException) 554/// <exception cref="InvalidOperationException">Thrown when the path exceeds the platform byte limit.</exception>
src\Shared\IConfigurationExtensions.cs (4)
116/// <exception cref="InvalidOperationException">The configuration value could not be accessed, or contained incorrectly formatted data.</exception> 146/// <exception cref="InvalidOperationException">The configuration value could not be accessed, or contained incorrectly formatted data.</exception> 185/// <exception cref="InvalidOperationException">The configuration value is not a valid member of the enum.</exception> 213/// <exception cref="InvalidOperationException">The configuration value is empty or not a valid member of the enum.</exception>
src\Shared\OtlpEndpointResolver.cs (1)
22/// <exception cref="InvalidOperationException">Thrown when <paramref name="requiredProtocol"/> requires HTTP but no HTTP endpoint is configured.</exception>
src\Shared\ProcessSignaler.cs (3)
60catch (InvalidOperationException) 112catch (InvalidOperationException) 164catch (InvalidOperationException)
src\Shared\ProcessStartTimeHelper.cs (4)
91catch (Exception ex) when (ex is ArgumentException or InvalidOperationException or Win32Exception) 113catch (Exception ex) when (ex is ArgumentException or InvalidOperationException or Win32Exception) 205catch (InvalidOperationException) 256catch (InvalidOperationException)
Aspire.Hosting.Azure (7)
AzureBicepResource.cs (1)
155/// <exception cref="InvalidOperationException"></exception>
AzureBicepResourceScope.cs (1)
82/// <exception cref="InvalidOperationException">The scope does not target a resource group.</exception>
AzureProvisioningController.cs (3)
1949ex is InvalidOperationException or AzureProvisioningFailureException && 2856catch (InvalidOperationException ex) when (IsDeploymentStateConcurrencyConflict(ex)) 2866private static bool IsDeploymentStateConcurrencyConflict(InvalidOperationException ex)
Provisioning\Internal\BicepCompiler.cs (1)
71catch (InvalidOperationException ex)
src\Aspire.Hosting\Dcp\Process\ProcessUtil.cs (1)
309catch (InvalidOperationException) when (process.HasExited)
Aspire.Hosting.Azure.AppService (2)
AzureAppServiceComputeResourceExtensions.cs (1)
78/// <exception cref="InvalidOperationException">Thrown when the resource is not configured for Azure App Service publishing.</exception>
AzureAppServiceEnvironmentResource.cs (1)
287catch (InvalidOperationException)
Aspire.Hosting.Azure.ContainerRegistry (1)
AzureContainerRegistryExtensions.cs (1)
110/// <exception cref="InvalidOperationException">Thrown when the resource does not have an associated Azure Container Registry,
Aspire.Hosting.Azure.Kubernetes (1)
src\Aspire.Hosting\Dcp\Process\ProcessUtil.cs (1)
309catch (InvalidOperationException) when (process.HasExited)
Aspire.Hosting.Azure.Kubernetes.Tests (18)
AzureKubernetesInfrastructureTests.cs (14)
238var exception = await Assert.ThrowsAsync<InvalidOperationException>( 300var exception = await Assert.ThrowsAsync<InvalidOperationException>( 320var exception = await Assert.ThrowsAsync<InvalidOperationException>( 362var exception = await Assert.ThrowsAsync<InvalidOperationException>( 655var exception = await Assert.ThrowsAsync<InvalidOperationException>( 674var exception = await Assert.ThrowsAsync<InvalidOperationException>( 833var exception = await Assert.ThrowsAsync<InvalidOperationException>(
AzureKubernetesIngressTests.cs (4)
150var ex = aggregate.Flatten().InnerExceptions.OfType<InvalidOperationException>().First(e => e.Message.Contains("WithExternalHttpEndpoints")); 172var ex = aggregate.Flatten().InnerExceptions.OfType<InvalidOperationException>().First(e => e.Message.Contains("WithExternalHttpEndpoints"));
Aspire.Hosting.Azure.Kusto.Tests (1)
KustoResiliencePipelinesTests.cs (1)
41await Assert.ThrowsAsync<InvalidOperationException>(async () =>
Aspire.Hosting.Azure.Network (2)
AzureVirtualNetworkExtensions.cs (2)
289/// <exception cref="InvalidOperationException">Thrown when the resource is already associated with a different delegated subnet or the subnet is delegated to a different service.</exception> 456/// <exception cref="InvalidOperationException">
Aspire.Hosting.Azure.Sql (1)
SubnetAddressAllocator.cs (1)
23/// <exception cref="InvalidOperationException">
Aspire.Hosting.Azure.Tests (78)
AzureAppServiceEnvironmentExtensionsTests.cs (2)
97var exception = Assert.Throws<InvalidOperationException>(() => appServiceEnvironment.Resource.ContainerRegistry);
AzureAppServiceTests.cs (6)
695var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => ExecuteBeforeStartHooksAsync(app, default)); 1018var outer = await Assert.ThrowsAsync<InvalidOperationException>(() => ExecuteBeforeStartHooksAsync(app, default)); 1039var outer = await Assert.ThrowsAsync<InvalidOperationException>(() => ExecuteBeforeStartHooksAsync(app, default));
AzureBicepProvisionerTests.cs (11)
143var exception = await Assert.ThrowsAsync<InvalidOperationException>(() => 172var sentinel = new InvalidOperationException("stop-after-populate-well-known-parameters"); 188var thrown = await Assert.ThrowsAsync<InvalidOperationException>(() => 1419var exception = await Assert.ThrowsAsync<InvalidOperationException>(() => provisioner.GetOrCreateResourceAsync(resource, context, CancellationToken.None)); 1656var exception = await Assert.ThrowsAsync<InvalidOperationException>(() => 1681var exception = await Assert.ThrowsAsync<InvalidOperationException>(() =>
AzureBicepResourceScopeTests.cs (4)
21var exception = Assert.Throws<InvalidOperationException>(() => scope.ResourceGroup); 31var exception = Assert.Throws<InvalidOperationException>(() => scope.ResourceGroup);
AzureBicepResourceTests.cs (2)
157Assert.Throws<InvalidOperationException>(() => bicepResource.GetOutput("resourceEndpoint").Value); 168Assert.Throws<InvalidOperationException>(() => bicepResource.GetSecretOutput("connectionString").Value);
AzureContainerAppEnvironmentExtensionsTests.cs (8)
136var exception = Assert.Throws<InvalidOperationException>(() => containerAppEnvironment.Resource.ContainerRegistry); 474var ex = await Assert.ThrowsAsync<InvalidOperationException>( 503var ex = await Assert.ThrowsAsync<InvalidOperationException>( 527var ex = await Assert.ThrowsAsync<InvalidOperationException>(
AzureContainerAppsTests.cs (11)
1195var outer = await Assert.ThrowsAsync<InvalidOperationException>(() => ExecuteBeforeStartHooksAsync(app, default)); 1217var outer = await Assert.ThrowsAsync<InvalidOperationException>(() => ExecuteBeforeStartHooksAsync(app, default)); 1237var outer = await Assert.ThrowsAsync<InvalidOperationException>(() => ExecuteBeforeStartHooksAsync(app, default)); 1258var outer = await Assert.ThrowsAsync<InvalidOperationException>(() => ExecuteBeforeStartHooksAsync(app, default)); 1812var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => ExecuteBeforeStartHooksAsync(app, default)); 2375await Assert.ThrowsAsync<InvalidOperationException>(async () => await ExecuteBeforeStartHooksAsync(app, default));
AzureContainerRegistryTests.cs (1)
384Assert.Throws<InvalidOperationException>(() => env.GetAzureContainerRegistry());
AzureCosmosDBExtensionsTests.cs (4)
1121var ex = await Assert.ThrowsAsync<InvalidOperationException>( 1214var ex = await Assert.ThrowsAsync<InvalidOperationException>(
AzureDataLakeStorageResourceGetConnectionPropertiesTests.cs (1)
37Assert.Throws<InvalidOperationException>(() => propertiesEnumerator.MoveNext());
AzureEventHubsExtensionsTests.cs (1)
554Assert.Throws<InvalidOperationException>(() => eventHubs.RunAsEmulator());
AzureFrontDoorTests.cs (4)
128var exception = await Assert.ThrowsAsync<InvalidOperationException>(() => ExecuteBeforeStartHooksAsync(app, default)); 247var exception = Assert.Throws<InvalidOperationException>(() => frontDoor.WithOrigin(api));
AzureNetworkSecurityGroupExtensionsTests.cs (2)
270var exception = Assert.Throws<InvalidOperationException>(() => subnet.WithNetworkSecurityGroup(nsg));
AzureResourcePreparerTests.cs (2)
54var ex = Assert.Throws<InvalidOperationException>(app.Start);
AzureServiceBusExtensionsTests.cs (1)
651Assert.Throws<InvalidOperationException>(() => serviceBus.RunAsEmulator());
AzureStorageResourceUriExpressionTests.cs (1)
44Assert.Throws<InvalidOperationException>(() => resource.DataLakeUriExpression);
AzureUserAssignedIdentityTests.cs (2)
265var exception = await Assert.ThrowsAsync<InvalidOperationException>(async () => await ExecuteBeforeStartHooksAsync(app, default));
AzureVirtualNetworkExtensionsTests.cs (4)
359var exception = Assert.Throws<InvalidOperationException>(() => environment.WithDelegatedSubnet(secondSubnet)); 381var exception = Assert.Throws<InvalidOperationException>(() => appServiceEnvironment.WithDelegatedSubnet(subnet));
DefaultAzurePrincipalProviderTests.cs (4)
149var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => provider.GetPrincipalAsync()); 165var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => provider.GetPrincipalAsync());
DurableTaskResourceExtensionsTests.cs (5)
130var ex = Assert.Throws<InvalidOperationException>(() => _ = dts.Resource.ConnectionStringExpression); 145Assert.Throws<InvalidOperationException>(() => _ = dts.Resource.ConnectionStringExpression); 255var ex = Assert.Throws<InvalidOperationException>(() => _ = dts.Resource.ConnectionStringExpression);
FoundryExtensionsTests.cs (2)
479var ex = await Assert.ThrowsAsync<InvalidOperationException>(async () =>
Aspire.Hosting.Blazor (2)
BlazorDotNetCliRunner.cs (1)
56catch (Exception ex) when (ex is InvalidOperationException or Win32Exception)
BlazorGatewayExtensions.cs (1)
749catch (InvalidOperationException)
Aspire.Hosting.Browsers (6)
BrowserEndpointDiscovery.cs (1)
241catch (InvalidOperationException)
BrowserLogsCdpConnection.cs (1)
498private static InvalidOperationException CreateUnexpectedConnectionClosureException(WebSocketReceiveResult result)
BrowserLogsCdpConnectionMultiplexer.cs (1)
99var connectionException = new InvalidOperationException("Tracked browser CDP event handler failed.", ex);
BrowserLogsConfigurationManager.cs (1)
313catch (InvalidOperationException ex)
BrowserLogsPipeBrowserProcessLauncher.Windows.cs (1)
258catch (InvalidOperationException)
BrowserPageSession.cs (1)
345var error = new InvalidOperationException($"Tracked browser host '{_host.Identity}' ended before the page session completed.");
Aspire.Hosting.Browsers.Tests (21)
BrowserLogsBuilderExtensionsTests.cs (2)
396var ex = Assert.Throws<InvalidOperationException>(
BrowserLogsCdpConnectionTests.cs (5)
270var exception = await Assert.ThrowsAsync<InvalidOperationException>(() => failingConnection.Completion.DefaultTimeout()); 274await Assert.ThrowsAsync<InvalidOperationException>(() => failingConnection.CreateTargetAsync(CancellationToken.None)); 292var exception = Assert.Throws<InvalidOperationException>(() => multiplexer.CreateConnection(static _ => ValueTask.CompletedTask));
BrowserLogsCdpProtocolTests.cs (2)
75var exception = Assert.Throws<InvalidOperationException>(() => BrowserLogsCdpProtocol.ParseCommandAckResponse(payload));
BrowserLogsSessionManagerTests.cs (6)
152var exception = await Assert.ThrowsAsync<InvalidOperationException>(() => 364var exception = await Assert.ThrowsAsync<InvalidOperationException>(() => 527var exception = Assert.Throws<InvalidOperationException>(() => ChromiumBrowserResolver.ResolveProfileDirectory(userDataDirectory, "Shared profile"));
src\Aspire.Hosting.Browsers\BrowserEndpointDiscovery.cs (1)
241catch (InvalidOperationException)
src\Aspire.Hosting.Browsers\BrowserLogsCdpConnection.cs (1)
498private static InvalidOperationException CreateUnexpectedConnectionClosureException(WebSocketReceiveResult result)
src\Aspire.Hosting.Browsers\BrowserLogsCdpConnectionMultiplexer.cs (1)
99var connectionException = new InvalidOperationException("Tracked browser CDP event handler failed.", ex);
src\Aspire.Hosting.Browsers\BrowserLogsConfigurationManager.cs (1)
313catch (InvalidOperationException ex)
src\Aspire.Hosting.Browsers\BrowserLogsPipeBrowserProcessLauncher.Windows.cs (1)
258catch (InvalidOperationException)
src\Aspire.Hosting.Browsers\BrowserPageSession.cs (1)
345var error = new InvalidOperationException($"Tracked browser host '{_host.Identity}' ended before the page session completed.");
Aspire.Hosting.CodeGeneration.TypeScript (1)
EmbeddedResources.cs (1)
19/// <exception cref="InvalidOperationException">Thrown when the resource is not embedded.</exception>
Aspire.Hosting.CodeGeneration.TypeScript.Tests (3)
AtsTypeScriptCodeGeneratorTests.cs (3)
791Assert.IsType<InvalidOperationException>(ex.InnerException); 1151var exception = Assert.Throws<InvalidOperationException>(
Aspire.Hosting.Containers.Tests (9)
ContainerResourceBuilderTests.cs (7)
82var exception = Assert.Throws<InvalidOperationException>(() => container.WithImageTag("7.1")); 92var exception = Assert.Throws<InvalidOperationException>(() => container.WithImageRegistry("myregistry.azurecr.io")); 102var exception = Assert.Throws<InvalidOperationException>(() => container.WithImageSHA256("42b5c726e719639fcc1e9dbc13dd843f567dcd37911d0e1abb9f47f2cc1c95cd")); 131Assert.Throws<InvalidOperationException>(() => container.WithImage("image:tag", "anothertag"));
WithDockerfileTests.cs (2)
633var ex = Assert.Throws<InvalidOperationException>(() =>
Aspire.Hosting.DevTunnels (2)
DevTunnelResource.cs (1)
126catch (InvalidOperationException) when (property == EndpointProperty.TargetPort && TargetEndpoint.IsAllocated)
DevTunnelResourceBuilderExtensions.cs (1)
380/// <exception cref="InvalidOperationException">Thrown when the specified endpoint is not found in the tunnel.</exception>
Aspire.Hosting.DevTunnels.Tests (6)
DevTunnelResourceBuilderExtensionsTests.cs (6)
342var ex = Assert.Throws<InvalidOperationException>(() => _ = endpointRef.EndpointAnnotation); 364var ex = Assert.Throws<InvalidOperationException>(() => _ = endpointRef.EndpointAnnotation); 382var ex = Assert.Throws<InvalidOperationException>(() => _ = endpointRef.EndpointAnnotation);
Aspire.Hosting.Docker (1)
src\Aspire.Hosting\Dcp\Process\ProcessUtil.cs (1)
309catch (InvalidOperationException) when (process.HasExited)
Aspire.Hosting.Docker.Tests (4)
DockerComposeTests.cs (2)
105var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => ExecuteBeforeStartHooksAsync(app, default));
EnvVarEscaperTests.cs (2)
83var ex = Assert.Throws<InvalidOperationException>(() => EscapeUnescapedEnvVars(input));
Aspire.Hosting.EntityFrameworkCore (6)
EFResourceBuilderExtensions.cs (6)
39/// <exception cref="InvalidOperationException">Thrown if migrations for this context type have already been added.</exception> 65/// <exception cref="InvalidOperationException">Thrown if migrations for this context type have already been added.</exception> 90/// <exception cref="InvalidOperationException">Thrown if migrations have already been added for any DbContext type on this project.</exception> 129/// <exception cref="InvalidOperationException">Thrown if migrations have already been added for any DbContext type on this project.</exception> 545catch (InvalidOperationException) 570catch (InvalidOperationException)
Aspire.Hosting.EntityFrameworkCore.Tests (10)
AddEFMigrationsTests.cs (4)
122var exception = Assert.Throws<InvalidOperationException>(() => 139var exception = Assert.Throws<InvalidOperationException>(() =>
EFMigrationPipelineTests.cs (6)
559var ex = Assert.Throws<InvalidOperationException>(() => 576var ex = Assert.Throws<InvalidOperationException>(() => 633var ex = Assert.Throws<InvalidOperationException>(() =>
Aspire.Hosting.Foundry (4)
FoundryLocalService.cs (2)
107catch (Exception e) when (e is OperationCanceledException or InvalidOperationException or Win32Exception) 352catch (InvalidOperationException)
HostedAgent\AzureHostedAgentResource.cs (1)
495private static InvalidOperationException CreateEndpointResolutionException(
Project\ProjectBuilderExtension.cs (1)
89/// <exception cref="InvalidOperationException">Thrown when the project already has a Key Vault connection configured.</exception>
Aspire.Hosting.Foundry.Tests (10)
AddProjectTests.cs (4)
55var exception = Assert.Throws<InvalidOperationException>(() => foundry.AddProject("my-project")); 68var exception = Assert.Throws<InvalidOperationException>(foundry.RunAsFoundryLocal);
PromptAgentTests.cs (4)
258Assert.Throws<InvalidOperationException>(() => tool.WithReference(search2)); 302Assert.Throws<InvalidOperationException>(() => tool.WithReference(conn2)); 328Assert.Throws<InvalidOperationException>(() => tool.WithReference(bingResourceId)); 499Assert.Throws<InvalidOperationException>(() =>
StaticValueProviderTests.cs (2)
23await Assert.ThrowsAsync<InvalidOperationException>( 33Assert.Throws<InvalidOperationException>(() => provider.Set("second"));
Aspire.Hosting.GitHub.Models (4)
src\Shared\IConfigurationExtensions.cs (4)
116/// <exception cref="InvalidOperationException">The configuration value could not be accessed, or contained incorrectly formatted data.</exception> 146/// <exception cref="InvalidOperationException">The configuration value could not be accessed, or contained incorrectly formatted data.</exception> 185/// <exception cref="InvalidOperationException">The configuration value is not a valid member of the enum.</exception> 213/// <exception cref="InvalidOperationException">The configuration value is empty or not a valid member of the enum.</exception>
Aspire.Hosting.Integration.Analyzers (15)
AspireExportAnalyzer.cs (15)
114catch (InvalidOperationException) 128catch (InvalidOperationException) 139catch (InvalidOperationException) 1362catch (InvalidOperationException) 1433catch (InvalidOperationException) 1453catch (InvalidOperationException) 1608catch (InvalidOperationException) 2153catch (InvalidOperationException) 2166catch (InvalidOperationException) 2184catch (InvalidOperationException) 2198catch (InvalidOperationException) 2331catch (InvalidOperationException) 2350catch (InvalidOperationException) 2530catch (InvalidOperationException) 2564catch (InvalidOperationException)
Aspire.Hosting.Java (9)
JavaHostingExtensions.cs (9)
62/// <exception cref="InvalidOperationException">No launch mode was configured. Raised when the resource starts, not when this is called.</exception> 283/// <exception cref="InvalidOperationException">The directory contains neither a Maven nor a Gradle build file, or contains both.</exception> 357/// <exception cref="InvalidOperationException">The directory contains neither a Maven nor a Gradle build file, or contains both.</exception> 528/// <exception cref="InvalidOperationException">The directory has no build file, or has both Maven and Gradle files.</exception> 635/// <exception cref="InvalidOperationException">The application is already configured to run a prebuilt JAR or a Gradle task.</exception> 663/// <exception cref="InvalidOperationException">The application is already configured to run a prebuilt JAR or a Maven goal.</exception> 741/// <exception cref="InvalidOperationException">The application is already configured to build with Gradle.</exception> 774/// <exception cref="InvalidOperationException">The application is already configured to build with Maven.</exception> 1094/// <exception cref="InvalidOperationException">The resource has no Maven or Gradle build configured, so the agent location cannot be inferred. Raised when the application model is built, not when this is called.</exception>
Aspire.Hosting.Java.Tests (18)
AddJavaAppTests.cs (10)
172var exception = await Assert.ThrowsAsync<InvalidOperationException>( 457var exception = Assert.Throws<InvalidOperationException>(action); 473var exception = Assert.Throws<InvalidOperationException>(action); 489var exception = Assert.Throws<InvalidOperationException>(action); 505var exception = Assert.Throws<InvalidOperationException>(action);
AddQuarkusAppTests.cs (2)
284var ex = await Assert.ThrowsAsync<InvalidOperationException>(
AddSpringBootAppTests.cs (6)
188var ex = await Assert.ThrowsAsync<InvalidOperationException>( 209var runException = await Assert.ThrowsAsync<InvalidOperationException>( 339var ex = await Assert.ThrowsAsync<InvalidOperationException>(
Aspire.Hosting.JavaScript (2)
JavaScriptHostingExtensions.cs (2)
1989/// <exception cref="InvalidOperationException">Thrown when <c>package.json</c> declares an invalid pnpm package manager version or integrity.</exception> 2237/// <exception cref="InvalidOperationException">
Aspire.Hosting.JavaScript.Tests (2)
AddJavaScriptAppTests.cs (2)
526var exception = Assert.Throws<InvalidOperationException>(() => builder.AddJavaScriptApp("js", appDir).WithPnpm());
Aspire.Hosting.Keycloak.Tests (1)
KeycloakPublicApiTests.cs (1)
146Assert.Throws<InvalidOperationException>(action);
Aspire.Hosting.Kubernetes (4)
Deployment\HelmVersionValidator.cs (1)
46/// <see cref="InvalidOperationException"/> if the installed version is older than
Extensions\EndpointRoutingValidation.cs (1)
26/// Throws an <see cref="InvalidOperationException"/> when the supplied
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 (27)
CertManagerTests.cs (1)
258Assert.Throws<InvalidOperationException>(() => gatewayInB.WithTls(issuerInA));
HelmVersionValidatorTests.cs (6)
53var ex = await Assert.ThrowsAsync<InvalidOperationException>( 67var ex = await Assert.ThrowsAsync<InvalidOperationException>( 83var ex = await Assert.ThrowsAsync<InvalidOperationException>(
KubernetesDeployTests.cs (2)
840var ex = await Assert.ThrowsAsync<InvalidOperationException>(
KubernetesEnvironmentResourceTests.cs (2)
51var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => ExecuteBeforeStartHooksAsync(app, default));
KubernetesGatewayTests.cs (4)
396var ex = aggregate.Flatten().InnerExceptions.OfType<InvalidOperationException>().First(e => e.Message.Contains("WithExternalHttpEndpoints")); 419var ex = aggregate.Flatten().InnerExceptions.OfType<InvalidOperationException>().First(e => e.Message.Contains("WithExternalHttpEndpoints"));
KubernetesHelmChartTests.cs (2)
488var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => CreateStepsAsync(builder, chart.Resource));
KubernetesIngressTests.cs (4)
670var ex = aggregate.Flatten().InnerExceptions.OfType<InvalidOperationException>().First(e => e.Message.Contains("WithExternalHttpEndpoints")); 693var ex = aggregate.Flatten().InnerExceptions.OfType<InvalidOperationException>().First(e => e.Message.Contains("WithExternalHttpEndpoints"));
KubernetesPublisherTests.cs (6)
975var exception = await Assert.ThrowsAsync<InvalidOperationException>(() => app.RunAsync()); 1011var exception = await Assert.ThrowsAsync<InvalidOperationException>(() => app.RunAsync()); 1726var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => app.RunAsync());
Aspire.Hosting.Maui (4)
src\Shared\IConfigurationExtensions.cs (4)
116/// <exception cref="InvalidOperationException">The configuration value could not be accessed, or contained incorrectly formatted data.</exception> 146/// <exception cref="InvalidOperationException">The configuration value could not be accessed, or contained incorrectly formatted data.</exception> 185/// <exception cref="InvalidOperationException">The configuration value is not a valid member of the enum.</exception> 213/// <exception cref="InvalidOperationException">The configuration value is empty or not a valid member of the enum.</exception>
Aspire.Hosting.Maui.Tests (3)
MauiBuildQueueTests.cs (3)
217await Assert.ThrowsAsync<InvalidOperationException>( 448var ex = await Assert.ThrowsAsync<InvalidOperationException>(async () =>
Aspire.Hosting.OpenAI (4)
src\Shared\IConfigurationExtensions.cs (4)
116/// <exception cref="InvalidOperationException">The configuration value could not be accessed, or contained incorrectly formatted data.</exception> 146/// <exception cref="InvalidOperationException">The configuration value could not be accessed, or contained incorrectly formatted data.</exception> 185/// <exception cref="InvalidOperationException">The configuration value is not a valid member of the enum.</exception> 213/// <exception cref="InvalidOperationException">The configuration value is empty or not a valid member of the enum.</exception>
Aspire.Hosting.Orleans (2)
OrleansServiceClientExtensions.cs (1)
20/// <exception cref="InvalidOperationException">Clustering has not been configured.</exception>
OrleansServiceExtensions.cs (1)
412/// <exception cref="InvalidOperationException">Clustering has not been configured.</exception>
Aspire.Hosting.Python.Tests (2)
AddPythonAppTests.cs (2)
1205var exception = Assert.Throws<InvalidOperationException>(() =>
Aspire.Hosting.Radius (21)
CloudProviders\RadiusCloudProviderExtensions.cs (2)
34/// <exception cref="InvalidOperationException">The callback did not select a credential (ASPIRERADIUS010).</exception> 79/// <exception cref="InvalidOperationException">The callback did not select a credential (ASPIRERADIUS010).</exception>
Publishing\RadCredentialRegisterStep.cs (1)
317catch (InvalidOperationException)
Publishing\RadiusDeploymentPipelineStep.cs (3)
32internal static InvalidOperationException CreateRadCliNotFoundException() => 206catch (InvalidOperationException) 236catch (Exception ex) when (ex is not InvalidOperationException and not OperationCanceledException)
Publishing\RadiusInfrastructureBuilder.cs (3)
1157catch (InvalidOperationException ex) 1883private InvalidOperationException MissingProviderReference(string cloud, string configureMethod) => 2053/// <exception cref="InvalidOperationException">
Publishing\SealedSecretApplyStep.cs (5)
321Func<InvalidOperationException> createTimeoutException) 343private static InvalidOperationException CreateSealedSecretSyncTimeoutException( 361internal static InvalidOperationException CreateOperationTimeoutException( 865catch (InvalidOperationException) 968catch (InvalidOperationException)
Secrets\RadiusSecretStoreExtensions.cs (1)
416/// <exception cref="InvalidOperationException">The key was already declared (<c>ASPIRERADIUS043</c>).</exception>
Secrets\RadiusSecretStoreValidation.cs (3)
91/// <exception cref="InvalidOperationException"> 218/// <exception cref="InvalidOperationException"> 321/// <exception cref="InvalidOperationException">
Secrets\SealedSecretManifest.cs (3)
50/// <exception cref="InvalidOperationException"> 99/// <exception cref="InvalidOperationException"> 681private static InvalidOperationException CreateInvalidManifestException(
Aspire.Hosting.Radius.Tests (128)
CloudProviders\ConflictingCredentialsTests.cs (4)
33var ex = Assert.Throws<InvalidOperationException>( 69var ex = Assert.Throws<InvalidOperationException>(
CloudProviders\WithAwsProviderTests.cs (2)
87var ex = Assert.Throws<InvalidOperationException>(() => env.WithAwsProvider(
CloudProviders\WithAzureProviderTests.cs (2)
83var ex = Assert.Throws<InvalidOperationException>(() => env.WithAzureProvider(
Deployment\RadCliDetectionTests.cs (1)
52var ex = RadiusDeploymentPipelineStep.CreateRadCliNotFoundException();
InnerLoop\MultiEnvironmentTests.cs (2)
45var ex = await Assert.ThrowsAsync<InvalidOperationException>(
Publishing\BicepGenerationSimpleTests.cs (2)
171var ex = Assert.Throws<InvalidOperationException>(() => context.GenerateBicep(model));
Publishing\BicepIdentifierTests.cs (1)
80Assert.IsType<InvalidOperationException>(ex);
Publishing\ConfigureRadiusInfrastructureTests.cs (20)
327var ex = Assert.Throws<InvalidOperationException>(() => context.GenerateBicep(model)); 378var ex = Assert.Throws<InvalidOperationException>(() => context.GenerateBicep(model)); 408var ex = Assert.Throws<InvalidOperationException>(() => context.GenerateBicep(model)); 434var ex = Assert.Throws<InvalidOperationException>(() => context.GenerateBicep(model)); 464var ex = Assert.Throws<InvalidOperationException>(() => context.GenerateBicep(model)); 495var ex = Assert.Throws<InvalidOperationException>(() => context.GenerateBicep(model)); 545var ex = Assert.Throws<InvalidOperationException>(() => context.GenerateBicep(model)); 576var ex = Assert.Throws<InvalidOperationException>(() => context.GenerateBicep(model)); 600var ex = Assert.Throws<InvalidOperationException>(() => context.GenerateBicep(model)); 631var ex = Assert.Throws<InvalidOperationException>(() => context.GenerateBicep(model));
Publishing\SealedSecretPublishTests.cs (4)
90var ex = Assert.Throws<InvalidOperationException>(() => 114var ex = Assert.Throws<InvalidOperationException>(() =>
Recipes\RecipeParameterAdvancedTests.cs (6)
167var ex = Assert.Throws<InvalidOperationException>(() => Publish(app)); 204var ex = Assert.Throws<InvalidOperationException>(() => Publish(app)); 226var ex = Assert.Throws<InvalidOperationException>(() => Publish(app));
Secrets\AddRadiusSecretStoreTests.cs (8)
136var ex = Assert.Throws<InvalidOperationException>(() => store.WithData("password", pass)); 158var ex = Assert.Throws<InvalidOperationException>(() => 209var ex = Assert.Throws<InvalidOperationException>(() => store.WithExistingSecret("app/s", "k2")); 221var ex = Assert.Throws<InvalidOperationException>(() => store.WithExistingSecret("app/s", "k"));
Secrets\SealedSecretApplyStepTests.cs (18)
268var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => 359await Assert.ThrowsAsync<InvalidOperationException>(() => SealedSecretApplyStep.SecretExistsAsync( 422var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => 442var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => 482var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => 520var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => 576var ex = Assert.Throws<InvalidOperationException>(() => SealedSecretApplyStep.ParseGeneration(""" 799var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => 841var ex = SealedSecretApplyStep.CreateOperationTimeoutException( 869var ex = Assert.Throws<InvalidOperationException>(() =>
Secrets\SealedSecretManifestTests.cs (50)
94var ex = Assert.Throws<InvalidOperationException>( 112var ex = Assert.Throws<InvalidOperationException>( 134var ex = Assert.Throws<InvalidOperationException>( 155var ex = Assert.Throws<InvalidOperationException>( 175var ex = Assert.Throws<InvalidOperationException>( 191var ex = Assert.Throws<InvalidOperationException>( 206var ex = Assert.Throws<InvalidOperationException>( 226var ex = Assert.Throws<InvalidOperationException>( 251var ex = Assert.Throws<InvalidOperationException>( 381var ex = Assert.Throws<InvalidOperationException>( 404var ex = Assert.Throws<InvalidOperationException>( 427var ex = Assert.Throws<InvalidOperationException>( 448var ex = Assert.Throws<InvalidOperationException>( 473var ex = Assert.Throws<InvalidOperationException>( 495var ex = Assert.Throws<InvalidOperationException>( 516var ex = Assert.Throws<InvalidOperationException>( 540var ex = Assert.Throws<InvalidOperationException>( 561var ex = Assert.Throws<InvalidOperationException>( 651var ex = Assert.Throws<InvalidOperationException>( 673var ex = Assert.Throws<InvalidOperationException>( 695var ex = Assert.Throws<InvalidOperationException>( 717var ex = Assert.Throws<InvalidOperationException>( 776var ex = Assert.Throws<InvalidOperationException>( 811var ex = Assert.Throws<InvalidOperationException>( 852var ex = Assert.Throws<InvalidOperationException>(
Secrets\SecretStoreValidationTests.cs (8)
44var ex = Assert.Throws<InvalidOperationException>(() => RadiusSecretStoreValidation.Validate(model)); 96var ex = Assert.Throws<InvalidOperationException>( 174var ex = Assert.Throws<InvalidOperationException>(() => store.WithExistingSecret("app/s", "k")); 379var ex = Assert.Throws<InvalidOperationException>(() => BuildOptions(m));
Aspire.Hosting.RemoteHost (12)
Ats\CapabilityDispatcher.cs (1)
670catch (Exception ex) when (ex is not InvalidOperationException)
Ats\HandleRegistry.cs (3)
76/// <exception cref="InvalidOperationException">Thrown if the handle is not found.</exception> 92/// <exception cref="InvalidOperationException">Thrown if the handle is not found or type doesn't match.</exception> 109/// <exception cref="InvalidOperationException">Thrown if the handle is not found.</exception>
AtsCapabilityScanner.cs (3)
462catch (InvalidOperationException ex) 1765catch (InvalidOperationException ex) 1925catch (InvalidOperationException ex)
RemoteAppHostService.cs (1)
146catch (InvalidOperationException ex) when (!_authenticationState.IsAuthenticated)
src\Shared\ProcessStartTimeHelper.cs (4)
91catch (Exception ex) when (ex is ArgumentException or InvalidOperationException or Win32Exception) 113catch (Exception ex) when (ex is ArgumentException or InvalidOperationException or Win32Exception) 205catch (InvalidOperationException) 256catch (InvalidOperationException)
Aspire.Hosting.RemoteHost.Tests (13)
CallbackProxyTests.cs (4)
239var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => proxy()); 254var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => proxy());
CodeGenerationDiagnosticBuilderTests.cs (2)
76var outer = new InvalidOperationException("wrapper", inner); 145var exception = new InvalidOperationException("outer", new MissingMethodException("inner"));
HandleRegistryTests.cs (3)
90Assert.Throws<InvalidOperationException>(() => registry.GetObject("999")); 113Assert.Throws<InvalidOperationException>(() => registry.GetObject<string>(handleId)); 290Assert.Throws<InvalidOperationException>(() => HandleRef.FromJsonNode(json));
IntegrationPackageProbeManifestTests.cs (4)
13var exception = Assert.Throws<InvalidOperationException>( 41var exception = Assert.Throws<InvalidOperationException>(
Aspire.Hosting.Rust (1)
CargoMetadataReader.cs (1)
223catch (InvalidOperationException)
Aspire.Hosting.Rust.Tests (3)
RustPublicApiTests.cs (3)
345var exception = await Assert.ThrowsAsync<InvalidOperationException>( 478await Assert.ThrowsAsync<InvalidOperationException>(
Aspire.Hosting.Tasks (4)
ResolveAspireCliInvocation.cs (2)
177catch (InvalidOperationException) 205catch (Exception ex) when (ex is InvalidOperationException or IOException or UnauthorizedAccessException or System.ComponentModel.Win32Exception)
RunAspireCliCommand.cs (2)
93catch (Exception ex) when (ex is Win32Exception or InvalidOperationException or NotSupportedException) 184catch (InvalidOperationException)
Aspire.Hosting.Testing (8)
DistributedApplicationFactory.cs (1)
109/// <exception cref="InvalidOperationException">The resource has no endpoints.</exception>
DistributedApplicationHostingTestingExtensions.cs (4)
43/// <exception cref="InvalidOperationException"> 206/// <exception cref="InvalidOperationException">The resource has no endpoints.</exception> 226/// <exception cref="InvalidOperationException">The resource has no endpoints.</exception> 245/// <exception cref="InvalidOperationException">The resource has no endpoints.</exception>
DistributedApplicationTestingBuilder.cs (3)
58/// <exception cref="InvalidOperationException"> 104/// <exception cref="InvalidOperationException"> 228/// <exception cref="InvalidOperationException">
Aspire.Hosting.Testing.Tests (19)
DashboardTestingBuilderTests.cs (4)
155var exception = await Assert.ThrowsAsync<InvalidOperationException>( 168var exception = await Assert.ThrowsAsync<InvalidOperationException>(
DashboardUrlTests.cs (6)
244var exception = await Assert.ThrowsAsync<InvalidOperationException>( 280var exception = await Assert.ThrowsAsync<InvalidOperationException>( 292var exception = await Assert.ThrowsAsync<InvalidOperationException>(
TestingBuilderTests.cs (7)
80var ioe = await Assert.ThrowsAsync<InvalidOperationException>(() => DistributedApplicationTestingBuilder.CreateAsync(typeof(Microsoft.Extensions.Logging.ConsoleLoggerExtensions))); 210Assert.Throws<InvalidOperationException>(() => app.CreateHttpClient("mywebapp1")); 463var exception = await Assert.ThrowsAsync<InvalidOperationException>(() => 483var 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 (223)
Backchannel\AppHostRpcTargetUploadTests.cs (6)
93var exception = await Assert.ThrowsAsync<InvalidOperationException>(() => target.UploadFileAsync(request)); 107var exception = await Assert.ThrowsAsync<InvalidOperationException>(() => target.UploadFileAsync(new UploadFileRequest 126var exception = await Assert.ThrowsAsync<InvalidOperationException>(() => target.UploadFileAsync(new UploadFileRequest
Backchannel\AuxiliaryBackchannelRpcTargetTests.cs (1)
942await Assert.ThrowsAsync<InvalidOperationException>(
ComputeEnvironmentEndpointResolverTests.cs (1)
144Assert.Throws<InvalidOperationException>(() =>
ComputeEnvironmentValidationTests.cs (4)
24var ex = await Assert.ThrowsAsync<InvalidOperationException>( 91var ex = Assert.Throws<InvalidOperationException>(() => environment.GetEndpointPropertyExpression(endpointReference.Property(EndpointProperty.Url)));
ContainerImagePushOptionsTests.cs (2)
178await Assert.ThrowsAsync<InvalidOperationException>(() => options.GetFullRemoteImageNameAsync(registry)); 194await Assert.ThrowsAsync<InvalidOperationException>(() => options.GetFullRemoteImageNameAsync(registry));
ContainerRegistryResourceTests.cs (4)
616var exception = Assert.Throws<InvalidOperationException>(project.Resource.GetContainerRegistry); 630var exception = Assert.Throws<InvalidOperationException>(project.Resource.GetContainerRegistry);
Dashboard\DashboardServiceTests.cs (2)
1192var exception = await Assert.ThrowsAsync<InvalidOperationException>(() =>
Dashboard\InteractionFileUploadStoreTests.cs (16)
108Assert.Throws<InvalidOperationException>(() => fileUploadStore.CreateEntry("other.bin", InteractionId, InputName)); 133Assert.Throws<InvalidOperationException>(() => fileUploadStore.CreateEntry("other.bin", InteractionId, InputName)); 348var exception = Assert.Throws<InvalidOperationException>(() => fileUploadStore.CreateEntry("excess.txt", InteractionId, InputName)); 374var exception = Assert.Throws<InvalidOperationException>(() => fileUploadStore.CreateEntry("file.txt", InteractionId, "OtherFile")); 450var exception = Assert.Throws<InvalidOperationException>(() => 467var exception = Assert.Throws<InvalidOperationException>(() => 483var exception = Assert.Throws<InvalidOperationException>(() => 497var exception = Assert.Throws<InvalidOperationException>(() => 529var exception = Assert.Throws<InvalidOperationException>(() => fileUploadStore.CreateEntry("temp.bin", InteractionId, InputName));
Dcp\DcpCliArgsTests.cs (2)
183var exception = Assert.Throws<InvalidOperationException>(() => app.Services.GetRequiredService<IOptions<DcpOptions>>().Value);
Dcp\DcpExecutorTests.cs (12)
760var exception = await Assert.ThrowsAsync<InvalidOperationException>(() => appExecutor.RunApplicationAsync()); 1364var exception = await Assert.ThrowsAsync<InvalidOperationException>(() => appExecutor.RunApplicationAsync()); 3588var exception = await Assert.ThrowsAsync<InvalidOperationException>(() => appExecutor.RunApplicationAsync()); 5067var exception = await Assert.ThrowsAsync<InvalidOperationException>(() => appExecutor.RunApplicationAsync()); 5085var exception = await Assert.ThrowsAsync<InvalidOperationException>(() => appExecutor.RunApplicationAsync()); 5479var innerException = Assert.IsType<InvalidOperationException>(exception.InnerException);
Dcp\ExecutableLaunchPlanTests.cs (2)
219var exception = await Assert.ThrowsAsync<InvalidOperationException>(
Dcp\ProcessUtilTests.cs (6)
51var exception = await Assert.ThrowsAsync<InvalidOperationException>(() => pendingProcessResult).WaitAsync(TimeSpan.FromSeconds(30)); 124var exception = await Assert.ThrowsAsync<InvalidOperationException>(() => pendingProcessResult).WaitAsync(TimeSpan.FromSeconds(30)); 192var exception = await Assert.ThrowsAsync<InvalidOperationException>(() => pendingProcessResult).WaitAsync(TimeSpan.FromSeconds(30));
Dcp\ProxylessEndpointPortAllocatorTests.cs (1)
61Assert.Throws<InvalidOperationException>(() =>
Dcp\ResourceSnapshotBuilderTests.cs (2)
140var exception = Assert.Throws<InvalidOperationException>(() =>
DebugSupportExtensionsTests.cs (6)
291var exception = await Assert.ThrowsAsync<InvalidOperationException>(() => CreateLaunchConfigurationForTestAsync(executable.Resource, ExecutableLaunchMode.Debug)); 307var exception = await Assert.ThrowsAsync<InvalidOperationException>(() => CreateLaunchConfigurationForTestAsync(executable.Resource, ExecutableLaunchMode.Debug)); 319var exception = await Assert.ThrowsAsync<InvalidOperationException>(() => CreateLaunchConfigurationForTestAsync(executable.Resource, ExecutableLaunchMode.Debug));
DeveloperCertificateServiceTests.cs (1)
68await Assert.ThrowsAsync<InvalidOperationException>(async () =>
DistributedApplicationBuilderExtensionsTests.cs (4)
13var missingException = Assert.Throws<InvalidOperationException>(() => appBuilder.CreateResourceBuilder<RedisResource>("non-existent-resource")); 22var incorrectTypeException = Assert.Throws<InvalidOperationException>(() => appBuilder.CreateResourceBuilder<PostgresServerResource>("redis"));
DistributedApplicationTests.cs (4)
1681var ex = await Assert.ThrowsAsync<InvalidOperationException>(async () => await app.StartAsync().DefaultTimeout(TestConstants.DefaultOrchestratorTestLongTimeout)); 1985var ex = await Assert.ThrowsAsync<InvalidOperationException>(async () => await app.StartAsync().DefaultTimeout(TestConstants.DefaultOrchestratorTestLongTimeout));
DockerUtilsTests.cs (1)
15var expectedException = new InvalidOperationException("probe failed");
EndpointReferenceTests.cs (16)
221var ex = Assert.Throws<InvalidOperationException>(() => endpointRef.Port); 234var ex = Assert.Throws<InvalidOperationException>(() => endpointRef.Host); 247var ex = Assert.Throws<InvalidOperationException>(() => endpointRef.Url); 302var ex = Assert.Throws<InvalidOperationException>(() => annotation.AllocatedEndpoint = mismatchedEndpoint); 420var ex = Assert.Throws<InvalidOperationException>(() => endpointRef.EndpointAnnotation); 436var ex = Assert.Throws<InvalidOperationException>(() => endpointRef.EndpointAnnotation); 449var ex = Assert.Throws<InvalidOperationException>(() => endpointRef.EndpointAnnotation); 463var ex = Assert.Throws<InvalidOperationException>(() => endpointRef.EndpointAnnotation);
ExecutionConfigurationGathererTests.cs (4)
229var inner = Assert.IsType<InvalidOperationException>(aggregate.InnerException); 264var inner = Assert.IsType<InvalidOperationException>(aggregate.InnerException);
ExternalServiceTests.cs (4)
586var ex = Assert.Throws<InvalidOperationException>(() => project.WithReference("api", uri)); 600var ex = Assert.Throws<InvalidOperationException>(() => project.WithReference("api", uri));
InteractionServiceTests.cs (8)
170await Assert.ThrowsAsync<InvalidOperationException>( 172await Assert.ThrowsAsync<InvalidOperationException>( 174await Assert.ThrowsAsync<InvalidOperationException>( 176await Assert.ThrowsAsync<InvalidOperationException>( 745var exception = Assert.Throws<InvalidOperationException>(() => new InteractionInputCollection(inputs)); 760var exception = Assert.Throws<InvalidOperationException>(() => new InteractionInputCollection(inputs));
Orchestrator\ApplicationOrchestratorTests.cs (2)
355var e = Assert.Throws<InvalidOperationException>(() => app.Services.GetService<ApplicationOrchestrator>());
Orchestrator\ParameterProcessorTests.cs (1)
172Assert.IsType<InvalidOperationException>(parameterWithError.WaitForValueTcs.Task.Exception?.InnerException);
Pipelines\DistributedApplicationPipelineTests.cs (36)
326var ex = Assert.Throws<InvalidOperationException>(() => pipeline.AddStep("step1", async (context) => await Task.CompletedTask)); 341var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => pipeline.ExecuteAsync(context)).DefaultTimeout(); 356var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => pipeline.ExecuteAsync(context)).DefaultTimeout(); 386var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => pipeline.ExecuteAsync(context)).DefaultTimeout(); 407var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => pipeline.ExecuteAsync(context)).DefaultTimeout(); 554var exception = await Assert.ThrowsAsync<InvalidOperationException>(() => pipeline.ExecuteAsync(context)).DefaultTimeout(); 575var exception = await Assert.ThrowsAsync<InvalidOperationException>(() => pipeline.ExecuteAsync(context)).DefaultTimeout(); 608var exception = Assert.Throws<InvalidOperationException>(() => 636var exception = await Assert.ThrowsAsync<InvalidOperationException>(() => pipeline.ExecuteAsync(context)).DefaultTimeout(); 658var exception = await Assert.ThrowsAsync<InvalidOperationException>(() => pipeline.ExecuteAsync(context)).DefaultTimeout(); 693var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => pipeline.ExecuteAsync(context)).DefaultTimeout(); 737var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => pipeline.ExecuteAsync(context)).DefaultTimeout(); 769await Assert.ThrowsAsync<InvalidOperationException>(() => pipeline.ExecuteAsync(context)).DefaultTimeout(); 893var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => pipeline.ExecuteAsync(context)).DefaultTimeout(); 1267await Assert.ThrowsAsync<InvalidOperationException>(() => pipeline.ExecuteAsync(context)).DefaultTimeout(); 1830var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => pipeline.ExecuteAsync(context)).DefaultTimeout(); 2142var exception = await Assert.ThrowsAsync<InvalidOperationException>( 2163var exception = await Assert.ThrowsAsync<InvalidOperationException>( 2191var exception = await Assert.ThrowsAsync<InvalidOperationException>(
ProjectResourceBuilderExtensionTests.cs (8)
68var exception = Assert.Throws<InvalidOperationException>( 88var exception = Assert.Throws<InvalidOperationException>( 118var exception = Assert.Throws<InvalidOperationException>( 136var exception = Assert.Throws<InvalidOperationException>(project.Resource.GetProjectMetadata);
ProjectResourceTests.cs (4)
1000var exception = Assert.Throws<InvalidOperationException>(resource.GetProjectMetadata); 1010var exception = Assert.Throws<InvalidOperationException>(resource.GetProjectMetadata);
PublishAsDockerfileTests.cs (6)
458var exception = Assert.Throws<InvalidOperationException>(() => container.WithBuildArg("ARG1", "value1")); 474var exception = Assert.Throws<InvalidOperationException>(() => container.WithBuildArg("ARG1", secret)); 487var exception = Assert.Throws<InvalidOperationException>(() => container.WithBuildSecret("SECRET1", secret));
Publishing\DeploymentStateManagerTests.cs (4)
78var exception = await Assert.ThrowsAsync<InvalidOperationException>( 314var exception = await Assert.ThrowsAsync<InvalidOperationException>(
Publishing\PipelineActivityReporterTests.cs (16)
149var exception = await Assert.ThrowsAsync<InvalidOperationException>( 166var exception = await Assert.ThrowsAsync<InvalidOperationException>( 253var exception = await Assert.ThrowsAsync<InvalidOperationException>( 270var exception = await Assert.ThrowsAsync<InvalidOperationException>( 324var exception = await Assert.ThrowsAsync<InvalidOperationException>( 546var updateException = await Assert.ThrowsAsync<InvalidOperationException>( 556var createException = await Assert.ThrowsAsync<InvalidOperationException>( 703var exception = await Assert.ThrowsAsync<InvalidOperationException>(() =>
Publishing\ResourceContainerImageManagerTests.cs (12)
491var exception = await Assert.ThrowsAsync<InvalidOperationException>(() => 629var exception = await Assert.ThrowsAsync<InvalidOperationException>(() => 1398var exception = await Assert.ThrowsAsync<InvalidOperationException>( 1433var exception = await Assert.ThrowsAsync<InvalidOperationException>( 1476var exception = await Assert.ThrowsAsync<InvalidOperationException>( 1509var exception = await Assert.ThrowsAsync<InvalidOperationException>(
ResourceBuilderLifetimeTests.cs (6)
36var exception = Assert.Throws<InvalidOperationException>((Action)ConfigureLifetime); 139var exception = Assert.Throws<InvalidOperationException>((Action)ConfigureLifetime); 153var exception = Assert.Throws<InvalidOperationException>(() => containerA.Resource.GetLifetimeType());
ResourceNotificationTests.cs (2)
1333var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => waitTask.DefaultTimeout());
ValueSnapshotTests.cs (13)
77var exception = new InvalidOperationException("Test error"); 81var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => snapshot.GetValueAsync()); 89var exception = new InvalidOperationException("Test error"); 96var ex1 = await Assert.ThrowsAsync<InvalidOperationException>(() => task1); 97var ex2 = await Assert.ThrowsAsync<InvalidOperationException>(() => task2); 107var exception = new InvalidOperationException("Test error"); 110await Assert.ThrowsAsync<InvalidOperationException>(() => snapshot.GetValueAsync()); 126var exception = new InvalidOperationException("Error occurred"); 129var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => snapshot.GetValueAsync());
WithOtlpExporterTests.cs (1)
70await Assert.ThrowsAsync<InvalidOperationException>(() =>
WithReferenceTests.cs (1)
528Assert.Throws<InvalidOperationException>(() => builder.AddProject<ProjectA>("projecta").WithReference("petstore", new Uri("petstore.swagger.io", UriKind.Relative)));
WithTerminalTests.cs (1)
1051Assert.Throws<InvalidOperationException>(() => resource.WithTerminal());
WithUrlsTests.cs (1)
119catch (InvalidOperationException ex)
Aspire.Hosting.TestUtilities (1)
Helpers\Network.cs (1)
22/// <exception cref="InvalidOperationException">Thrown when no available port is found within the timeout period.</exception>
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)
31/// <exception cref="InvalidOperationException">If required ConnectionString is not provided in configuration section</exception> 61/// <exception cref="InvalidOperationException">If required ConnectionString is not provided in configuration section</exception> 90/// <exception cref="InvalidOperationException">If required ConnectionString is not provided in configuration section</exception> 126/// <exception cref="InvalidOperationException">If required ConnectionString is not provided in configuration section</exception> 155/// <exception cref="InvalidOperationException">If required ConnectionString is not provided in configuration section</exception> 178/// <exception cref="InvalidOperationException">If required ConnectionString is not provided in configuration section</exception>
Aspire.Microsoft.Azure.Cosmos.Tests (10)
AspireMicrosoftAzureCosmosExtensionsTests.cs (10)
172var exception = Assert.Throws<InvalidOperationException>(host.Services.GetRequiredService<Container>); 189var exception = Assert.Throws<InvalidOperationException>(() => host.Services.GetKeyedService<Container>(serviceKey)); 205var exception = Assert.Throws<InvalidOperationException>(host.Services.GetRequiredService<Database>); 221var exception = Assert.Throws<InvalidOperationException>(() => host.Services.GetRequiredKeyedService<Database>(serviceKey)); 492var 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)
35/// <exception cref="InvalidOperationException">Thrown when mandatory <see cref="EntityFrameworkCoreCosmosSettings.ConnectionString"/> is not provided.</exception> 78/// <exception cref="InvalidOperationException">Thrown when mandatory <see cref="EntityFrameworkCoreCosmosSettings.ConnectionString"/> is not provided.</exception> 177/// <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)
275var 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.Microsoft.Extensions.Configuration.AzureAppConfiguration (1)
AspireAppConfigurationExtensions.cs (1)
46/// <exception cref="InvalidOperationException">Thrown when mandatory <see cref="AzureAppConfigurationSettings.Endpoint"/> is not provided.</exception>
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.MongoDB.EntityFrameworkCore (2)
AspireMongoDBEntityFrameworkCoreExtensions.cs (2)
35/// <exception cref="InvalidOperationException">Thrown when mandatory <see cref="MongoDBEntityFrameworkCoreSettings.ConnectionString"/> is not provided.</exception> 103/// <exception cref="InvalidOperationException">Thrown when mandatory <see cref="DbContext"/> is not registered in DI.</exception>
Aspire.MongoDB.EntityFrameworkCore.Tests (6)
AspireMongoDBEntityFrameworkCoreExtensionsTests.cs (4)
74var exception = Assert.Throws<InvalidOperationException>(host.Services.GetRequiredService<TestDbContext>); 227var exception = Assert.Throws<InvalidOperationException>(() => builder.AddMongoDbContext<TestDbContext>("mongodb", "testdb"));
EnrichMongoDbTests.cs (2)
33var exception = Assert.Throws<InvalidOperationException>(() => builder.EnrichMongoDbContext<TestDbContext>());
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)
54/// <exception cref="InvalidOperationException">Thrown when mandatory <see cref="NatsClientSettings.ConnectionString"/> is not provided.</exception> 110/// <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)
137var 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> 148/// <exception cref="InvalidOperationException">Thrown when mandatory <see cref="DbContext"/> is not registered in DI.</exception>
Aspire.Pomelo.EntityFrameworkCore.MySql.Tests (8)
AspireEFMySqlExtensionsTests.cs (2)
272var exception = Assert.Throws<InvalidOperationException>(() => builder.AddMySqlDbContext<TestDbContext>("mysql"));
EnrichMySqlTests.cs (6)
51var exception = Assert.Throws<InvalidOperationException>(() => builder.EnrichMySqlDbContext<TestDbContext>()); 124var exception = Assert.Throws<InvalidOperationException>(host.Services.GetRequiredService<TestDbContext>); 319var 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)
195InvalidOperationException innerException = new("Inner exception");
Aspire.RabbitMQ.Client.v6.Tests (1)
tests\Aspire.RabbitMQ.Client.Tests\AspireRabbitMQLoggingTests.cs (1)
195InvalidOperationException 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"))
Aspire.TerminalHost (4)
src\Shared\ProcessStartTimeHelper.cs (4)
91catch (Exception ex) when (ex is ArgumentException or InvalidOperationException or Win32Exception) 113catch (Exception ex) when (ex is ArgumentException or InvalidOperationException or Win32Exception) 205catch (InvalidOperationException) 256catch (InvalidOperationException)
Aspire.TestUtilities (1)
ProcessExtensions.cs (1)
20catch (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());
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\roslyn\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>
dotnet (4)
Commands\Run\RunPlan.cs (1)
23/// <exception cref="InvalidOperationException">The run tier does not represent managed build planning.</exception>
Commands\Test\MTP\TestApplication.cs (1)
172catch (InvalidOperationException ex)
Commands\Tool\Install\ToolInstallGlobalOrToolPathCommand.cs (1)
373catch (InvalidOperationException)
Commands\Tool\Uninstall\ToolUninstallGlobalOrToolPathCommand.cs (1)
63catch (InvalidOperationException)
dotnet-aot (1)
src\sdk\src\Cli\dotnet\Commands\Run\RunPlan.cs (1)
23/// <exception cref="InvalidOperationException">The run tier does not represent managed build planning.</exception>
dotnet-dev-certs (2)
src\aspnetcore\src\Shared\CertificateGeneration\CertificateManager.cs (2)
268/// <exception cref="InvalidOperationException">There was an error ensuring the certificate exists.</exception> 942/// <exception cref="InvalidOperationException">If a key with the specified minimum size cannot be created.</exception>
dotnet-format (2)
Utilities\ProcessRunner.cs (1)
136catch (InvalidOperationException)
Workspaces\MSBuildWorkspaceLoader.cs (1)
61catch (InvalidOperationException)
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\roslyn\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\roslyn\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\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Diagnostics\DiagnosticSeverityExtensions.cs (1)
18/// <exception cref="InvalidOperationException">
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Diagnostics\ReportDiagnosticExtensions.cs (1)
20/// <exception cref="InvalidOperationException">
ILLink.RoslynAnalyzer (6)
src\runtime\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>
Infrastructure.Tests (5)
Shared\GitCli.cs (1)
19/// trimmed stdout. Throws <see cref="InvalidOperationException"/> on a non-zero exit (with stderr in
TestTriggerMap\SelectTestsCliTests.cs (4)
434var ex = Assert.Throws<InvalidOperationException>(() => 578var ex = Assert.Throws<InvalidOperationException>(() =>
Microsoft.Agents.AI.ProjectTemplates.Tests (1)
ProcessExtensions.cs (1)
17catch (InvalidOperationException ex) when (ex.Message.Contains("No process is associated with this object"))
Microsoft.Analyzers.Local.Tests (6)
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" });
Microsoft.AspNetCore.Antiforgery (1)
src\aspnetcore\src\Shared\Buffers\RefPooledArrayBufferWriter.cs (1)
95/// <exception cref="InvalidOperationException">Thrown if advancing would exceed buffer capacity.</exception>
Microsoft.AspNetCore.AsyncState (2)
parent\parent\parent\eng\MSBuild\parent\parent\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.DeviceBoundSessions (3)
DeviceBoundSessionChallengeProtector.cs (2)
80catch (Exception ex) when (ex is CborContentException or InvalidOperationException) 127catch (Exception ex) when (ex is CborContentException or InvalidOperationException)
DeviceBoundSessionHttpContextExtensions.cs (1)
46/// <exception cref="InvalidOperationException">
Microsoft.AspNetCore.Components (4)
CacheBehavior.cs (1)
19/// Using the component inside a CacheView throws an <see cref="InvalidOperationException"/>.
PersistentState\ComponentStatePersistenceManager.cs (1)
158/// <exception cref="InvalidOperationException">when the render mode is already set.</exception>
Rendering\RenderTreeBuilder.cs (1)
788/// <exception cref="InvalidOperationException">Thrown when the frame at <paramref name="frameIndex"/> is not of type <see cref="RenderTreeFrameType.Attribute"/>.</exception>
src\aspnetcore\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.Endpoints (2)
Discovery\ComponentApplicationBuilder.cs (1)
70/// <exception cref="InvalidOperationException">When the assembly has already been added
src\aspnetcore\src\Shared\Buffers\RefPooledArrayBufferWriter.cs (1)
95/// <exception cref="InvalidOperationException">Thrown if advancing would exceed buffer capacity.</exception>
Microsoft.AspNetCore.Components.Forms (5)
EditContext.cs (4)
52/// resulting tasks; <see cref="Validate"/> throws <see cref="InvalidOperationException"/> if a handler 233/// <see cref="InvalidOperationException"/>; use <see cref="ValidateAsync"/> for async validators. 236/// <exception cref="InvalidOperationException">A handler registered an asynchronous validation task.</exception> 363/// <exception cref="InvalidOperationException"><paramref name="validator"/> returned a <see langword="null"/> task.</exception>
ValidationRequestedEventArgs.cs (1)
40/// <exception cref="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.DataProtection (7)
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)
src\aspnetcore\src\Shared\Buffers\RefPooledArrayBufferWriter.cs (1)
95/// <exception cref="InvalidOperationException">Thrown if advancing would exceed buffer capacity.</exception>
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.MicroBenchmarks (1)
src\aspnetcore\src\Shared\Buffers\RefPooledArrayBufferWriter.cs (1)
95/// <exception cref="InvalidOperationException">Thrown if advancing would exceed buffer capacity.</exception>
Microsoft.AspNetCore.DeveloperCertificates.XPlat (2)
src\aspnetcore\src\Shared\CertificateGeneration\CertificateManager.cs (2)
268/// <exception cref="InvalidOperationException">There was an error ensuring the certificate exists.</exception> 942/// <exception cref="InvalidOperationException">If a key with the specified minimum size cannot be created.</exception>
Microsoft.AspNetCore.Diagnostics (1)
ExceptionHandler\ExceptionHandlerMiddlewareImpl.cs (1)
269$"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.Middleware (1)
Logging\Internal\LoggingRedactionOptionsConfigureOptions.cs (1)
120private static InvalidOperationException CreateBindingException(string path, Type type, Exception innerException)
Microsoft.AspNetCore.Diagnostics.Middleware.Tests (9)
Logging\AcceptanceTests.cs (3)
655var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => client.GetAsync(requestPath)); 986Assert.IsType<InvalidOperationException>(logCollector.GetSnapshot()[0].Exception);
Logging\HttpLoggingServiceExtensionsTests.cs (4)
111var exception = Assert.Throws<InvalidOperationException>( 130var exception = Assert.Throws<InvalidOperationException>(
Logging\LoggingOptionsValidationTests.cs (2)
28var ex = Assert.Throws<InvalidOperationException>(
Microsoft.AspNetCore.HeaderParsing (2)
parent\parent\parent\eng\MSBuild\parent\parent\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.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.Connections (1)
Internal\HttpConnectionDispatcher.cs (1)
662catch (InvalidOperationException ex)
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.HttpLogging (4)
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>
src\aspnetcore\src\Shared\Buffers\RefPooledArrayBufferWriter.cs (1)
95/// <exception cref="InvalidOperationException">Thrown if advancing would exceed buffer capacity.</exception>
Microsoft.AspNetCore.Identity (1)
Passkeys\AttestationObject.cs (1)
54catch (InvalidOperationException ex)
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.Formatters.Xml (2)
XmlSerializerInputFormatter.cs (2)
145catch (InvalidOperationException exception) when (exception.InnerException != null && 154catch (InvalidOperationException exception) when (exception.InnerException is FormatException ||
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.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.Testing (3)
WebApplicationFactory.cs (3)
188/// <exception cref="InvalidOperationException">Thrown, if this method is called after the WebHostFactory has been initialized.</exception> 202/// <exception cref="InvalidOperationException">Thrown, if this method is called after the WebHostFactory has been initialized.</exception> 267/// <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.OpenApi (1)
Services\Schemas\OpenApiSchemaService.cs (1)
606catch (InvalidOperationException)
Microsoft.AspNetCore.OpenApi.SourceGenerators (1)
XmlComments\XmlComment.InheritDoc.cs (1)
434catch (InvalidOperationException)
Microsoft.AspNetCore.Razor.Utilities.Shared (49)
src\roslyn\src\Razor\src\Shared\Microsoft.AspNetCore.Razor.SharedUtilities\Assumed.cs (4)
109/// <exception cref="InvalidOperationException"/> 120/// <exception cref="InvalidOperationException"/> 131/// <exception cref="InvalidOperationException"/> 142/// <exception cref="InvalidOperationException"/>
src\roslyn\src\Razor\src\Shared\Microsoft.AspNetCore.Razor.SharedUtilities\ImmutableArrayExtensions.cs (4)
675/// <exception cref="InvalidOperationException"> 736/// <exception cref="InvalidOperationException"> 832/// <exception cref="InvalidOperationException"> 877/// <exception cref="InvalidOperationException">
src\roslyn\src\Razor\src\Shared\Microsoft.AspNetCore.Razor.SharedUtilities\PooledObjects\PooledArrayBuilder`1.cs (19)
867/// <exception cref="InvalidOperationException"> 882/// <exception cref="InvalidOperationException"> 910/// <exception cref="InvalidOperationException"> 1067/// <exception cref="InvalidOperationException"> 1082/// <exception cref="InvalidOperationException"> 1111/// <exception cref="InvalidOperationException"> 1273/// <exception cref="InvalidOperationException"> 1276/// <exception cref="InvalidOperationException"> 1299/// <exception cref="InvalidOperationException"> 1302/// <exception cref="InvalidOperationException"> 1345/// <exception cref="InvalidOperationException"> 1348/// <exception cref="InvalidOperationException"> 1386/// <exception cref="InvalidOperationException"> 1410/// <exception cref="InvalidOperationException"> 1435/// <exception cref="InvalidOperationException"> 1475/// <exception cref="InvalidOperationException"> 1515/// <exception cref="InvalidOperationException"> 1558/// <exception cref="InvalidOperationException"> 1591/// This is present to help the JIT inline methods that need to throw an <see cref="InvalidOperationException"/>.
src\roslyn\src\Razor\src\Shared\Microsoft.AspNetCore.Razor.SharedUtilities\ReadOnlyListExtensions.cs (18)
255/// <exception cref="InvalidOperationException"> 273/// <exception cref="InvalidOperationException"> 304/// <exception cref="InvalidOperationException"> 478/// <exception cref="InvalidOperationException"> 496/// <exception cref="InvalidOperationException"> 527/// <exception cref="InvalidOperationException"> 701/// <exception cref="InvalidOperationException"> 704/// <exception cref="InvalidOperationException"> 730/// <exception cref="InvalidOperationException"> 733/// <exception cref="InvalidOperationException"> 779/// <exception cref="InvalidOperationException"> 782/// <exception cref="InvalidOperationException"> 823/// <exception cref="InvalidOperationException"> 850/// <exception cref="InvalidOperationException"> 877/// <exception cref="InvalidOperationException"> 919/// <exception cref="InvalidOperationException"> 961/// <exception cref="InvalidOperationException"> 1006/// <exception cref="InvalidOperationException">
src\roslyn\src\Razor\src\Shared\Microsoft.AspNetCore.Razor.SharedUtilities\ThrowHelper.cs (2)
204/// Throws an <see cref="InvalidOperationException"/> with a message. 218/// Throws an <see cref="InvalidOperationException"/> with a message.
Threading\LazyValue`1.cs (1)
76/// <exception cref="InvalidOperationException">
Threading\LazyValue`2.cs (1)
99/// <exception cref="InvalidOperationException">
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.Server.HttpSys (2)
IHttpSysRequestPropertyFeature.cs (2)
34/// <exception cref="InvalidOperationException">If HttpSys does not support querying the TLS Client Hello.</exception> 68/// <exception cref="InvalidOperationException">If the installed Windows HTTP Server API does not support HttpQueryRequestProperty.</exception>
Microsoft.AspNetCore.Server.Kestrel.Core (17)
HttpsConfigurationService.cs (1)
119/// <exception cref="InvalidOperationException">If initialization is not possible.</exception>
Internal\Certificates\CertificateConfigLoader.cs (1)
258private static InvalidOperationException CreateErrorGettingPrivateKeyException(string keyPath, Exception ex)
Internal\Http\Http1Connection.cs (3)
552catch (InvalidOperationException) 677catch (InvalidOperationException) 713catch (InvalidOperationException)
Internal\Http\Http1MessageBody.cs (2)
72catch (InvalidOperationException ex) 107catch (InvalidOperationException ex)
Internal\Http\HttpParser.cs (1)
717catch (InvalidOperationException)
Internal\Http\HttpProtocol.cs (2)
907private InvalidOperationException GetTooManyBytesWrittenException(int count) 1352var ex = new InvalidOperationException(message);
Internal\Http2\Http2Connection.cs (1)
1691catch (InvalidOperationException)
Internal\Http2\Http2Stream.cs (1)
463catch (InvalidOperationException)
Internal\Http3\Http3Stream.cs (2)
422catch (InvalidOperationException) 1290catch (InvalidOperationException)
src\aspnetcore\src\Shared\Buffers\RefPooledArrayBufferWriter.cs (1)
95/// <exception cref="InvalidOperationException">Thrown if advancing would exceed buffer capacity.</exception>
src\aspnetcore\src\Shared\CertificateGeneration\CertificateManager.cs (2)
268/// <exception cref="InvalidOperationException">There was an error ensuring the certificate exists.</exception> 942/// <exception cref="InvalidOperationException">If a key with the specified minimum size cannot be created.</exception>
Microsoft.AspNetCore.Server.Kestrel.Transport.DirectTls (1)
TlsEventPump.cs (1)
784catch (InvalidOperationException)
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.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.Testing (2)
parent\parent\parent\eng\MSBuild\parent\parent\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)
112Assert.IsType<InvalidOperationException>(exception); 124Assert.IsType<InvalidOperationException>(exception); 144Assert.IsType<InvalidOperationException>(exception); 191Assert.IsType<InvalidOperationException>(exception); 206Assert.IsType<InvalidOperationException>(exception);
Microsoft.AspNetCore.WebUtilities (1)
FormPipeReader.cs (1)
407catch (InvalidOperationException ex)
Microsoft.Bcl.Cryptography (4)
System\Security\Cryptography\X509Certificates\X509CertificateKeyAccessors.cs (4)
116/// <exception cref="InvalidOperationException"> 239/// <exception cref="InvalidOperationException"> 373/// <exception cref="InvalidOperationException"> 492/// <exception cref="InvalidOperationException">
Microsoft.Build (54)
BackEnd\BuildManager\BuildManager.cs (13)
496/// <exception cref="InvalidOperationException">Thrown if a build is already in progress.</exception> 527/// <exception cref="InvalidOperationException">Thrown if a build is already in progress.</exception> 1013/// <exception cref="InvalidOperationException">Thrown if StartBuild has not been called or if EndBuild has been called.</exception> 1021/// <exception cref="InvalidOperationException">Thrown if StartBuild has not been called or if EndBuild has been called.</exception> 1029/// <exception cref="InvalidOperationException">Thrown if StartBuild has not been called or if EndBuild has been called.</exception> 1068/// <exception cref="InvalidOperationException">Thrown if StartBuild has not been called or if EndBuild has been called.</exception> 1076/// <exception cref="InvalidOperationException">Thrown if StartBuild has not been called or if EndBuild has been called.</exception> 1087/// <exception cref="InvalidOperationException">Thrown if there is no build in progress.</exception> 1467/// <exception cref="InvalidOperationException">Thrown if a build is already in progress.</exception> 1495/// <exception cref="InvalidOperationException">Thrown if a build is already in progress.</exception> 1503/// <exception cref="InvalidOperationException">Thrown if a build is already in progress.</exception> 2478/// Verifies the BuildManager is in the required state, and throws a <see cref="System.InvalidOperationException"/> if it is not. 2486/// Verifies the BuildManager is in the required state, and throws a <see cref="System.InvalidOperationException"/> if it is not.
BackEnd\BuildManager\BuildSubmission.cs (3)
62/// <exception cref="InvalidOperationException">The request has already been started or is already complete.</exception> 170/// <exception cref="InvalidOperationException">The request has already been started or is already complete.</exception> 185/// <exception cref="System.InvalidOperationException">The request has already been started or is already complete.</exception>
BackEnd\Client\MSBuildClient.cs (1)
862catch (InvalidOperationException)
BackEnd\Components\Communications\NodeProviderOutOfProcBase.cs (1)
424catch (InvalidOperationException)
BackEnd\Components\RequestBuilder\BatchingEngine.cs (1)
421catch (InvalidOperationException e)
BackEnd\TaskExecutionHost\TaskExecutionHost.cs (1)
695catch (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)
1644/// An <see cref="InvalidOperationException"/> is thrown if the project root element is not associated with any file on disk. 1657/// An <see cref="InvalidOperationException"/> is thrown if the path does not exist. 1689/// Otherwise, an <see cref="InvalidOperationException"/> is thrown when unsaved changes are present.
Construction\Solution\SolutionFile.cs (2)
653catch (Exception e) when (e is JsonException || e is KeyNotFoundException || e is InvalidOperationException) 676catch (Exception e) when (e is JsonException || e is KeyNotFoundException || e is InvalidOperationException)
Definition\Project.cs (2)
92/// When this property is set to true, the previous item operations throw an <see cref="InvalidOperationException" /> 2012/// When this property is set to true, the previous item operations throw an <exception cref="InvalidOperationException"></exception>
Definition\ProjectCollection.cs (1)
1529/// <exception cref="InvalidOperationException">
Definition\ProjectEvaluationStage.cs (1)
23/// stopping at <see cref="Properties"/>) throws <see cref="System.InvalidOperationException"/>.
Errors\InternalLoggerException.cs (3)
38/// <exception cref="InvalidOperationException"></exception> 51/// <exception cref="InvalidOperationException"></exception> 66/// <exception cref="InvalidOperationException"></exception>
Evaluation\Expander.ItemExpander.Transforms.cs (7)
128catch (Exception e) when (!ExceptionHandling.NotExpectedException(e) || e is InvalidOperationException) 412catch (Exception ex) when (ex is ArgumentException || ex is InvalidOperationException) 812catch (Exception ex) when (ex is ArgumentException || ex is InvalidOperationException) 852catch (Exception ex) when (ex is ArgumentException || ex is InvalidOperationException) 890catch (Exception ex) when (ex is ArgumentException || ex is InvalidOperationException) 931catch (Exception ex) when (ex is ArgumentException || ex is InvalidOperationException) 989catch (InvalidOperationException ex)
Evaluation\Expander.MetadataExpander.cs (1)
82catch (InvalidOperationException ex)
Graph\GraphBuildSubmission.cs (2)
37/// <exception cref="InvalidOperationException">The request has already been started or is already complete.</exception> 52/// <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">
Instance\ProjectInstance.cs (2)
1234/// throw <see cref="InvalidOperationException"/>. 1242/// Throws <see cref="InvalidOperationException"/> if this instance was produced by a partial
Logging\BinaryLogger\BuildEventArgsWriter.cs (1)
804catch (Exception ex) when (ex is ArgumentOutOfRangeException or InvalidOperationException)
src\msbuild\src\Shared\NodeEndpointOutOfProcBase.cs (1)
512catch (InvalidOperationException)
src\msbuild\src\Shared\ResourceUtilities.cs (1)
306catch (InvalidOperationException e)
src\msbuild\src\Shared\TaskLoggingHelper.cs (1)
207/// <exception cref="InvalidOperationException">Thrown when the <c>TaskResources</c> property of the owner task is not set.</exception>
src\msbuild\src\Shared\TaskLoggingHelperExtension.cs (1)
90/// <exception cref="InvalidOperationException">Thrown when the <c>TaskResources</c> property of the owner task is not set.</exception>
Microsoft.Build.Framework (10)
Collections\RefArrayBuilder.cs (6)
479/// <exception cref="InvalidOperationException">The builder is empty.</exception> 499/// <exception cref="InvalidOperationException">No element satisfies the condition.</exception> 521/// <exception cref="InvalidOperationException">No element satisfies the condition.</exception> 621/// <exception cref="InvalidOperationException">The builder is empty.</exception> 641/// <exception cref="InvalidOperationException">No element satisfies the condition.</exception> 663/// <exception cref="InvalidOperationException">No element satisfies the condition.</exception>
ExceptionHandling.cs (1)
198|| e is InvalidOperationException
ItemSpecModifiers.cs (1)
386/// <exception cref="InvalidOperationException">Thrown when the item-spec is not a path.</exception>
src\msbuild\artifacts\.packages\microsoft.codeanalysis.contracts\5.0.0-1.25277.114\contentFiles\cs\net9.0\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 (2)
src\roslyn\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 (8)
AssemblyDependency\ResolveAssemblyReference.cs (2)
2647catch (InvalidOperationException e) 2683catch (InvalidOperationException e)
AssignLinkMetadata.cs (1)
63catch (InvalidOperationException e)
GenerateResource.cs (1)
1556catch (InvalidOperationException e)
ManifestUtil\DeployManifest.cs (1)
196catch (InvalidOperationException)
src\msbuild\src\Shared\NodePipeServer.cs (1)
141catch (InvalidOperationException)
src\msbuild\src\Shared\ResourceUtilities.cs (1)
306catch (InvalidOperationException e)
src\msbuild\src\Shared\TaskLoggingHelperExtension.cs (1)
90/// <exception cref="InvalidOperationException">Thrown when the <c>TaskResources</c> property of the owner task is not set.</exception>
Microsoft.Build.Utilities.Core (5)
src\msbuild\src\Shared\ResourceUtilities.cs (1)
306catch (InvalidOperationException e)
src\msbuild\src\Shared\TaskLoggingHelper.cs (1)
207/// <exception cref="InvalidOperationException">Thrown when the <c>TaskResources</c> property of the owner task is not set.</exception>
ToolTask.cs (3)
838catch (InvalidOperationException) 1040catch (InvalidOperationException) 1089catch (InvalidOperationException)
Microsoft.CodeAnalysis (54)
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)
355/// <exception cref="InvalidOperationException">The operation is a part of Control Flow Graph</exception>
SourceGeneration\IncrementalContexts.cs (2)
178/// an <see cref="InvalidOperationException"/>. 194/// an <see cref="InvalidOperationException"/>.
src\roslyn\src\Dependencies\CodeAnalysis.Debugging\CustomDebugInfoEncoder.cs (1)
42/// <exception cref="InvalidOperationException">More than <see cref="byte.MaxValue"/> records added.</exception>
src\roslyn\src\Dependencies\CodeAnalysis.Debugging\CustomDebugInfoReader.cs (4)
55/// <exception cref="InvalidOperationException"></exception> 72/// <exception cref="InvalidOperationException"></exception> 213/// <exception cref="InvalidOperationException">Bad data.</exception> 242/// <exception cref="InvalidOperationException">Bad data.</exception>
src\roslyn\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)
188/// <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>
Symbols\ISymbolInternal.cs (1)
99/// <exception cref="InvalidOperationException">If the symbol has no locations.</exception>
Symbols\ITypeSymbol.cs (1)
171/// <exception cref="InvalidOperationException">If this is not a closed type.</exception>
Syntax\ChildSyntaxList.cs (2)
369/// <exception cref="System.InvalidOperationException">The list is empty.</exception> 384/// <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\SyntaxNodeExtensions.cs (6)
127/// If the token is not part of a <see cref="SyntaxTokenList"/>, an <see cref="InvalidOperationException"/> will be thrown.</param> 129/// <exception cref="InvalidOperationException">Thrown when <paramref name="tokenInList"/> is not an element of a <see cref="SyntaxTokenList"/>.</exception> 144/// an <see cref="InvalidOperationException"/> will be thrown.</param> 146/// <exception cref="InvalidOperationException">Thrown when <paramref name="tokenInList"/> is not an element of a <see cref="SyntaxTokenList"/>.</exception> 161/// an <see cref="InvalidOperationException"/> will be thrown.</param> 163/// <exception cref="InvalidOperationException">Thrown when <paramref name="tokenInList"/> is not an element of a <see cref="SyntaxTokenList"/>.</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\roslyn\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\roslyn\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\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Diagnostics\DiagnosticSeverityExtensions.cs (1)
18/// <exception cref="InvalidOperationException">
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Diagnostics\ReportDiagnosticExtensions.cs (1)
20/// <exception cref="InvalidOperationException">
Microsoft.CodeAnalysis.AnalyzerUtilities (6)
src\roslyn\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\roslyn\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\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Diagnostics\DiagnosticSeverityExtensions.cs (1)
18/// <exception cref="InvalidOperationException">
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Diagnostics\ReportDiagnosticExtensions.cs (1)
20/// <exception cref="InvalidOperationException">
Microsoft.CodeAnalysis.CodeStyle (6)
src\roslyn\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\roslyn\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\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Diagnostics\DiagnosticSeverityExtensions.cs (1)
18/// <exception cref="InvalidOperationException">
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Diagnostics\ReportDiagnosticExtensions.cs (1)
20/// <exception cref="InvalidOperationException">
Microsoft.CodeAnalysis.CSharp (15)
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)
845/// <exception cref="System.InvalidOperationException">If this is not a reduced extension method.</exception>
Symbols\NamedTypeSymbol.cs (1)
2945/// For other symbols, throws <see cref="System.InvalidOperationException"/>.
Symbols\ParameterSymbol.cs (1)
230/// <exception cref="InvalidOperationException">The parameter has no default value.</exception>
Syntax\SyntaxReplacer.cs (2)
327private static InvalidOperationException GetItemNotListElementException() 332private static InvalidOperationException GetTokenNotListElementException()
Microsoft.CodeAnalysis.Extensions.Package (4)
Diagnostics\DiagnosticSeverityExtensions.cs (1)
18/// <exception cref="InvalidOperationException">
Diagnostics\ReportDiagnosticExtensions.cs (1)
20/// <exception cref="InvalidOperationException">
src\roslyn\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\EditAndContinueDebugInfoReader.cs (1)
104catch (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\roslyn\src\Dependencies\CodeAnalysis.Debugging\CustomDebugInfoEncoder.cs (1)
42/// <exception cref="InvalidOperationException">More than <see cref="byte.MaxValue"/> records added.</exception>
src\roslyn\src\Dependencies\CodeAnalysis.Debugging\CustomDebugInfoReader.cs (4)
55/// <exception cref="InvalidOperationException"></exception> 72/// <exception cref="InvalidOperationException"></exception> 213/// <exception cref="InvalidOperationException">Bad data.</exception> 242/// <exception cref="InvalidOperationException">Bad data.</exception>
Microsoft.CodeAnalysis.Razor.Compiler (4)
Language\Extensions\DefaultTagHelperTargetExtension.cs (1)
274.WriteStartNewObject(nameof(InvalidOperationException))
Language\Extensions\PreallocatedAttributeTargetExtension.cs (1)
112.WriteStartNewObject(nameof(InvalidOperationException))
Language\Syntax\ChildSyntaxList.cs (2)
356/// <exception cref="InvalidOperationException">The list is empty.</exception> 373/// <exception cref="InvalidOperationException">The list is empty.</exception>
Microsoft.CodeAnalysis.ResxSourceGenerator (6)
src\roslyn\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\roslyn\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\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Diagnostics\DiagnosticSeverityExtensions.cs (1)
18/// <exception cref="InvalidOperationException">
src\roslyn\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.VisualBasic (3)
Symbols\MethodSymbol.vb (1)
794''' <exception cref="System.InvalidOperationException">If this is not a reduced extension method.</exception>
Syntax\SyntaxReplacer.vb (2)
227Private Shared Function GetItemNotListElementException() As InvalidOperationException 231Private Shared Function GetTokenNotListElementException() 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\roslyn\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\roslyn\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\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Diagnostics\DiagnosticSeverityExtensions.cs (1)
18/// <exception cref="InvalidOperationException">
src\roslyn\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)
603/// <exception cref="InvalidOperationException">Document specified in <paramref name="documentIds"/> does not exist in project <paramref name="projectId"/>.</exception> 641/// <exception cref="InvalidOperationException">The project already references the target project.</exception> 655/// <exception cref="InvalidOperationException">The solution does not contain <paramref name="projectId"/>.</exception> 656/// <exception cref="InvalidOperationException">The project already references the target project.</exception> 657/// <exception cref="InvalidOperationException">Adding the project reference would create a circular dependency.</exception> 718/// <exception cref="InvalidOperationException">The solution does not contain <paramref name="projectId"/>.</exception> 738/// <exception cref="InvalidOperationException">The solution does not contain <paramref name="projectId"/>.</exception> 739/// <exception cref="InvalidOperationException">The project already contains the specified reference.</exception> 753/// <exception cref="InvalidOperationException">The solution does not contain <paramref name="projectId"/>.</exception> 754/// <exception cref="InvalidOperationException">The project already contains the specified reference.</exception> 780/// <exception cref="InvalidOperationException">The solution does not contain <paramref name="projectId"/>.</exception> 781/// <exception cref="InvalidOperationException">The project does not contain the specified reference.</exception> 803/// <exception cref="InvalidOperationException">The solution does not contain <paramref name="projectId"/>.</exception> 819/// <exception cref="InvalidOperationException">The solution does not contain <paramref name="projectId"/>.</exception> 833/// <exception cref="InvalidOperationException">The solution does not contain <paramref name="projectId"/>.</exception> 834/// <exception cref="InvalidOperationException">The project already contains the specified reference.</exception> 867/// <exception cref="InvalidOperationException">The solution does not contain <paramref name="projectId"/>.</exception> 868/// <exception cref="InvalidOperationException">The project does not contain the specified reference.</exception> 897/// <exception cref="InvalidOperationException">The solution does not contain <paramref name="projectId"/>.</exception> 922/// <exception cref="InvalidOperationException">The solution already contains the specified reference.</exception> 946/// <exception cref="InvalidOperationException">The solution does not contain the specified reference.</exception>
Microsoft.CodeAnalysis.Workspaces.MSBuild.Contracts (2)
src\roslyn\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.Data.Analysis (1)
DataFrame.cs (1)
704/// <exception cref="InvalidOperationException">
Microsoft.Data.Analysis.Tests (2)
DataFrameTests.cs (1)
1646Assert.Throws<InvalidOperationException>(() => df.Melt(new string[] { "id", "A", "B" }));
TextFieldParserTests.cs (1)
291Assert.Throws<InvalidOperationException>(() => parser.ReadFields());
Microsoft.Diagnostics.DataContractReader (1)
ContractDescriptorTarget.cs (1)
419catch (InvalidOperationException ex)
Microsoft.Diagnostics.DataContractReader.Contracts (1)
Contracts\ExecutionManager\ExecutionManagerCore.cs (1)
313catch (InvalidOperationException)
Microsoft.Diagnostics.DataContractReader.Legacy (1)
SOSDacImpl.cs (1)
4887catch (InvalidOperationException)
Microsoft.Diagnostics.NETCore.Client (1)
DiagnosticsIpc\IpcTcpSocketEndPoint.cs (1)
83catch (InvalidOperationException)
Microsoft.DiaSymReader (18)
Writer\SymUnmanagedWriter.cs (18)
47/// <exception cref="InvalidOperationException">Writes are not allowed to the underlying stream.</exception> 55/// <exception cref="InvalidOperationException">Writes are not allowed to the underlying stream.</exception> 63/// <exception cref="InvalidOperationException">Writes are not allowed to the underlying stream.</exception> 71/// <exception cref="InvalidOperationException">Writes are not allowed to the underlying stream.</exception> 79/// <exception cref="InvalidOperationException">Writes are not allowed to the underlying stream.</exception> 86/// <exception cref="InvalidOperationException">Writes are not allowed to the underlying stream.</exception> 94/// <exception cref="InvalidOperationException">Writes are not allowed to the underlying stream.</exception> 106/// <exception cref="InvalidOperationException">Writes are not allowed to the underlying stream.</exception> 115/// <exception cref="InvalidOperationException">Writes are not allowed to the underlying stream.</exception> 124/// <exception cref="InvalidOperationException">Writes are not allowed to the underlying stream.</exception> 134/// <exception cref="InvalidOperationException">Writes are not allowed to the underlying stream.</exception> 143/// <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> 166/// <exception cref="InvalidOperationException">Writes are not allowed to the underlying stream.</exception> 175/// <exception cref="InvalidOperationException">Writes are not allowed to the underlying stream.</exception> 184/// <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> 201/// <exception cref="InvalidOperationException">Writes are not allowed to the underlying stream.</exception>
Microsoft.DotNet.Build.Tasks.Installers (1)
src\CreateWixBuildWixpack.cs (1)
746/// <exception cref="InvalidOperationException"></exception>
Microsoft.DotNet.Build.Tasks.Packaging (1)
GetAssemblyReferences.cs (1)
80catch (InvalidOperationException)
Microsoft.DotNet.Build.Tasks.Workloads (5)
Msi\WixDocument.cs (1)
91/// <exception cref="InvalidOperationException" />
Msi\WixXmlExtensions.cs (4)
48/// <exception cref="InvalidOperationException"></exception> 81/// <exception cref="InvalidOperationException">Thrown if the specified <paramref name="element"/> does not support adding a <c>RegistryKey</c> child 110/// <exception cref="InvalidOperationException">Thrown if the specified element does not support ComponentGroupRef child elements.</exception> 130/// <exception cref="InvalidOperationException"/>
Microsoft.DotNet.Cli.Utils (2)
ProcessReaper.cs (2)
200catch (InvalidOperationException) 270catch (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.Extensions.AI (8)
Files\HostedFileClientBuilder.cs (1)
44/// <exception cref="InvalidOperationException">A factory returned <see langword="null"/>.</exception>
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (2)
390/// Throws an <see cref="System.InvalidOperationException"/>. 401/// Throws an <see cref="System.InvalidOperationException"/>.
Realtime\RealtimeClientExtensions.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>
Realtime\RealtimeClientSessionExtensions.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>
Throw.cs (1)
11public static InvalidOperationException CreateMissingServiceException(Type serviceType, object? serviceKey) =>
Microsoft.Extensions.AI.Abstractions (16)
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)
44/// <exception cref="InvalidOperationException">No service of the requested type for the specified key is available.</exception> 69/// <exception cref="InvalidOperationException">No service of the requested type for the specified key is available.</exception> 97/// <exception cref="InvalidOperationException">The generator did not produce exactly one embedding.</exception> 124/// <exception cref="InvalidOperationException">The generator did not produce exactly one embedding.</exception> 174/// <exception cref="InvalidOperationException">The generator did not produce one embedding for each input value.</exception>
Files\HostedFileClientExtensions.cs (2)
235/// <exception cref="InvalidOperationException">No service of the requested type for the specified key is available.</exception> 259/// <exception cref="InvalidOperationException">No service of the requested type for the specified key is available.</exception>
Image\ImageGeneratorExtensions.cs (2)
46/// <exception cref="InvalidOperationException">No service of the requested type for the specified key is available.</exception> 70/// <exception cref="InvalidOperationException">No service of the requested type for the specified key is available.</exception>
parent\parent\parent\eng\MSBuild\parent\parent\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)
32/// <exception cref="InvalidOperationException"><paramref name="options"/> is a read-only instance.</exception> 50/// <exception cref="InvalidOperationException"><paramref name="options"/> is a read-only instance.</exception>
Microsoft.Extensions.AI.Abstractions.Tests (24)
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>());
ChatRouting\RoutingChatClientTests.cs (7)
63var expected = new InvalidOperationException("failed"); 75InvalidOperationException actual = await Assert.ThrowsAsync<InvalidOperationException>( 87InvalidOperationException nonStreaming = await Assert.ThrowsAsync<InvalidOperationException>( 89InvalidOperationException streaming = await Assert.ThrowsAsync<InvalidOperationException>(
Contents\FunctionCallContentTests.cs (3)
163var ex = new InvalidOperationException("hello", new NullReferenceException("bye")); 384[InlineData(typeof(InvalidOperationException))] 394Assert.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?>());
Files\HostedFileClientExtensionsTests.cs (2)
514Assert.Throws<InvalidOperationException>(() => client.GetRequiredService<string>()); 548Assert.Throws<InvalidOperationException>(() => client.GetRequiredService(typeof(string)));
Utilities\AIJsonUtilitiesTests.cs (2)
1251Assert.Throws<InvalidOperationException>(() => AIJsonUtilities.DefaultOptions.AddAIContentType<DerivedAIContent>("derivativeContent")); 1282Assert.Throws<InvalidOperationException>(() => JsonSerializer.Serialize(c, options));
Microsoft.Extensions.AI.Evaluation (2)
parent\parent\parent\eng\MSBuild\parent\parent\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)
parent\parent\parent\eng\MSBuild\parent\parent\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)
parent\parent\parent\eng\MSBuild\parent\parent\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)
parent\parent\parent\eng\MSBuild\parent\parent\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 (3)
parent\parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (2)
390/// Throws an <see cref="System.InvalidOperationException"/>. 401/// Throws an <see cref="System.InvalidOperationException"/>.
Utilities\PathValidation.cs (1)
57/// Throws <see cref="InvalidOperationException"/> if the resolved path escapes the root.
Microsoft.Extensions.AI.Evaluation.Reporting.Azure (2)
parent\parent\parent\eng\MSBuild\parent\parent\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.Tests (10)
DiskBased\PathValidationTests.cs (10)
150Assert.Throws<InvalidOperationException>(() => 160Assert.Throws<InvalidOperationException>(() => 170Assert.Throws<InvalidOperationException>(() => 181Assert.Throws<InvalidOperationException>(() => 280Assert.Throws<InvalidOperationException>(() => 292Assert.Throws<InvalidOperationException>(() => 304Assert.Throws<InvalidOperationException>(() => 363Assert.Throws<InvalidOperationException>(() => 441Assert.Throws<InvalidOperationException>(() => 467Assert.Throws<InvalidOperationException>(() =>
Microsoft.Extensions.AI.Evaluation.Safety (2)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (2)
390/// Throws an <see cref="System.InvalidOperationException"/>. 401/// Throws an <see cref="System.InvalidOperationException"/>.
Microsoft.Extensions.AI.OllamaSharp.Integration.Tests (5)
OllamaSharpChatClientIntegrationTests.cs (3)
100InvalidOperationException ex; 101ex = await Assert.ThrowsAsync<InvalidOperationException>(() => chatClient.GetResponseAsync("Hello, world!")); 104ex = await Assert.ThrowsAsync<InvalidOperationException>(() => chatClient.GetStreamingResponseAsync("Hello, world!").ToChatResponseAsync());
OllamaSharpEmbeddingGeneratorIntegrationTests.cs (2)
28InvalidOperationException ex; 29ex = await Assert.ThrowsAsync<InvalidOperationException>(() => client.EmbedAsync(new OllamaSharp.Models.EmbedRequest
Microsoft.Extensions.AI.OpenAI (5)
OpenAIClientExtensions.cs (1)
214/// Operations requiring container access (via <c>Scope</c>) will throw <see cref="InvalidOperationException"/>.
OpenAIHostedFileClient.cs (1)
40/// or both. If an operation requires a client that was not provided, an <see cref="InvalidOperationException"/> is thrown.
OpenAIRealtimeClientSession.cs (1)
70/// <exception cref="InvalidOperationException">The session was not created with an owned realtime client.</exception>
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (2)
390/// Throws an <see cref="System.InvalidOperationException"/>. 401/// Throws an <see cref="System.InvalidOperationException"/>.
Microsoft.Extensions.AI.OpenAI.Tests (20)
OpenAIChatClientTests.cs (2)
1632InvalidOperationException e = await Assert.ThrowsAsync<InvalidOperationException>(() => client.GetResponseAsync("hello"));
OpenAIEmbeddingGeneratorTests.cs (2)
311InvalidOperationException e = await Assert.ThrowsAsync<InvalidOperationException>(() => generator.GenerateAsync("hello"));
OpenAIHostedFileClientTests.cs (10)
382await Assert.ThrowsAsync<InvalidOperationException>( 392await Assert.ThrowsAsync<InvalidOperationException>( 402await Assert.ThrowsAsync<InvalidOperationException>( 412await Assert.ThrowsAsync<InvalidOperationException>( 422await Assert.ThrowsAsync<InvalidOperationException>( 433await Assert.ThrowsAsync<InvalidOperationException>( 443await Assert.ThrowsAsync<InvalidOperationException>( 453await Assert.ThrowsAsync<InvalidOperationException>( 463await Assert.ThrowsAsync<InvalidOperationException>( 473await Assert.ThrowsAsync<InvalidOperationException>(
OpenAIRealtimeClientSessionTests.cs (1)
81await Assert.ThrowsAsync<InvalidOperationException>(() => session.SendAsync(new RealtimeClientMessage()));
OpenAIResponseClientTests.cs (5)
3024await Assert.ThrowsAsync<InvalidOperationException>(async () => 3270await Assert.ThrowsAsync<InvalidOperationException>(async () => 3760InvalidOperationException e = await Assert.ThrowsAsync<InvalidOperationException>(() => client.GetResponseAsync("hello")); 5816await Assert.ThrowsAsync<InvalidOperationException>(async () =>
Microsoft.Extensions.AI.Templates.Tests (1)
ProcessExtensions.cs (1)
17catch (InvalidOperationException ex) when (ex.Message.Contains("No process is associated with this object"))
Microsoft.Extensions.AI.Tests (106)
ChatCompletion\ChatClientBuilderTest.cs (3)
77var ex = Assert.Throws<InvalidOperationException>(() => builder.Build()); 92Assert.Throws<InvalidOperationException>(() => keyedServiceProvider.GetRequiredKeyedService(typeof(object), "key"));
ChatCompletion\ChatClientStructuredOutputExtensionsTests.cs (4)
267var ex = Assert.Throws<InvalidOperationException>(() => response.Result); 286var ex = Assert.Throws<InvalidOperationException>(() => response.Result);
ChatCompletion\FunctionInvokingChatClientApprovalsTests.cs (4)
1090var invokeException = await Assert.ThrowsAsync<InvalidOperationException>( 1094var invokeStreamingException = await Assert.ThrowsAsync<InvalidOperationException>(
ChatCompletion\OpenTelemetryChatClientTests.cs (3)
1017var expectedException = new InvalidOperationException("test exception message"); 1035await Assert.ThrowsAsync<InvalidOperationException>(async () => 1045await Assert.ThrowsAsync<InvalidOperationException>(() =>
ChatCompletion\ReducingChatClientTests.cs (2)
129var exception = Assert.Throws<InvalidOperationException>(() =>
ChatRouting\FailoverChatClientTests.cs (36)
46var expected = new InvalidOperationException("selection failed"); 60InvalidOperationException actual = 61await Assert.ThrowsAsync<InvalidOperationException>(() => operation); 75var selectionException = new InvalidOperationException("selection failed"); 88InvalidOperationException actual = 89await Assert.ThrowsAsync<InvalidOperationException>(() => operation); 108InvalidOperationException exception = 109await Assert.ThrowsAsync<InvalidOperationException>(() => operation); 118var invocationException = new InvalidOperationException("invocation failed"); 119var selectionException = new InvalidOperationException("selection failed"); 133InvalidOperationException actual = await Assert.ThrowsAsync<InvalidOperationException>( 147var invocationException = new InvalidOperationException("invocation failed"); 148var completionException = new InvalidOperationException("completion failed"); 164InvalidOperationException actual = await Assert.ThrowsAsync<InvalidOperationException>( 173var invocationException = new InvalidOperationException("invocation failed"); 174var updateException = new InvalidOperationException("update failed"); 195InvalidOperationException actual = await Assert.ThrowsAsync<InvalidOperationException>( 334var expected = new InvalidOperationException("failed"); 351InvalidOperationException actual = await Assert.ThrowsAsync<InvalidOperationException>( 399Assert.Equal("failed", Assert.IsType<InvalidOperationException>(failedAttempt.Exception).Message); 473InvalidOperationException exception = await Assert.ThrowsAsync<InvalidOperationException>( 540var failure = new InvalidOperationException("failed"); 627InvalidOperationException exception = await Assert.ThrowsAsync<InvalidOperationException>( 734Assert.IsType<InvalidOperationException>(observed!.Exception); 838InvalidOperationException exception = await Assert.ThrowsAsync<InvalidOperationException>( 894var currentException = new InvalidOperationException("current failed"); 977var disposalException = new InvalidOperationException("dispose failed"); 1048InvalidOperationException exception = await Assert.ThrowsAsync<InvalidOperationException>(ConsumeAsync);
ChatRouting\OrderedFailoverChatClientTests.cs (4)
100InvalidOperationException exception = await Assert.ThrowsAsync<InvalidOperationException>( 120InvalidOperationException exception = await Assert.ThrowsAsync<InvalidOperationException>(
Embeddings\EmbeddingGeneratorBuilderTests.cs (2)
77var ex = Assert.Throws<InvalidOperationException>(() => builder.Build());
Embeddings\OpenTelemetryEmbeddingGeneratorTests.cs (2)
111var expectedException = new InvalidOperationException("test exception message"); 126await Assert.ThrowsAsync<InvalidOperationException>(() =>
Files\HostedFileClientBuilderTests.cs (2)
76Assert.Throws<InvalidOperationException>(() => builder.Build()); 90Assert.Throws<InvalidOperationException>(() => keyedServiceProvider.GetRequiredKeyedService(typeof(object), "key"));
Files\LoggingHostedFileClientTests.cs (5)
346await Assert.ThrowsAsync<InvalidOperationException>(() => client.UploadAsync(stream)); 401await Assert.ThrowsAsync<InvalidOperationException>(() => client.DownloadAsync("file-1")); 430await Assert.ThrowsAsync<InvalidOperationException>(() => client.GetFileInfoAsync("file-1")); 459await Assert.ThrowsAsync<InvalidOperationException>(() => client.DeleteAsync("file-1")); 519await Assert.ThrowsAsync<InvalidOperationException>(async () =>
Files\OpenTelemetryHostedFileClientTests.cs (15)
281await Assert.ThrowsAsync<InvalidOperationException>(() => client.UploadAsync(stream)); 286Assert.Equal(typeof(InvalidOperationException).FullName, activity.GetTagItem("error.type")); 287AssertExceptionLogged(collector, typeof(InvalidOperationException)); 321await Assert.ThrowsAsync<InvalidOperationException>(async () => 331Assert.Equal(typeof(InvalidOperationException).FullName, activity.GetTagItem("error.type")); 333AssertExceptionLogged(collector, typeof(InvalidOperationException)); 406await Assert.ThrowsAsync<InvalidOperationException>(() => client.DownloadAsync("file-1")); 412Assert.Equal(typeof(InvalidOperationException).FullName, activity.GetTagItem("error.type")); 413AssertExceptionLogged(collector, typeof(InvalidOperationException)); 441await Assert.ThrowsAsync<InvalidOperationException>(() => client.DeleteAsync("file-1")); 447Assert.Equal(typeof(InvalidOperationException).FullName, activity.GetTagItem("error.type")); 448AssertExceptionLogged(collector, typeof(InvalidOperationException)); 476await Assert.ThrowsAsync<InvalidOperationException>(() => client.GetFileInfoAsync("file-1")); 482Assert.Equal(typeof(InvalidOperationException).FullName, activity.GetTagItem("error.type")); 483AssertExceptionLogged(collector, typeof(InvalidOperationException));
Functions\AIFunctionFactoryTest.cs (1)
737await Assert.ThrowsAsync<InvalidOperationException>(async () => await func.InvokeAsync());
Image\ImageGeneratorBuilderTests.cs (3)
77var ex = Assert.Throws<InvalidOperationException>(() => builder.Build()); 92Assert.Throws<InvalidOperationException>(() => keyedServiceProvider.GetRequiredKeyedService(typeof(object), "key"));
Image\OpenTelemetryImageGeneratorTests.cs (2)
184var expectedException = new InvalidOperationException("test exception message"); 199await Assert.ThrowsAsync<InvalidOperationException>(() =>
Realtime\FunctionInvokingRealtimeClientTests.cs (1)
546await Assert.ThrowsAsync<InvalidOperationException>(async () =>
Realtime\LoggingRealtimeClientTests.cs (3)
258await Assert.ThrowsAsync<InvalidOperationException>(() => session.SendAsync(new SessionUpdateRealtimeClientMessage(new RealtimeSessionOptions()))); 337await Assert.ThrowsAsync<InvalidOperationException>(async () => 423await Assert.ThrowsAsync<InvalidOperationException>(() =>
Realtime\OpenTelemetryRealtimeClientTests.cs (2)
229await Assert.ThrowsAsync<InvalidOperationException>(async () => 246Assert.IsType<InvalidOperationException>(logEntry.Exception);
Realtime\RealtimeClientExtensionsTests.cs (3)
95Assert.Throws<InvalidOperationException>(() => client.GetRequiredService<string>()); 102Assert.Throws<InvalidOperationException>(() => client.GetRequiredService(typeof(string))); 109Assert.Throws<InvalidOperationException>(() => client.GetRequiredService<TestRealtimeClient>("someKey"));
Realtime\RealtimeClientSessionExtensionsTests.cs (3)
94Assert.Throws<InvalidOperationException>(() => session.GetRequiredService<string>()); 101Assert.Throws<InvalidOperationException>(() => session.GetRequiredService(typeof(string))); 108Assert.Throws<InvalidOperationException>(() => session.GetRequiredService<TestRealtimeClientSession>("someKey"));
SpeechToText\OpenTelemetrySpeechToTextClientTests.cs (3)
168var expectedException = new InvalidOperationException("test exception message"); 186await Assert.ThrowsAsync<InvalidOperationException>(async () => 196await Assert.ThrowsAsync<InvalidOperationException>(() =>
TextToSpeech\OpenTelemetryTextToSpeechClientTests.cs (3)
148var expectedException = new InvalidOperationException("test exception message"); 166await Assert.ThrowsAsync<InvalidOperationException>(async () => 176await Assert.ThrowsAsync<InvalidOperationException>(() =>
Microsoft.Extensions.AmbientMetadata.Application (2)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (2)
390/// Throws an <see cref="System.InvalidOperationException"/>. 401/// Throws an <see cref="System.InvalidOperationException"/>.
Microsoft.Extensions.AmbientMetadata.Build (2)
parent\parent\parent\eng\MSBuild\parent\parent\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)
21/// <exception cref="InvalidOperationException">Context is not initialized.</exception> 32/// <exception cref="InvalidOperationException">Context is not initialized.</exception>
IAsyncState.cs (2)
41/// <exception cref="InvalidOperationException">The context is not initialized.</exception> 50/// <exception cref="InvalidOperationException">Context is not initialized.</exception>
parent\parent\parent\eng\MSBuild\parent\parent\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)
147Assert.Throws<InvalidOperationException>(() => _ = context1.Get()); 166Assert.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)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (2)
390/// Throws an <see cref="System.InvalidOperationException"/>. 401/// Throws an <see cref="System.InvalidOperationException"/>.
Microsoft.Extensions.Caching.Hybrid.Tests (2)
ServiceConstructionTests.cs (2)
78Assert.Throws<InvalidOperationException>(provider.GetRequiredService<HybridCache>); 89Assert.Throws<InvalidOperationException>(provider.GetRequiredService<HybridCache>);
Microsoft.Extensions.Compliance.Abstractions (2)
parent\parent\parent\eng\MSBuild\parent\parent\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)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Data.Validation\LengthAttribute.cs (1)
92/// <exception cref="InvalidOperationException">The validated type is not supported.</exception>
parent\parent\parent\eng\MSBuild\parent\parent\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>
parent\parent\parent\eng\MSBuild\parent\parent\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)
542/// <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.DataIngestion (3)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (2)
390/// Throws an <see cref="System.InvalidOperationException"/>. 401/// Throws an <see cref="System.InvalidOperationException"/>.
Writers\VectorStoreWriter.cs (1)
53/// <exception cref="InvalidOperationException">The collection has not been initialized yet.
Microsoft.Extensions.DataIngestion.Abstractions (2)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (2)
390/// Throws an <see cref="System.InvalidOperationException"/>. 401/// Throws an <see cref="System.InvalidOperationException"/>.
Microsoft.Extensions.DataIngestion.Markdig (2)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (2)
390/// Throws an <see cref="System.InvalidOperationException"/>. 401/// Throws an <see cref="System.InvalidOperationException"/>.
Microsoft.Extensions.DataIngestion.MarkItDown (2)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (2)
390/// Throws an <see cref="System.InvalidOperationException"/>. 401/// Throws an <see cref="System.InvalidOperationException"/>.
Microsoft.Extensions.DataIngestion.Tests (3)
Chunkers\HeaderChunkerTests.cs (3)
97await Assert.ThrowsAsync<InvalidOperationException>(async () => await lessThanContext.ProcessAsync(doc).ToListAsync()); 100await Assert.ThrowsAsync<InvalidOperationException>(async () => await sameAsContext.ProcessAsync(doc).ToListAsync()); 138await Assert.ThrowsAsync<InvalidOperationException>(async () => await chunker.ProcessAsync(document).ToListAsync());
Microsoft.Extensions.DependencyInjection (3)
ServiceProvider.cs (3)
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 178/// <see cref="InvalidOperationException"/>. Use <see cref="DisposeAsync"/> to properly handle all
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)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (2)
390/// Throws an <see cref="System.InvalidOperationException"/>. 401/// Throws an <see cref="System.InvalidOperationException"/>.
Microsoft.Extensions.DependencyInjection.AutoActivation.Tests (4)
AcceptanceTest.cs (2)
342var exception = await Assert.ThrowsAsync<InvalidOperationException>(() => host.StartAsync());
AcceptanceTest.Keyed.cs (2)
336var exception = await Assert.ThrowsAsync<InvalidOperationException>(() => host.StartAsync());
Microsoft.Extensions.Diagnostics.ExceptionSummarization (2)
parent\parent\parent\eng\MSBuild\parent\parent\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)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (2)
390/// Throws an <see cref="System.InvalidOperationException"/>. 401/// Throws an <see cref="System.InvalidOperationException"/>.
Microsoft.Extensions.Diagnostics.HealthChecks.ResourceUtilization (3)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Data.Validation\LengthAttribute.cs (1)
92/// <exception cref="InvalidOperationException">The validated type is not supported.</exception>
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (2)
390/// Throws an <see cref="System.InvalidOperationException"/>. 401/// Throws an <see cref="System.InvalidOperationException"/>.
Microsoft.Extensions.Diagnostics.Probes (3)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Data.Validation\LengthAttribute.cs (1)
92/// <exception cref="InvalidOperationException">The validated type is not supported.</exception>
parent\parent\parent\eng\MSBuild\parent\parent\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)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Data.Validation\LengthAttribute.cs (1)
92/// <exception cref="InvalidOperationException">The validated type is not supported.</exception>
parent\parent\parent\eng\MSBuild\parent\parent\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.Kubernetes (2)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (2)
390/// Throws an <see cref="System.InvalidOperationException"/>. 401/// Throws an <see cref="System.InvalidOperationException"/>.
Microsoft.Extensions.Diagnostics.ResourceMonitoring.Kubernetes.Tests (8)
KubernetesMetadataTests.cs (6)
85var exception = Assert.Throws<InvalidOperationException>(() => 114var exception = Assert.Throws<InvalidOperationException>(() => 141var exception = Assert.Throws<InvalidOperationException>(() => KubernetesMetadata.FromEnvironmentVariables(string.Empty));
KubernetesResourceQuotasServiceCollectionExtensionsTests.cs (2)
140var exception = Assert.Throws<InvalidOperationException>(() =>
Microsoft.Extensions.Diagnostics.ResourceMonitoring.Tests (4)
Windows\Tcp6TableInfoTests.cs (2)
243Assert.Throws<InvalidOperationException>(() => 259Assert.Throws<InvalidOperationException>(() =>
Windows\TcpTableInfoTests.cs (2)
185Assert.Throws<InvalidOperationException>(() => 201Assert.Throws<InvalidOperationException>(() =>
Microsoft.Extensions.Diagnostics.Testing (5)
Logging\FakeLogCollector.cs (1)
95/// <exception cref="InvalidOperationException">No records have been captured.</exception>
Logging\FakeLogger.cs (1)
111/// <exception cref="InvalidOperationException">No records have been captured.</exception>
Logging\FakeLoggerServiceProviderExtensions.cs (1)
18/// <exception cref="InvalidOperationException">No collector exists in the provider.</exception>
parent\parent\parent\eng\MSBuild\parent\parent\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)
62Assert.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.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>
parent\parent\parent\eng\MSBuild\parent\parent\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 (2)
Logging\Internal\LoggingOptionsConfigureOptions.cs (1)
137private static InvalidOperationException CreateBindingException(string path, Type type, Exception innerException)
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 (5)
Logging\HttpClientLoggerTest.cs (3)
524var exception = new InvalidOperationException("test"); 558await Assert.ThrowsAsync<InvalidOperationException>(act); 981var exception = new InvalidOperationException("Test exception");
Logging\HttpClientLoggingExtensionsTest.cs (2)
403act.Should().Throw<InvalidOperationException>() 425act.Should().Throw<InvalidOperationException>()
Microsoft.Extensions.Http.Resilience (3)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Data.Validation\LengthAttribute.cs (1)
92/// <exception cref="InvalidOperationException">The validated type is not supported.</exception>
parent\parent\parent\eng\MSBuild\parent\parent\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 (17)
BuildTransitive\GrpcNetClientFactoryVersionTargetTests.cs (1)
330catch (InvalidOperationException exception)
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)
parent\parent\parent\eng\MSBuild\parent\parent\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 (2)
IAsyncStartupValidator.cs (1)
30/// <exception cref="System.InvalidOperationException">
OptionsBuilderExtensions.cs (1)
34/// <see cref="InvalidOperationException"/> when a custom implementation is registered. The built-in
Microsoft.Extensions.Options.Contextual (2)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (2)
390/// Throws an <see cref="System.InvalidOperationException"/>. 401/// Throws an <see cref="System.InvalidOperationException"/>.
Microsoft.Extensions.Resilience (2)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (2)
390/// Throws an <see cref="System.InvalidOperationException"/>. 401/// Throws an <see cref="System.InvalidOperationException"/>.
Microsoft.Extensions.ServiceDiscovery (3)
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>
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (2)
390/// Throws an <see cref="System.InvalidOperationException"/>. 401/// Throws an <see cref="System.InvalidOperationException"/>.
Microsoft.Extensions.ServiceDiscovery.Abstractions (2)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (2)
390/// Throws an <see cref="System.InvalidOperationException"/>. 401/// Throws an <see cref="System.InvalidOperationException"/>.
Microsoft.Extensions.ServiceDiscovery.Dns (3)
FallbackDnsResolver.cs (1)
93private static InvalidOperationException CreateException(string dnsName, string errorMessage)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (2)
390/// Throws an <see cref="System.InvalidOperationException"/>. 401/// Throws an <see cref="System.InvalidOperationException"/>.
Microsoft.Extensions.ServiceDiscovery.Dns.Tests (1)
Resolver\TcpFailoverTests.cs (1)
62await Assert.ThrowsAsync<InvalidOperationException>(() => serverTask);
Microsoft.Extensions.ServiceDiscovery.Tests (8)
ServiceEndpointResolverTests.cs (8)
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("/")); 257var exception = await Assert.ThrowsAsync<InvalidOperationException>(async () =>
Microsoft.Extensions.ServiceDiscovery.Yarp (2)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (2)
390/// Throws an <see cref="System.InvalidOperationException"/>. 401/// Throws an <see cref="System.InvalidOperationException"/>.
Microsoft.Extensions.Telemetry (3)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Data.Validation\LengthAttribute.cs (1)
92/// <exception cref="InvalidOperationException">The validated type is not supported.</exception>
parent\parent\parent\eng\MSBuild\parent\parent\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)
parent\parent\parent\eng\MSBuild\parent\parent\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) 845var exception = logException ? new InvalidOperationException() : null; 885var 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)
parent\parent\parent\eng\MSBuild\parent\parent\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.VectorData.Abstractions (7)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (2)
390/// Throws an <see cref="System.InvalidOperationException"/>. 401/// Throws an <see cref="System.InvalidOperationException"/>.
ProviderServices\CollectionModel.cs (3)
117/// <exception cref="InvalidOperationException"> 148/// <exception cref="InvalidOperationException"> 187/// <exception cref="InvalidOperationException">The provided property name is not a valid data or key property name.</exception>
ProviderServices\VectorPropertyModel.cs (2)
133/// <exception cref="InvalidOperationException">Thrown if no <see cref="EmbeddingGenerationDispatcher"/> is configured on this property.</exception> 143/// <exception cref="InvalidOperationException">Thrown if no <see cref="EmbeddingGenerationDispatcher"/> is configured on this property.</exception>
Microsoft.Extensions.VectorData.ConformanceTests (10)
EmbeddingGenerationTests.cs (2)
174var exception = await Assert.ThrowsAsync<InvalidOperationException>(() => collection.SearchAsync(8, top: 1).ToListAsync().AsTask());
FilterTests.cs (4)
49await Assert.ThrowsAsync<InvalidOperationException>( 137if (exception is not InvalidOperationException and not VectorStoreException { InnerException: InvalidOperationException }) 139Assert.Fail($"Expected {nameof(InvalidOperationException)} or {nameof(VectorStoreException)} but got {exception.GetType()}");
HybridSearchTests.cs (1)
135=> Assert.ThrowsAsync<InvalidOperationException>(async () =>
ModelTests\MultiVectorModelTests.cs (2)
72var exception = await Assert.ThrowsAsync<InvalidOperationException>(async () =>
TypeTests\KeyTypeTests.cs (1)
29Assert.Throws<InvalidOperationException>(() =>
Microsoft.Gen.Logging.Generated.Tests (11)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\Logging.g.cs (5)
321public static partial void Method4(global::Microsoft.Extensions.Logging.ILogger logger, global::System.InvalidOperationException p1) 350public static partial void Method5(global::Microsoft.Extensions.Logging.ILogger logger, global::System.InvalidOperationException p1, global::System.InvalidOperationException p2) 385public static partial void Method6(global::Microsoft.Extensions.Logging.ILogger logger, global::System.InvalidOperationException p1, int p2) 420public static partial void Method7(global::Microsoft.Extensions.Logging.ILogger logger, int p1, global::System.InvalidOperationException p2)
LogMethodTests.cs (1)
209Assert.Throws<InvalidOperationException>(() =>
parent\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)
21/// Throws <see cref="InvalidOperationException"/> if IsValue is false 26/// 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.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.Build.Tasks (1)
IContentAssetPreprocessor.cs (1)
24/// <exception cref="InvalidOperationException"><see cref="ConfigurePreprocessor"/> was not called.</exception>
Microsoft.Private.Windows.Core (2)
System\Private\Windows\BinaryFormat\Serializer\Record.cs (1)
83/// <exception cref="InvalidOperationException">
Windows\Win32\System\Com\Lifetime.cs (1)
71/// <exception cref="InvalidOperationException">The handle was freed.</exception>
Microsoft.TemplateEngine.Cli (1)
TemplateGroup.cs (1)
44catch (InvalidOperationException)
Microsoft.TemplateEngine.Edge (1)
Settings\TemplatePackageManager.cs (1)
222/// <exception cref="InvalidOperationException"> Throws an exception when package <paramref name="packageIdentifier"/>.</exception>
Microsoft.TemplateEngine.Orchestrator.RunnableProjects (4)
ConfigModel\ConditionedConfigurationElement.cs (1)
27/// <exception cref="InvalidOperationException">when the property is accessed prior to <see cref="EvaluateCondition(ILogger, IVariableCollection)"/> method is called.</exception>
DirectoryBasedTemplate.cs (2)
34/// <exception cref="InvalidOperationException">when template identity is null.</exception> 195/// <exception cref="InvalidOperationException">when check for the version leads to unexpected result.</exception>
RunnableProjectGenerator.cs (1)
72catch (InvalidOperationException)
Microsoft.TestPlatform.AdapterUtilities (2)
TestIdProvider.cs (2)
32/// <exception cref="InvalidOperationException">Thrown if <see cref="GetHash"/> or <see cref="GetId"/> is called already.</exception> 51/// <exception cref="InvalidOperationException">Thrown if <see cref="GetHash"/> or <see cref="GetId"/> is called already.</exception>
Microsoft.TestPlatform.CommunicationUtilities (1)
SocketServer.cs (1)
138catch (Exception ex) when (Volatile.Read(ref _stopRequested) != 0 && ex is ObjectDisposedException or SocketException or InvalidOperationException)
Microsoft.TestPlatform.Extensions.BlameDataCollector (1)
BlameCollector.cs (1)
324catch (InvalidOperationException)
Microsoft.TestPlatform.PlatformAbstractions (3)
common\System\ProcessHelper.cs (2)
316catch (InvalidOperationException) 352catch (InvalidOperationException)
common\Tracing\PlatformEqtTrace.cs (1)
430catch (InvalidOperationException e)
Microsoft.TestPlatform.TestHostRuntimeProvider (1)
Hosting\TestHostManagerCallbacks.cs (1)
95catch (InvalidOperationException ex)
Microsoft.TestPlatform.VsTestConsole.TranslationLayer (1)
VsTestConsoleProcessManager.cs (1)
229catch (InvalidOperationException ex)
Microsoft.VisualBasic.Core (1)
Microsoft\VisualBasic\CompilerServices\ExceptionUtils.vb (1)
372ByVal ResourceID As String, ByVal ParamArray PlaceHolders() As String) As InvalidOperationException
Microsoft.VisualStudio.TestPlatform.Common (1)
DataCollection\TestPlatformDataCollectionLogger.cs (1)
120/// <exception cref="InvalidOperationException">Throws InvalidOperationException.
Microsoft.VisualStudio.TestPlatform.ObjectModel (1)
Navigation\PortableSymbolReader.cs (1)
146/// <exception cref="InvalidOperationException"></exception>
Microsoft.Win32.Registry (2)
Microsoft\Win32\RegistryKey.cs (2)
268/// <exception cref="InvalidOperationException">Thrown if the subkey has child subkeys.</exception> 1357catch (Exception exc) when (exc is OverflowException || exc is InvalidOperationException || exc is FormatException || exc is InvalidCastException)
MSBuild (5)
JsonOutputFormatter.cs (2)
132catch (InvalidOperationException) 151catch (InvalidOperationException)
OutOfProcTaskHostNode.cs (1)
998/// <exception cref="InvalidOperationException">If the connection is lost.</exception>
src\msbuild\src\Shared\NodeEndpointOutOfProcBase.cs (1)
512catch (InvalidOperationException)
src\msbuild\src\Shared\ResourceUtilities.cs (1)
306catch (InvalidOperationException e)
mscorlib (1)
src\runtime\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))]
NuGet.Build.Tasks (1)
StaticGraphRestoreTaskBase.cs (1)
205catch (InvalidOperationException)
NuGet.CommandLine.XPlat (4)
Commands\PackageReferenceCommands\ListPackage\ListPackageCommandRunner.cs (1)
135catch (InvalidOperationException ex)
Commands\PackageSearch\PackageSearchRunner.cs (1)
117catch (InvalidOperationException ex)
Commands\Signing\TrustedSignersCommand.cs (1)
237catch (InvalidOperationException e)
Utility\MSBuildAPIUtility.cs (1)
653/// <exception cref="InvalidOperationException"></exception>
NuGet.Commands (1)
TrustedSignersCommand\TrustedSignerActionsProvider.cs (1)
43/// <exception cref="InvalidOperationException">When a repository item with the given name is not found.</exception>
NuGet.Configuration (1)
Settings\SettingsFile.cs (1)
223catch (InvalidOperationException e)
NuGet.Credentials (1)
PluginCredentialProvider.cs (1)
328catch (InvalidOperationException)
NuGet.PackageManagement (5)
NuGetPackageManager.cs (2)
1313catch (InvalidOperationException) 2003catch (InvalidOperationException)
Projects\ProjectJsonNuGetProject.cs (1)
77catch (InvalidOperationException)
Resolution\ResolverGather.cs (1)
662ex is InvalidOperationException || ex is TaskCanceledException || ex is AggregateException)
Resolution\UninstallResolver.cs (1)
139private static InvalidOperationException CreatePackageHasDependentsException(PackageIdentity packageIdentity,
NuGet.Packaging (1)
Signing\Verification\SignatureTrustAndValidityVerificationProvider.cs (1)
274catch (InvalidOperationException)
NuGet.Protocol (23)
Model\GetVulnerabilityInfoResult.cs (1)
29/// <exception cref="InvalidOperationException">When both knownVulnerabilities and exceptions are null.</exception>
Plugins\Connection.cs (3)
167/// <exception cref="InvalidOperationException">Thrown if the method has been called already.</exception> 224/// <exception cref="InvalidOperationException">Thrown if not connected.</exception> 271/// <exception cref="InvalidOperationException">Thrown if not connected.</exception>
Plugins\IConnection.cs (2)
56/// <exception cref="InvalidOperationException">Thrown if not connected.</exception> 72/// <exception cref="InvalidOperationException">Thrown if not connected.</exception>
Plugins\IReceiver.cs (2)
33/// <exception cref="InvalidOperationException">Thrown if this object is closed.</exception> 34/// <exception cref="InvalidOperationException">Thrown if this method has already been called.</exception>
Plugins\ISender.cs (3)
25/// <exception cref="InvalidOperationException">Thrown if this object is closed.</exception> 26/// <exception cref="InvalidOperationException">Thrown if this method has already been called.</exception> 36/// <exception cref="InvalidOperationException">Thrown if <see cref="Connect" /> has not been called.</exception>
Plugins\PluginProcess.cs (3)
125catch (InvalidOperationException) 197catch (InvalidOperationException) 211catch (InvalidOperationException)
Plugins\Receiver.cs (2)
46/// <exception cref="InvalidOperationException">Thrown if this object is closed.</exception> 47/// <exception cref="InvalidOperationException">Thrown if this method has already been called.</exception>
Plugins\Sender.cs (3)
90/// <exception cref="InvalidOperationException">Thrown if this object is closed.</exception> 91/// <exception cref="InvalidOperationException">Thrown if this method has already been called.</exception> 116/// <exception cref="InvalidOperationException">Thrown if <see cref="Connect" /> has not been called.</exception>
Plugins\StandardInputReceiver.cs (2)
90/// <exception cref="InvalidOperationException">Thrown if this object is closed.</exception> 91/// <exception cref="InvalidOperationException">Thrown if this method has already been called.</exception>
Plugins\StandardOutputReceiver.cs (2)
83/// <exception cref="InvalidOperationException">Thrown if this object is closed.</exception> 84/// <exception cref="InvalidOperationException">Thrown if this method has already been called.</exception>
PresentationCore (54)
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)
MS\Internal\XpsLoadingContext.cs (1)
247catch (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>
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> 335/// <exception cref="InvalidOperationException">service is not enabled</exception> 375/// <exception cref="InvalidOperationException">service is not enabled</exception> 415/// <exception cref="InvalidOperationException">service is not enabled</exception> 849/// <exception cref="InvalidOperationException">service is not enabled</exception> 1030/// <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)
7100catch (InvalidOperationException invalidOperationException) 7195catch (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)
376catch (InvalidOperationException) 417catch (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)
156/// <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)
1514catch (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)
3038/// <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-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" />
RepoTasks (2)
src\aspnetcore\src\Shared\CertificateGeneration\CertificateManager.cs (2)
268/// <exception cref="InvalidOperationException">There was an error ensuring the certificate exists.</exception> 942/// <exception cref="InvalidOperationException">If a key with the specified minimum size cannot be created.</exception>
Roslyn.Diagnostics.Analyzers (6)
src\roslyn\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\roslyn\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\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Diagnostics\DiagnosticSeverityExtensions.cs (1)
18/// <exception cref="InvalidOperationException">
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Diagnostics\ReportDiagnosticExtensions.cs (1)
20/// <exception cref="InvalidOperationException">
rzc (6)
Json\Assumed.cs (4)
107/// <exception cref="InvalidOperationException"/> 118/// <exception cref="InvalidOperationException"/> 129/// <exception cref="InvalidOperationException"/> 140/// <exception cref="InvalidOperationException"/>
Json\ThrowHelper.cs (2)
203/// Throws an <see cref="InvalidOperationException"/> with a message. 217/// Throws an <see cref="InvalidOperationException"/> with a message.
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 (14)
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);
Throw\ThrowTest.cs (4)
20var exception = Assert.Throws<InvalidOperationException>(() => Throw.InvalidOperationException(message)); 31var exception = Assert.Throws<InvalidOperationException>(() => Throw.InvalidOperationException(message, innerException));
System.Collections (3)
System\Collections\Generic\PriorityQueue.cs (3)
222/// <exception cref="InvalidOperationException">The <see cref="PriorityQueue{TElement, TPriority}"/> is empty.</exception> 237/// <exception cref="InvalidOperationException">The queue is empty.</exception> 256/// <exception cref="InvalidOperationException">The queue is empty.</exception>
System.Collections.Concurrent (36)
System\Collections\Concurrent\BlockingCollection.cs (32)
239/// <exception cref="System.InvalidOperationException">The <see 244/// <exception cref="System.InvalidOperationException">The underlying collection didn't accept the item.</exception> 269/// <exception cref="System.InvalidOperationException">The <see 274/// <exception cref="System.InvalidOperationException">The underlying collection didn't accept the item.</exception> 296/// <exception cref="System.InvalidOperationException">The <see 301/// <exception cref="System.InvalidOperationException">The underlying collection didn't accept the item.</exception> 316/// <exception cref="System.InvalidOperationException">The <see 324/// <exception cref="System.InvalidOperationException">The underlying collection didn't accept the item.</exception> 339/// <exception cref="System.InvalidOperationException">The <see 346/// <exception cref="System.InvalidOperationException">The underlying collection didn't accept the item.</exception> 365/// <exception cref="System.InvalidOperationException">The <see 372/// <exception cref="System.InvalidOperationException">The underlying collection didn't accept the item.</exception> 390/// <exception cref="System.InvalidOperationException">the collection has already been marked 393/// <exception cref="System.InvalidOperationException">The underlying collection didn't accept the item.</exception> 503/// <exception cref="System.InvalidOperationException">The underlying collection was modified 527/// <exception cref="System.InvalidOperationException">The underlying collection was modified 552/// <exception cref="System.InvalidOperationException">The underlying collection was modified 574/// <exception cref="System.InvalidOperationException">The underlying collection was modified 595/// <exception cref="System.InvalidOperationException">The underlying collection was modified 620/// <exception cref="System.InvalidOperationException">The underlying collection was modified 749/// <exception cref="System.InvalidOperationException">At least one underlying collection didn't accept the item.</exception> 791/// <exception cref="System.InvalidOperationException">At least one underlying collection didn't accept the item.</exception> 830/// <exception cref="System.InvalidOperationException">At least one underlying collection didn't accept the item.</exception> 859/// <exception cref="System.InvalidOperationException">At least one underlying collection didn't accept the item.</exception> 886/// <exception cref="System.InvalidOperationException">At least one underlying collection didn't accept the item.</exception> 918/// <exception cref="System.InvalidOperationException">At least one underlying collection didn't accept the item.</exception> 1130/// <exception cref="System.InvalidOperationException">At least one of the underlying collections was modified 1159/// <exception cref="System.InvalidOperationException">At least one of the underlying collections was modified 1187/// <exception cref="System.InvalidOperationException">At least one of the underlying collections was modified 1218/// <exception cref="System.InvalidOperationException">At least one of the underlying collections was modified 1248/// <exception cref="System.InvalidOperationException">At least one of the underlying collections was modified 1282/// <exception cref="System.InvalidOperationException">At least one of the underlying collections was modified
System\Collections\Concurrent\OrderablePartitioner.cs (2)
41/// cref="System.InvalidOperationException"/>.</li> 45/// <see cref="System.InvalidOperationException"/>.</li>
System\Collections\Concurrent\Partitioner.cs (2)
33/// cref="System.InvalidOperationException"/>.</li> 36/// <see cref="System.InvalidOperationException"/>.</li>
System.Collections.Immutable (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_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)
385/// <exception cref="InvalidOperationException">Thrown if the <see cref="IsDefault"/> property returns true.</exception> 397/// <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\ImmutableArray.cs (4)
464/// <exception cref="InvalidOperationException"> 494/// <exception cref="InvalidOperationException"> 522/// <exception cref="InvalidOperationException"> 561/// <exception cref="InvalidOperationException">
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)
930/// <exception cref="InvalidOperationException"> 955/// <exception cref="InvalidOperationException"> 989/// <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_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\ImmutableQueue.cs (1)
110/// <exception cref="InvalidOperationException">Thrown when the stack 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_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\Collections\Immutable\ImmutableStack.cs (1)
93/// <exception cref="InvalidOperationException">Thrown when the stack is empty.</exception>
System\Linq\ImmutableArrayExtensions.cs (2)
648/// <exception cref="InvalidOperationException">Thrown if the collection is empty.</exception> 674/// <exception cref="InvalidOperationException">Thrown if the collection is empty.</exception>
System.CommandLine (5)
ParseResult.cs (4)
140/// <exception cref="InvalidOperationException">Parsing resulted in one or more errors.</exception> 151/// <exception cref="InvalidOperationException">The required argument was not parsed or has no default value configured.</exception> 160/// <exception cref="InvalidOperationException">The required option was not parsed or has no default value configured.</exception> 169/// <exception cref="InvalidOperationException">Parsing resulted in one or more errors, or the required symbol was not parsed or has no default value configured.</exception>
Parsing\ArgumentResult.cs (1)
71/// <exception cref="InvalidOperationException">This method is called more than once.</exception>
System.ComponentModel.Annotations (41)
System\ComponentModel\DataAnnotations\AsyncValidationAttribute.cs (1)
107/// <exception cref="InvalidOperationException"> is thrown if the current attribute is malformed.</exception>
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\IAsyncValidatableObject.cs (2)
22/// do not use the async APIs, or throw <see cref="InvalidOperationException"/> 44/// do not use the async APIs, or throw <see cref="InvalidOperationException"/>
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> 178/// <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)
227/// <exception cref="InvalidOperationException"> is thrown if the current attribute is malformed.</exception> 350/// <exception cref="InvalidOperationException"> is thrown if the current attribute is malformed.</exception> 368/// <exception cref="InvalidOperationException"> is thrown if the current attribute is malformed.</exception> 405/// <exception cref="InvalidOperationException"> is thrown if the current attribute is malformed.</exception> 445/// <exception cref="InvalidOperationException"> is thrown if the current attribute is malformed.</exception> 478/// <exception cref="InvalidOperationException"> is thrown if the current attribute is malformed.</exception> 503/// <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\runtime\src\libraries\Common\src\System\Data\Common\AdapterUtil.cs (4)
109internal static InvalidOperationException InvalidOperation(string error) 111InvalidOperationException e = new InvalidOperationException(error); 190internal static InvalidOperationException DataAdapter(string error) 195private 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\runtime\src\libraries\Common\src\System\Data\Common\AdapterUtil.cs (4)
109internal static InvalidOperationException InvalidOperation(string error) 111InvalidOperationException e = new InvalidOperationException(error); 190internal static InvalidOperationException DataAdapter(string error) 195private static InvalidOperationException Provider(string error)
System\Data\Odbc\Odbc32.cs (1)
79internal static InvalidOperationException NoMappingForSqlTransactionLevel(int value)
System.Data.OleDb (34)
OleDb_Util.cs (17)
193internal static InvalidOperationException MDACNotAvailable(Exception? inner) 201internal static InvalidOperationException CommandTextNotSupported(string provider, Exception? inner) 205internal static InvalidOperationException PossiblePromptNotUserInteractive() 209internal static InvalidOperationException ProviderUnavailable(string provider, Exception? inner) 214internal static InvalidOperationException TransactionsNotSupported(string provider, Exception? inner) 254internal static InvalidOperationException BadAccessor() 266internal static InvalidOperationException SignMismatch(Type type) 270internal static InvalidOperationException DataOverflow(Type type) 274internal static InvalidOperationException CantCreate(Type type) 278internal static InvalidOperationException Unavailable(Type type) 282internal static InvalidOperationException UnexpectedStatusValue(DBStatus status) 286internal static InvalidOperationException GVtUnknown(int wType) 290internal static InvalidOperationException SVtUnknown(int wType) 296internal static InvalidOperationException BadStatusRowAccessor(int i, DBBindStatus rowStatus) 300internal static InvalidOperationException ThreadApartmentState(Exception innerException) 332internal static InvalidOperationException DBBindingGetVector() 358internal static InvalidOperationException IDBInfoNotSupported()
OleDbConnectionStringBuilder.cs (1)
516catch (System.InvalidOperationException e)
System\Data\Common\AdapterUtil.cs (15)
128internal static InvalidOperationException InvalidOperation(string error) 130InvalidOperationException e = new InvalidOperationException(error); 140internal static InvalidOperationException InvalidOperation(string error, Exception? inner) 142InvalidOperationException e = new InvalidOperationException(error, inner); 158internal static InvalidOperationException DataAdapter(string error) 162internal static InvalidOperationException DataAdapter(string error, Exception? inner) 166private static InvalidOperationException Provider(string error) 366internal static InvalidOperationException InvalidDataDirectory() 386internal static InvalidOperationException NoConnectionString() 481internal static InvalidOperationException TransactionConnectionMismatch() 485internal static InvalidOperationException TransactionRequired(string method) 495internal static InvalidOperationException ConnectionRequired(string method) 499internal static InvalidOperationException OpenConnectionRequired(string method, ConnectionState state) 535internal static InvalidOperationException NonSequentialColumnAccess(int badCol, int currCol) 872internal static InvalidOperationException QuotePrefixNotSet(string method)
System\Data\ProviderBase\DbConnectionPoolCounters.cs (1)
113catch (InvalidOperationException e)
System.Diagnostics.DiagnosticSource (1)
System\Diagnostics\ActivitySourceFactory.cs (1)
24/// <exception cref="InvalidOperationException"><see cref="ActivitySourceOptions.Scope"/> is set to a value other than this factory.</exception>
System.Diagnostics.EventLog (1)
System\Diagnostics\EventLogInternal.cs (1)
869catch (InvalidOperationException)
System.Diagnostics.PerformanceCounter (2)
System\Diagnostics\SharedPerformanceCounter.cs (2)
871catch (InvalidOperationException) 1476catch (InvalidOperationException)
System.Diagnostics.Process (30)
Microsoft\Win32\SafeHandles\SafeProcessHandle.cs (8)
215/// <exception cref="InvalidOperationException">The handle is invalid.</exception> 238/// <exception cref="InvalidOperationException">The handle is invalid.</exception> 261/// <exception cref="InvalidOperationException">The handle is invalid.</exception> 280/// <exception cref="InvalidOperationException">The handle is invalid.</exception> 298/// <exception cref="InvalidOperationException">The handle is invalid.</exception> 319/// <exception cref="InvalidOperationException">The handle is invalid.</exception> 343/// <exception cref="InvalidOperationException">The handle is invalid.</exception> 408/// <exception cref="InvalidOperationException">The handle is invalid.</exception>
System\Diagnostics\Process.cs (8)
193/// but accessing an uncached value after the process exits may throw <see cref="InvalidOperationException"/> when the value is unavailable. 195/// <exception cref="InvalidOperationException"> 215/// <exception cref="InvalidOperationException"> 238/// <exception cref="InvalidOperationException"> 256/// <exception cref="InvalidOperationException"> 274/// <exception cref="InvalidOperationException"> 810/// <exception cref="InvalidOperationException"> 1729catch (InvalidOperationException)
System\Diagnostics\Process.Multiplexing.cs (6)
33/// <exception cref="InvalidOperationException"> 82/// <exception cref="InvalidOperationException"> 135/// <exception cref="InvalidOperationException"> 372/// <exception cref="InvalidOperationException"> 411/// <exception cref="InvalidOperationException"> 523/// <exception cref="InvalidOperationException">
System\Diagnostics\Process.NonUap.cs (1)
106e is InvalidOperationException || e is Win32Exception;
System\Diagnostics\Process.Scenarios.cs (5)
22/// <exception cref="InvalidOperationException"> 97/// <exception cref="InvalidOperationException"> 162/// <exception cref="InvalidOperationException"> 226/// <exception cref="InvalidOperationException"> 306/// <exception cref="InvalidOperationException">
System\Runtime\InteropServices\UnixProcessStartArguments.cs (1)
96/// <exception cref="InvalidOperationException"><see cref="ProcessStartInfo.UseShellExecute"/> is set to <see langword="true"/>.</exception>
System\Runtime\InteropServices\WindowsProcessStartArguments.cs (1)
84/// <exception cref="InvalidOperationException"><see cref="ProcessStartInfo.UseShellExecute"/> is set to <see langword="true"/>.</exception>
System.Drawing.Common (3)
System\Drawing\Graphics.cs (1)
3588/// <exception cref="InvalidOperationException">
System\Drawing\Image.cs (1)
67or InvalidOperationException
System\Drawing\SystemFonts.cs (1)
143or InvalidOperationException
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> 44/// <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> 68/// <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> 152/// <exception cref="InvalidOperationException"><para>The current context is not an indefinite-length string.</para> 166/// <exception cref="InvalidOperationException">The next data item does not have the correct major type.</exception> 212/// <exception cref="InvalidOperationException">The next data item does not have the correct major type.</exception> 257/// <exception cref="InvalidOperationException"><para>The next data item does not have the correct major type.</para> 292/// <exception cref="InvalidOperationException"><para>The next data item does not have the correct major type.</para> 320/// <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)
226/// <exception cref="InvalidOperationException">The writer does not contain a complete CBOR value or sequence of root-level values.</exception> 232/// <exception cref="InvalidOperationException">The writer does not contain a complete CBOR value or sequence of root-level values.</exception> 251/// <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> 92/// <exception cref="InvalidOperationException">The written data is not accepted under the current conformance mode.</exception> 103/// <exception cref="InvalidOperationException"><para>Writing a new value exceeds the definite length of the parent data item.</para> 118/// <exception cref="InvalidOperationException"><para>Writing a new value exceeds the definite length of the parent data item.</para> 155/// <exception cref="InvalidOperationException"><para>Writing a new value exceeds the definite length of the parent data item.</para> 188/// <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> 51/// <exception cref="InvalidOperationException"><para>Writing a new value exceeds the definite length of the parent data item.</para> 65/// <exception cref="InvalidOperationException"><para>Writing a new value exceeds the definite length of the parent data item.</para> 83/// <exception cref="InvalidOperationException"><para>Writing a new value exceeds the definite length of the parent data item.</para> 100/// <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> 79/// <exception cref="InvalidOperationException">The entry does not represent a block device or a character device.</exception>
System\Formats\Tar\TarEntry.cs (4)
127/// <exception cref="InvalidOperationException">The entry type is not <see cref="TarEntryType.HardLink"/> or <see cref="TarEntryType.SymbolicLink"/>.</exception> 211/// <exception cref="InvalidOperationException">Attempted to extract a symbolic link, a hard link or an unsupported entry type.</exception> 242/// <exception cref="InvalidOperationException">Attempted to extract an unsupported entry type.</exception> 265/// <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 (23)
System\IO\Compression\ZipArchiveEntry.Async.cs (2)
44/// <exception cref="InvalidOperationException">The requested access is not compatible with the archive's open mode.</exception> 72/// <exception cref="InvalidOperationException">The requested access is not compatible with the archive's open mode.</exception>
System\IO\Compression\ZipArchiveEntry.cs (4)
260/// <exception cref="InvalidOperationException">This property is not available because the entry has been written to or modified.</exception> 389/// <exception cref="InvalidOperationException">This property is not available because the entry has been written to or modified.</exception> 474/// <exception cref="InvalidOperationException">The requested access is not compatible with the archive's open mode.</exception> 502/// <exception cref="InvalidOperationException">The requested access is not compatible with the archive's open mode.</exception>
System\IO\Compression\Zstandard\ZstandardDecoder.cs (1)
369/// <exception cref="InvalidOperationException">The decoder is in an invalid state for setting a prefix.</exception>
System\IO\Compression\Zstandard\ZstandardEncoder.cs (1)
403/// <exception cref="InvalidOperationException">The encoder is in an invalid state for setting a prefix.</exception>
System\IO\Compression\Zstandard\ZstandardStream.Compress.cs (9)
77/// <exception cref="InvalidOperationException">Attempting to set the source size on a decompression stream, or compression has already started.</exception> 219/// <exception cref="InvalidOperationException">The <see cref="CompressionMode" /> value was <see cref="CompressionMode.Decompress"/> when the object was created, or concurrent read operations were attempted.</exception> 232/// <exception cref="InvalidOperationException">The <see cref="CompressionMode" /> value was <see cref="CompressionMode.Decompress"/> when the object was created, or concurrent read operations were attempted.</exception> 242/// <exception cref="InvalidOperationException">The <see cref="CompressionMode" /> value was <see cref="CompressionMode.Decompress"/> when the object was created, or concurrent read operations were attempted.</exception> 259/// <exception cref="InvalidOperationException">The <see cref="CompressionMode" /> value was <see cref="CompressionMode.Decompress"/> when the object was created, or concurrent read operations were attempted.</exception> 272/// <exception cref="InvalidOperationException">The <see cref="CompressionMode" /> value was <see cref="CompressionMode.Decompress"/> when the object was created, or concurrent read operations were attempted.</exception> 299/// <exception cref="InvalidOperationException">The <see cref="CompressionMode" /> value was <see cref="CompressionMode.Decompress"/> when the object was created, or concurrent read operations were attempted.</exception> 315/// <exception cref="InvalidOperationException">Concurrent write operations are not supported.</exception> 333/// <exception cref="InvalidOperationException">Concurrent write operations are not supported.</exception>
System\IO\Compression\Zstandard\ZstandardStream.Decompress.cs (6)
117/// <exception cref="InvalidOperationException">The <see cref="CompressionMode" /> value was <see cref="CompressionMode.Compress"/> when the object was created or concurrent read operations were attempted.</exception> 132/// <exception cref="InvalidOperationException">The <see cref="CompressionMode" /> value was <see cref="CompressionMode.Compress"/> when the object was created or concurrent read operations were attempted.</exception> 292/// <exception cref="InvalidOperationException">The <see cref="CompressionMode" /> value was <see cref="CompressionMode.Compress"/> when the object was created or concurrent read operations were attempted.</exception> 306/// <exception cref="InvalidOperationException">The <see cref="CompressionMode" /> value was <see cref="CompressionMode.Compress"/> when the object was created or concurrent read operations were attempted.</exception> 393/// <exception cref="InvalidOperationException">The <see cref="CompressionMode" /> value was <see cref="CompressionMode.Compress"/> when the object was created or concurrent read operations were attempted.</exception> 412/// <exception cref="InvalidOperationException">The <see cref="CompressionMode" /> value was <see cref="CompressionMode.Compress"/> when the object was created or concurrent read operations were attempted.</exception>
System.IO.Compression.Brotli (7)
System\IO\Compression\dec\BrotliStream.Decompress.cs (4)
27/// <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> 42/// <exception cref="InvalidOperationException"><para>Cannot perform read operations on a <see cref="BrotliStream" /> constructed with <see cref="CompressionMode.Compress" />.</para> 107/// <exception cref="System.InvalidOperationException">This call cannot be completed.</exception> 116/// <exception cref="System.InvalidOperationException">The end operation cannot be performed because the stream is closed.</exception>
System\IO\Compression\enc\BrotliStream.Compress.cs (3)
62/// <exception cref="InvalidOperationException"><para>Cannot perform write operations on a <see cref="BrotliStream" /> constructed with <see cref="CompressionMode.Decompress" />.</para> 112/// <exception cref="System.InvalidOperationException">The write operation cannot be performed because the stream is closed.</exception> 118/// <exception cref="System.InvalidOperationException">The underlying stream is closed or <see langword="null" />.</exception>
System.IO.Compression.ZipFile (1)
System\IO\Compression\ZipFileExtensions.ZipArchiveEntry.Extract.cs (1)
150catch (InvalidOperationException) { }
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)
2177/// <exception cref="InvalidOperationException">The input sequence contains more than one element.</exception> 2210/// <exception cref="InvalidOperationException">More than one element satisfies the condition in <paramref name="predicate" />.</exception>
System.Memory (3)
src\runtime\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)
680var e = new InvalidOperationException(SR.net_http_content_no_task_returned);
System\Net\Http\SocketsHttpHandler\Http2Connection.cs (1)
2181catch (Exception e) when (e is IOException || e is ObjectDisposedException || e is InvalidOperationException)
System\Net\Http\SocketsHttpHandler\HttpConnection.cs (1)
926if (exception is InvalidOperationException)
System.Net.Http.WinHttpHandler (1)
System\Net\Http\WinHttpHandler.cs (1)
1566else if (ex is WinHttpException || ex is IOException || ex 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)
309/// <exception cref="InvalidOperationException">Uninitialized <see cref="IPNetwork"/> instance.</exception> 319/// <exception cref="InvalidOperationException">Uninitialized <see cref="IPNetwork"/> instance.</exception>
System.Net.Security (12)
System\Net\Security\NegotiateAuthentication.cs (6)
173/// <exception cref="InvalidOperationException">Authentication failed or has not occurred.</exception> 328/// <exception cref="InvalidOperationException">Authentication failed or has not occurred.</exception> 355/// <exception cref="InvalidOperationException">Authentication failed or has not occurred.</exception> 383/// <exception cref="InvalidOperationException">Authentication failed or has not occurred.</exception> 407/// <exception cref="InvalidOperationException">Authentication failed or has not occurred.</exception> 432/// <exception cref="InvalidOperationException">Authentication failed or has not occurred.</exception>
System\Net\Security\TlsBufferSession.cs (4)
34/// <exception cref="InvalidOperationException">A <see cref="TlsContext"/> has not been assigned via <see cref="TlsSession.SetContext"/>.</exception> 46/// <exception cref="InvalidOperationException">The handshake has not yet completed.</exception> 57/// <exception cref="InvalidOperationException">The handshake has not yet completed.</exception> 82/// <exception cref="InvalidOperationException">The session is client-side, the handshake has not yet completed, or the current session is not TLS 1.3.</exception>
System\Net\Security\TlsSession.cs (2)
614/// <exception cref="InvalidOperationException"> 694/// <exception cref="InvalidOperationException">
System.Net.ServerSentEvents (2)
System\Net\ServerSentEvents\SseParser_1.cs (2)
98/// <exception cref="InvalidOperationException">The parser has already been enumerated. Such an exception may propagate out of a call to <see cref="IEnumerator.MoveNext"/>.</exception> 177/// <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)
1293/// <exception cref="InvalidOperationException">The <see cref="Socket"/> object is not in blocking mode and cannot accept this synchronous call.</exception> 1321/// <exception cref="InvalidOperationException">The <see cref="Socket"/> object is not in blocking mode and cannot accept this synchronous call.</exception> 1748/// <exception cref="InvalidOperationException">
System\Net\Sockets\UDPClient.cs (5)
566/// <exception cref="InvalidOperationException">The <see cref="UdpClient"/> has already established a default remote host.</exception> 600/// <exception cref="InvalidOperationException"><see cref="UdpClient"/> has already established a default remote host and <paramref name="endPoint"/> is not <see langword="null"/>.</exception> 892/// <exception cref="InvalidOperationException"><see cref="UdpClient"/> has already established a default remote host and <paramref name="endPoint"/> is not <see langword="null"/>.</exception> 933/// <exception cref="InvalidOperationException">The <see cref="UdpClient"/> has already established a default remote host.</exception> 962/// <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 (120)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Collections\BitArray.cs (1)
1111private InvalidOperationException GetInvalidOperationException(int index)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Collections\Concurrent\ConcurrentDictionary.cs (1)
238/// <exception cref="InvalidOperationException">This instance's comparer is not compatible with <typeparamref name="TAlternateKey"/>.</exception>
src\runtime\src\libraries\System.Private.CoreLib\src\System\Collections\Generic\Dictionary.cs (1)
645/// <exception cref="InvalidOperationException">The dictionary's comparer is not compatible with <typeparamref name="TAlternateKey"/>.</exception>
src\runtime\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\runtime\src\libraries\System.Private.CoreLib\src\System\Enum.cs (4)
303/// <exception cref="InvalidOperationException"> 1394/// <exception cref="InvalidOperationException"><paramref name="format"/> equals "X" or "x", but the enumeration type is unknown.</exception> 1624/// <exception cref="InvalidOperationException"><paramref name="format"/> equals "X" or "x", but the enumeration type is unknown.</exception> 2158private static InvalidOperationException CreateUnknownEnumTypeException() =>
src\runtime\src\libraries\System.Private.CoreLib\src\System\IO\StreamReader.cs (2)
895/// <exception cref="InvalidOperationException">The reader is currently in use by a previous read operation.</exception> 1026/// <exception cref="InvalidOperationException">The reader is currently in use by a previous read operation.</exception>
src\runtime\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\runtime\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\runtime\src\libraries\System.Private.CoreLib\src\System\IO\TextWriter.cs (1)
803/// <exception cref="InvalidOperationException">The writer is currently in use by a previous write operation.</exception>
src\runtime\src\libraries\System.Private.CoreLib\src\System\Lazy.cs (1)
495/// <exception cref="InvalidOperationException">
src\runtime\src\libraries\System.Private.CoreLib\src\System\MemoryExtensions.cs (4)
4321/// <exception cref="InvalidOperationException"> 4337/// <exception cref="InvalidOperationException"> 4391/// <exception cref="InvalidOperationException"> 4413/// <exception cref="InvalidOperationException">
src\runtime\src\libraries\System.Private.CoreLib\src\System\MemoryExtensions.Globalization.cs (6)
238/// <exception cref="InvalidOperationException">The source and destination buffers overlap.</exception> 264/// <exception cref="InvalidOperationException">The source and destination buffers overlap.</exception> 290/// <exception cref="InvalidOperationException">The source and destination buffers overlap.</exception> 316/// <exception cref="InvalidOperationException">The source and destination buffers overlap.</exception> 340/// <exception cref="InvalidOperationException">The source and destination buffers overlap.</exception> 351/// <exception cref="InvalidOperationException">The source and destination buffers overlap.</exception>
src\runtime\src\libraries\System.Private.CoreLib\src\System\MemoryExtensions.MinMax.cs (4)
20/// <exception cref="InvalidOperationException"><paramref name="span"/> is empty and <typeparamref name="T"/> is a non-nullable value type.</exception> 52/// <exception cref="InvalidOperationException"><paramref name="span"/> is empty and <typeparamref name="T"/> is a non-nullable value type.</exception> 73/// <exception cref="InvalidOperationException"><paramref name="span"/> is empty and <typeparamref name="T"/> is a non-nullable value type.</exception> 105/// <exception cref="InvalidOperationException"><paramref name="span"/> is empty and <typeparamref name="T"/> is a non-nullable value type.</exception>
src\runtime\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\runtime\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\runtime\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\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\AsyncTaskMethodBuilderT.cs (3)
40/// <exception cref="InvalidOperationException">The builder is incorrectly initialized.</exception> 642/// <exception cref="InvalidOperationException">The task has already completed.</exception> 690/// <exception cref="InvalidOperationException">The task has already completed.</exception>
src\runtime\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\runtime\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\runtime\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\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\ExceptionServices\ExceptionHandling.cs (1)
25/// <exception cref="InvalidOperationException">A handler is already set.</exception>
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\ComWrappers.cs (2)
1572/// in a <see cref="System.InvalidOperationException"/> being thrown. 1593/// in a <see cref="System.InvalidOperationException"/> being thrown.
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\IDynamicInterfaceCastable.cs (1)
46/// <see cref="InvalidOperationException" /> will be thrown.
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Java\JavaMarshal.Unsupported.cs (2)
33/// <exception cref="InvalidOperationException">The subsystem cannot be initialized or is reinitialized.</exception> 71/// <exception cref="InvalidOperationException">The provided handle is null or does not represent a reference-tracking handle.</exception>
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\ObjectiveC\ObjectiveCMarshal.PlatformNotSupported.cs (4)
49/// <exception cref="InvalidOperationException">Thrown if this API has already been called.</exception> 75/// <exception cref="InvalidOperationException">Thrown if the ObjectiveCMarshal API has not been initialized.</exception> 105/// <exception cref="InvalidOperationException">Thrown if the ObjectiveCMarshal API has not been initialized.</exception> 160/// <exception cref="InvalidOperationException">Thrown if the msgSend function has already been overridden.</exception>
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\SafeBuffer.cs (1)
379private static InvalidOperationException NotInitialized()
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\Loader\AssemblyLoadContext.cs (1)
327/// <exception cref="InvalidOperationException">The location override has already been set.</exception>
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\ExecutionContext.cs (1)
231/// <exception cref="InvalidOperationException"><paramref name="executionContext"/> is null.</exception>
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\LazyInitializer.cs (1)
86/// <exception cref="InvalidOperationException"><paramref name="valueFactory"/> returned
src\runtime\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\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\ManualResetEventSlim.cs (6)
368/// <exception cref="InvalidOperationException"> 389/// <exception cref="InvalidOperationException"> 418/// <exception cref="InvalidOperationException"> 451/// <exception cref="InvalidOperationException"> 477/// <exception cref="InvalidOperationException"> 501/// <exception cref="InvalidOperationException">
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\SpinLock.cs (2)
565/// <exception cref="InvalidOperationException"> 613catch (InvalidOperationException)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\Task.cs (7)
1057/// <exception cref="InvalidOperationException"> 1082/// <exception cref="InvalidOperationException"> 1142/// <exception cref="InvalidOperationException"> 1167/// <exception cref="InvalidOperationException"> 1725/// <exception cref="InvalidOperationException"> 2637/// <exception cref="InvalidOperationException">The awaiter was not properly initialized.</exception> 2709/// <exception cref="InvalidOperationException">The awaiter was not properly initialized.</exception>
src\runtime\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\runtime\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\runtime\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\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Thread.cs (2)
176/// <exception cref="InvalidOperationException">This thread was created using a <see cref="ThreadStart"/> delegate instead of a <see cref="ParameterizedThreadStart"/> delegate.</exception> 186/// <exception cref="InvalidOperationException">This thread was created using a <see cref="ThreadStart"/> delegate instead of a <see cref="ParameterizedThreadStart"/> delegate.</exception>
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\ThreadLocal.cs (2)
216/// <exception cref="InvalidOperationException"> 234/// <exception cref="InvalidOperationException">
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Timer.cs (1)
624var e = new InvalidOperationException(SR.InvalidOperation_TimerAlreadyClosed);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\WaitHandle.cs (1)
496var ex = new InvalidOperationException(SR.InvalidOperation_InvalidHandle);
src\runtime\src\libraries\System.Private.CoreLib\src\System\ThrowHelper.cs (2)
723private static InvalidOperationException GetInvalidOperationException(ExceptionResource resource) 758private static InvalidOperationException GetInvalidOperationException_EnumCurrent(int index)
src\runtime\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>
System\GC.NativeAot.cs (9)
207/// <exception cref="InvalidOperationException">If Concurrent GC is enabled</exception>" 281/// <exception cref="InvalidOperationException">Raised if called 299/// <exception cref="InvalidOperationException">If the GC is already in a NoGCRegion</exception> 377/// <exception cref="InvalidOperationException">If the GC is already in a NoGCRegion</exception> 393/// <exception cref="InvalidOperationException">If the GC is already in a NoGCRegion</exception> 411/// <exception cref="InvalidOperationException">If the GC is already in a NoGCRegion</exception> 452/// <exception cref="InvalidOperationException">If the GC is not in a no GC region</exception> 453/// <exception cref="InvalidOperationException">If the no GC region was exited due to an induced GC</exception> 454/// <exception cref="InvalidOperationException">If the no GC region was exited due to memory allocations
System.Private.DataContractSerialization (1)
System\Runtime\Serialization\DataContractSet.cs (1)
381catch (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)
71/// <exception cref="InvalidOperationException">The handle was freed.</exception>
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)
97/// <exception cref="InvalidOperationException"> 120/// <exception cref="InvalidOperationException"> 141/// <exception cref="InvalidOperationException"> 167/// <exception cref="InvalidOperationException"> 218/// <exception cref="InvalidOperationException"> 420/// <exception cref="InvalidOperationException"> 458/// <exception cref="InvalidOperationException"> 518/// <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> 588/// <exception cref="InvalidOperationException">Builder is not writable, it has been linked with another one.</exception> 627/// <exception cref="InvalidOperationException">Builder is not writable, it has been linked with another one.</exception> 657/// <exception cref="InvalidOperationException">Builder is not writable, it has been linked with another one.</exception> 698/// <exception cref="InvalidOperationException">Builder is not writable, it has been linked with another one.</exception> 745/// <exception cref="InvalidOperationException">Builder is not writable, it has been linked with another one.</exception> 758/// <exception cref="InvalidOperationException">Builder is not writable, it has been linked with another one.</exception> 772/// <exception cref="InvalidOperationException">Builder is not writable, it has been linked with another one.</exception> 785/// <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> 814/// <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> 827/// <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> 840/// <exception cref="InvalidOperationException">Builder is not writable, it has been linked with another one.</exception> 847/// <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> 860/// <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> 873/// <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> 886/// <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> 899/// <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> 912/// <exception cref="InvalidOperationException">Builder is not writable, it has been linked with another one.</exception> 919/// <exception cref="InvalidOperationException">Builder is not writable, it has been linked with another one.</exception> 926/// <exception cref="InvalidOperationException">Builder is not writable, it has been linked with another one.</exception> 933/// <exception cref="InvalidOperationException">Builder is not writable, it has been linked with another one.</exception> 944/// <exception cref="InvalidOperationException">Builder is not writable, it has been linked with another one.</exception> 964/// <exception cref="InvalidOperationException">Builder is not writable, it has been linked with another one.</exception> 984/// <exception cref="InvalidOperationException">Builder is not writable, it has been linked with another one.</exception> 1027/// <exception cref="InvalidOperationException">Builder is not writable, it has been linked with another one.</exception> 1049/// <exception cref="InvalidOperationException">Builder is not writable, it has been linked with another one.</exception> 1070/// <exception cref="InvalidOperationException">Builder is not writable, it has been linked with another one.</exception> 1137/// <exception cref="InvalidOperationException">Builder is not writable, it has been linked with another one.</exception> 1156/// <exception cref="InvalidOperationException">Builder is not writable, it has been linked with another one.</exception> 1166/// <exception cref="InvalidOperationException">Builder is not writable, it has been linked with another one.</exception>
System\Reflection\Metadata\BlobWriter.cs (2)
419/// <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>
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)
95/// <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)
src\runtime\artifacts\obj\System.Runtime\Release\net11.0\System.Runtime.Forwards.cs (1)
287[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 (18)
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)
413/// <exception cref="InvalidOperationException"> 463/// <exception cref="InvalidOperationException"> 562/// <exception cref="InvalidOperationException"> 610/// <exception cref="InvalidOperationException"> 673/// <exception cref="InvalidOperationException"> 751/// <exception cref="InvalidOperationException"> 809/// <exception cref="InvalidOperationException"> 957/// <exception cref="InvalidOperationException"> 1002/// <exception cref="InvalidOperationException">
System\Security\Cryptography\X509Certificates\X500RelativeDistinguishedName.cs (2)
85/// <exception cref="InvalidOperationException"> 111/// <exception cref="InvalidOperationException">
System\Security\Cryptography\X509Certificates\X509Certificate2.cs (5)
746/// <exception cref="InvalidOperationException"> 843/// <exception cref="InvalidOperationException"> 945/// <exception cref="InvalidOperationException"> 1040/// <exception cref="InvalidOperationException"> 1147/// <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) 630/// <exception cref="InvalidOperationException">The <see cref="ProtectedHeaders"/> and <see cref="UnprotectedHeaders"/> collections have one or more labels in common.</exception> 647/// <exception cref="InvalidOperationException">The <see cref="ProtectedHeaders"/> and <see cref="UnprotectedHeaders"/> collections have one or more labels in common.</exception> 666/// <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> 822/// <exception cref="InvalidOperationException">The content is embedded on this message, use an overload that uses embedded content.</exception> 885/// <exception cref="InvalidOperationException">The content is embedded on this message, use an overload that uses embedded content.</exception> 990/// <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 (17)
System\IdentityModel\CryptoHelper.cs (1)
107catch (InvalidOperationException)
System\IdentityModel\Tokens\KeyInfoSerializer.cs (1)
332return ((e is ArgumentException) || (e is FormatException) || (e is InvalidOperationException));
System\IdentityModel\Tokens\X509AsymmetricSecurityKey.cs (1)
406catch (InvalidOperationException)
System\ServiceModel\Channels\MessageFault.cs (1)
108catch (InvalidOperationException e)
System\ServiceModel\Channels\ServiceChannel.cs (1)
865catch (InvalidOperationException)
System\ServiceModel\Dispatcher\ChannelDispatcher.cs (5)
447catch (InvalidOperationException e) 466private InvalidOperationException CreateOuterExceptionWithEndpointsInformation(InvalidOperationException e) 523catch (InvalidOperationException e) 542catch (InvalidOperationException e)
System\ServiceModel\Dispatcher\DataContractSerializerOperationFormatter.cs (1)
523catch (InvalidOperationException e)
System\ServiceModel\Dispatcher\XmlSerializerOperationFormatter.cs (4)
137catch (InvalidOperationException e) 267catch (InvalidOperationException e) 361catch (InvalidOperationException e) 474catch (InvalidOperationException e)
System\ServiceModel\Security\IssuanceTokenProviderBase.cs (1)
631|| e is InvalidOperationException
System\ServiceModel\Security\WSSecurityTokenSerializer.cs (1)
184return ((e is ArgumentException) || (e is FormatException) || (e is InvalidOperationException));
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)
96private static InvalidOperationException CreateInvalidStateException() => new InvalidOperationException(SR.XmlBufferInInvalidState);
System.Speech (3)
Internal\Synthesis\SSmlParser.cs (1)
1580catch (InvalidOperationException)
Recognition\RecognizerBase.cs (1)
845if (e is COMException || e is InvalidOperationException || e is KeyNotFoundException)
Synthesis\InstalledVoice.cs (1)
120catch (InvalidOperationException)
System.Text.Json (297)
System\Text\Json\Document\JsonDocument.cs (1)
98/// <exception cref="InvalidOperationException">
System\Text\Json\Document\JsonElement.cs (47)
54/// <exception cref="InvalidOperationException"> 77/// <exception cref="InvalidOperationException"> 94/// <exception cref="InvalidOperationException"> 122/// <exception cref="InvalidOperationException"> 165/// <exception cref="InvalidOperationException"> 204/// <exception cref="InvalidOperationException"> 244/// <exception cref="InvalidOperationException"> 282/// <exception cref="InvalidOperationException"> 318/// <exception cref="InvalidOperationException"> 338/// <exception cref="InvalidOperationException"> 370/// <exception cref="InvalidOperationException"> 395/// <exception cref="InvalidOperationException"> 415/// <exception cref="InvalidOperationException"> 446/// <exception cref="InvalidOperationException"> 464/// <exception cref="InvalidOperationException"> 495/// <exception cref="InvalidOperationException"> 515/// <exception cref="InvalidOperationException"> 545/// <exception cref="InvalidOperationException"> 562/// <exception cref="InvalidOperationException"> 592/// <exception cref="InvalidOperationException"> 613/// <exception cref="InvalidOperationException"> 644/// <exception cref="InvalidOperationException"> 661/// <exception cref="InvalidOperationException"> 691/// <exception cref="InvalidOperationException"> 712/// <exception cref="InvalidOperationException"> 743/// <exception cref="InvalidOperationException"> 763/// <exception cref="InvalidOperationException"> 793/// <exception cref="InvalidOperationException"> 814/// <exception cref="InvalidOperationException"> 854/// <exception cref="InvalidOperationException"> 882/// <exception cref="InvalidOperationException"> 921/// <exception cref="InvalidOperationException"> 949/// <exception cref="InvalidOperationException"> 979/// <exception cref="InvalidOperationException"> 1000/// <exception cref="InvalidOperationException"> 1031/// <exception cref="InvalidOperationException"> 1051/// <exception cref="InvalidOperationException"> 1082/// <exception cref="InvalidOperationException"> 1102/// <exception cref="InvalidOperationException"> 1133/// <exception cref="InvalidOperationException"> 1153/// <exception cref="InvalidOperationException"> 1432/// <exception cref="InvalidOperationException"> 1459/// <exception cref="InvalidOperationException"> 1490/// <exception cref="InvalidOperationException"> 1540/// <exception cref="InvalidOperationException"> 1568/// <exception cref="InvalidOperationException"> 1594/// <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)
28/// 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.Pipe.cs (1)
137/// <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)
293/// <exception cref="InvalidOperationException"> 331/// <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)
50/// <exception cref="InvalidOperationException">
System\Text\Json\Serialization\JsonSerializerOptions.cs (22)
230/// <exception cref="InvalidOperationException"> 278/// <exception cref="InvalidOperationException"> 305/// <exception cref="InvalidOperationException"> 329/// <exception cref="InvalidOperationException"> 392/// <exception cref="InvalidOperationException"> 424/// <exception cref="InvalidOperationException"> 455/// <exception cref="InvalidOperationException"> 508/// <exception cref="InvalidOperationException"> 532/// <exception cref="InvalidOperationException"> 552/// <exception cref="InvalidOperationException"> 571/// <exception cref="InvalidOperationException"> 642/// <exception cref="InvalidOperationException"> 701/// <exception cref="InvalidOperationException"> 722/// <exception cref="InvalidOperationException"> 744/// <exception cref="InvalidOperationException"> 785/// <exception cref="InvalidOperationException"> 805/// <exception cref="InvalidOperationException"> 834/// <exception cref="InvalidOperationException"> 857/// <exception cref="InvalidOperationException"> 883/// <exception cref="InvalidOperationException"> 939/// <exception cref="InvalidOperationException">The instance does not specify a <see cref="TypeInfoResolver"/> setting.</exception> 955/// <exception cref="InvalidOperationException">
System\Text\Json\Serialization\Metadata\DefaultJsonTypeInfoResolver.Helpers.cs (1)
697catch (InvalidOperationException) when (ignoreCondition == JsonIgnoreCondition.Always)
System\Text\Json\Serialization\Metadata\JsonPolymorphismOptions.cs (3)
35/// <exception cref="InvalidOperationException"> 52/// <exception cref="InvalidOperationException"> 70/// <exception cref="InvalidOperationException">
System\Text\Json\Serialization\Metadata\JsonPropertyInfo.cs (12)
39/// <exception cref="InvalidOperationException"> 61/// <exception cref="InvalidOperationException"> 80/// <exception cref="InvalidOperationException"> 107/// <exception cref="InvalidOperationException"> 152/// <exception cref="InvalidOperationException"> 228/// <exception cref="InvalidOperationException"> 264/// <exception cref="InvalidOperationException"> 303/// <exception cref="InvalidOperationException"> 333/// <exception cref="InvalidOperationException"> 780/// <exception cref="InvalidOperationException"> 827/// <exception cref="InvalidOperationException"> 1028/// <exception cref="InvalidOperationException">
System\Text\Json\Serialization\Metadata\JsonTypeInfo.cs (12)
74/// <exception cref="InvalidOperationException"> 105/// <exception cref="InvalidOperationException"> 135/// <exception cref="InvalidOperationException"> 165/// <exception cref="InvalidOperationException"> 201/// <exception cref="InvalidOperationException"> 290/// <exception cref="InvalidOperationException"> 732/// <exception cref="InvalidOperationException"> 764/// <exception cref="InvalidOperationException"> 804/// <exception cref="InvalidOperationException"> 842/// <exception cref="InvalidOperationException"> 872/// <exception cref="InvalidOperationException"> 1421/// <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. 593/// <exception cref="InvalidOperationException"> 606/// <exception cref="InvalidOperationException"> 743/// <exception cref="InvalidOperationException"> 757/// <exception cref="InvalidOperationException"> 789/// <exception cref="InvalidOperationException"> 814/// <exception cref="InvalidOperationException"> 895/// <exception cref="InvalidOperationException"> 918/// <exception cref="InvalidOperationException"> 938/// <exception cref="InvalidOperationException"> 963/// <exception cref="InvalidOperationException"> 1034/// <exception cref="InvalidOperationException"> 1046/// <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"> 215/// <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)
108/// returns <see langword="false"/> and <see cref="Current"/> throws an <see cref="InvalidOperationException"/>. 167/// <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"> 413/// <exception cref="System.InvalidOperationException">The barrier already has 0 participants.</exception> 414/// <exception cref="System.InvalidOperationException"> 476/// <exception cref="System.InvalidOperationException"> 499/// <exception cref="System.InvalidOperationException"> 535/// <exception cref="System.InvalidOperationException"> 565/// <exception cref="System.InvalidOperationException"> 599/// <exception cref="System.InvalidOperationException"> 628/// <exception cref="System.InvalidOperationException"> 917/// <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)
1800/// <exception cref="System.InvalidOperationException">The exception that is thrown when the 1803/// <exception cref="System.InvalidOperationException">The exception that is thrown when any 1805/// <exception cref="System.InvalidOperationException">The exception that is thrown when the 1808/// <exception cref="System.InvalidOperationException">The exception that is thrown when the 1811/// <exception cref="System.InvalidOperationException">The exception that is thrown when the 1851/// <exception cref="System.InvalidOperationException">The exception that is thrown when the 1854/// <exception cref="System.InvalidOperationException">The exception that is thrown when any 1856/// <exception cref="System.InvalidOperationException">The exception that is thrown when the 1859/// <exception cref="System.InvalidOperationException">The exception that is thrown when the 1862/// <exception cref="System.InvalidOperationException">The exception that is thrown when the 1904/// <exception cref="System.InvalidOperationException">The exception that is thrown when the 1907/// <exception cref="System.InvalidOperationException">The exception that is thrown when the 1910/// <exception cref="System.InvalidOperationException">The exception that is thrown when any 1912/// <exception cref="System.InvalidOperationException">The exception that is thrown when the 1915/// <exception cref="System.InvalidOperationException">The exception that is thrown when the 1918/// <exception cref="System.InvalidOperationException">The exception that is thrown when the 1974/// <exception cref="System.InvalidOperationException">The exception that is thrown when the 1977/// <exception cref="System.InvalidOperationException">The exception that is thrown when any 1979/// <exception cref="System.InvalidOperationException">The exception that is thrown when the 1982/// <exception cref="System.InvalidOperationException">The exception that is thrown when the 1985/// <exception cref="System.InvalidOperationException">The exception that is thrown when the 2049/// <exception cref="System.InvalidOperationException">The exception that is thrown when the 2052/// <exception cref="System.InvalidOperationException">The exception that is thrown when the 2055/// <exception cref="System.InvalidOperationException">The exception that is thrown when any 2057/// <exception cref="System.InvalidOperationException">The exception that is thrown when the 2060/// <exception cref="System.InvalidOperationException">The exception that is thrown when the 2063/// <exception cref="System.InvalidOperationException">The exception that is thrown when the 2130/// <exception cref="System.InvalidOperationException">The exception that is thrown when the 2133/// <exception cref="System.InvalidOperationException">The exception that is thrown when any 2135/// <exception cref="System.InvalidOperationException">The exception that is thrown when the 2138/// <exception cref="System.InvalidOperationException">The exception that is thrown when the 2141/// <exception cref="System.InvalidOperationException">The exception that is thrown when the 2194/// <exception cref="System.InvalidOperationException">The exception that is thrown when the 2197/// <exception cref="System.InvalidOperationException">The exception that is thrown when any 2199/// <exception cref="System.InvalidOperationException">The exception that is thrown when the 2202/// <exception cref="System.InvalidOperationException">The exception that is thrown when the 2205/// <exception cref="System.InvalidOperationException">The exception that is thrown when the 2260/// <exception cref="System.InvalidOperationException">The exception that is thrown when the 2263/// <exception cref="System.InvalidOperationException">The exception that is thrown when the 2266/// <exception cref="System.InvalidOperationException">The exception that is thrown when any 2268/// <exception cref="System.InvalidOperationException">The exception that is thrown when the 2271/// <exception cref="System.InvalidOperationException">The exception that is thrown when the 2274/// <exception cref="System.InvalidOperationException">The exception that is thrown when the 2343/// <exception cref="System.InvalidOperationException">The exception that is thrown when the 2346/// <exception cref="System.InvalidOperationException">The exception that is thrown when any 2348/// <exception cref="System.InvalidOperationException">The exception that is thrown when the 2351/// <exception cref="System.InvalidOperationException">The exception that is thrown when the 2354/// <exception cref="System.InvalidOperationException">The exception that is thrown when the 2431/// <exception cref="System.InvalidOperationException">The exception that is thrown when the 2434/// <exception cref="System.InvalidOperationException">The exception that is thrown when the 2437/// <exception cref="System.InvalidOperationException">The exception that is thrown when any 2439/// <exception cref="System.InvalidOperationException">The exception that is thrown when the 2442/// <exception cref="System.InvalidOperationException">The exception that is thrown when the 2445/// <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 (87)
System\Windows\Forms\ActiveX\AxHost.cs (2)
3561catch (InvalidOperationException) 3585catch (InvalidOperationException)
System\Windows\Forms\Application.cs (3)
706/// <exception cref="InvalidOperationException"> 1522/// <exception cref="InvalidOperationException"> 1540/// <exception cref="InvalidOperationException">
System\Windows\Forms\Control_InvokeAsync.cs (2)
230/// <exception cref="InvalidOperationException">Thrown if the control's handle is not yet created.</exception> 334/// <exception cref="InvalidOperationException">Thrown if the control's handle is not yet created.</exception>
System\Windows\Forms\Control.cs (3)
5098/// <exception cref="InvalidOperationException"> 13502catch (InvalidOperationException) 13526catch (InvalidOperationException)
System\Windows\Forms\ControlMutationExtensions.cs (2)
43/// <exception cref="InvalidOperationException"><paramref name="target"/> is not a <see cref="Control"/>.</exception> 60/// <exception cref="InvalidOperationException"><paramref name="target"/> is not a <see cref="Control"/>.</exception>
System\Windows\Forms\Controls\DateTimePicker\DateTimePicker.cs (1)
1457catch (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)
2019catch (InvalidOperationException)
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyDescriptorGridEntry.cs (1)
882catch (InvalidOperationException ex)
System\Windows\Forms\Dialogs\TaskDialog\TaskDialog.cs (7)
323/// <exception cref="InvalidOperationException"> 355/// <exception cref="InvalidOperationException"> 388/// <exception cref="InvalidOperationException"> 452/// <exception cref="InvalidOperationException"> 484/// <exception cref="InvalidOperationException"> 518/// <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)
5447/// <exception cref="InvalidOperationException"> 5472/// If the operating system is in a non-interactive mode, this method will throw an <see cref="InvalidOperationException"/>. 5562/// If the operating system is in a non-interactive mode, this method will throw an <see cref="InvalidOperationException"/>. 5565/// If the form is already displayed asynchronously, an <see cref="InvalidOperationException"/> will be thrown. 5568/// An <see cref="InvalidOperationException"/> will also occur if no 5613/// <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"> 5912/// an <see cref="InvalidOperationException"/> will be thrown. 5915/// An <see cref="InvalidOperationException"/> will also occur if no 5926/// <exception cref="InvalidOperationException">
System\Windows\Forms\WindowSubclassHandler.cs (3)
84/// <exception cref="InvalidOperationException"><see cref="Open"/> was already called.</exception> 131/// <exception cref="InvalidOperationException"> 171/// <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)
448catch (InvalidOperationException)
System\Windows\Forms\Design\DesignBindingPicker.cs (2)
1287catch (InvalidOperationException ex) 1439catch (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)
221if (e is InvalidOperationException) 357if (e is InvalidOperationException)
System\Windows\Forms\Design\TableLayoutPanelDesigner.cs (5)
1686catch (InvalidOperationException ex) 1763catch (InvalidOperationException ex) 1925catch (InvalidOperationException ex) 2020catch (InvalidOperationException ex) 2039catch (InvalidOperationException ex)
System\Windows\Forms\Design\ToolStripDesigner.cs (1)
2447catch (InvalidOperationException ex)
System\Windows\Forms\Design\ToolStripItemCustomMenuItemCollection.cs (2)
243catch (InvalidOperationException ex) 608catch (InvalidOperationException ex)
System\Windows\Forms\Design\ToolStripMenuItemDesigner.cs (1)
799catch (InvalidOperationException ex)
System.Windows.Forms.Primitives (6)
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\Animation\HighPrecisionTimer.cs (1)
94/// <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>
TypeScriptApiCompat (1)
TypeScriptApiCompatRunner.cs (1)
43catch (Exception ex) when (ex is IOException or UnauthorizedAccessException or InvalidDataException or InvalidOperationException)
UIAutomationClient (2)
MS\Internal\Automation\HwndProxyElementProvider.cs (1)
456catch (InvalidOperationException /*err*/)
MS\Internal\Automation\WindowInteractionStateTracker.cs (1)
87catch (InvalidOperationException)
vstest.console (1)
CommandLine\Executor.cs (1)
423if (ex is CommandLineException or TestPlatformException or SettingsException or InvalidOperationException)
vstest.console.arm64 (1)
src\vstest\src\vstest.console\CommandLine\Executor.cs (1)
423if (ex is CommandLineException or TestPlatformException or SettingsException or InvalidOperationException)
WindowsFormsIntegration (1)
System\Windows\Integration\WindowsFormsHost.cs (1)
216InvalidOperationException exception = new InvalidOperationException(SR.Host_CannotRotateWindowsFormsHost);