134 instantiations of InvalidEnumArgumentException
Aspire.Hosting (1)
Dcp\DcpExecutor.cs (1)
327_ => throw new System.ComponentModel.InvalidEnumArgumentException($"Cannot convert {nameof(WatchEventType)} with value {watchEventType} into enum of type {nameof(ResourceSnapshotChangeType)}.")
Microsoft.Data.Analysis (1)
TextFieldParser.cs (1)
523throw new InvalidEnumArgumentException(paramName, (int)value, typeof(FieldType));
Microsoft.Data.Analysis.Tests (1)
src\Microsoft.Data.Analysis\TextFieldParser.cs (1)
523throw new InvalidEnumArgumentException(paramName, (int)value, typeof(FieldType));
Microsoft.Maui.Controls (4)
LegacyLayouts\Grid.cs (4)
406 throw new InvalidEnumArgumentException($"{nameof(view)} must be a BindableObject"); 416 throw new InvalidEnumArgumentException($"{nameof(view)} must be a BindableObject"); 426 throw new InvalidEnumArgumentException($"{nameof(view)} must be a BindableObject"); 436 throw new InvalidEnumArgumentException($"{nameof(view)} must be a BindableObject");
Microsoft.VisualBasic.Core (4)
Microsoft\VisualBasic\FileIO\FileSystem.vb (4)
1984Throw New InvalidEnumArgumentException(argName, argValue, GetType(DeleteDirectoryOption)) 1998Throw New InvalidEnumArgumentException(argName, argValue, GetType(RecycleOption)) 2012Throw New InvalidEnumArgumentException(argName, argValue, GetType(SearchOption)) 2026Throw New InvalidEnumArgumentException(argName, argValue, GetType(UICancelOption))
Microsoft.VisualBasic.Forms (5)
Microsoft\VisualBasic\ApplicationServices\WindowsFormsApplicationBase.vb (2)
1019Throw New InvalidEnumArgumentException(paramName, value, GetType(AuthenticationMode)) 1029Throw New InvalidEnumArgumentException(paramName, value, GetType(ShutdownMode))
Microsoft\VisualBasic\Logging\FileLogTraceListener.vb (3)
537Throw New InvalidEnumArgumentException(paramName, value, GetType(DiskSpaceExhaustedOption)) 547Throw New InvalidEnumArgumentException(paramName, value, GetType(LogFileCreationScheduleOption)) 557Throw New InvalidEnumArgumentException(paramName, value, GetType(LogFileLocation))
PresentationCore (48)
System\Windows\clipboard.cs (3)
124throw new InvalidEnumArgumentException(nameof(format), (int)format, typeof(TextDataFormat)); 222throw new InvalidEnumArgumentException(nameof(format), (int)format, typeof(TextDataFormat)); 335throw new InvalidEnumArgumentException(nameof(format), (int)format, typeof(TextDataFormat));
System\Windows\dataobject.cs (3)
375throw new InvalidEnumArgumentException("format", (int)format, typeof(TextDataFormat)); 431throw new InvalidEnumArgumentException("format", (int)format, typeof(TextDataFormat)); 527throw new InvalidEnumArgumentException("format", (int)format, typeof(TextDataFormat));
System\Windows\EventManager.cs (1)
62throw new System.ComponentModel.InvalidEnumArgumentException("routingStrategy", (int)routingStrategy, typeof(RoutingStrategy));
System\Windows\Input\Command\KeyGesture.cs (2)
92throw new InvalidEnumArgumentException("modifiers", (int)modifiers, typeof(ModifierKeys)); 95throw new InvalidEnumArgumentException("key", (int)key, typeof(Key));
System\Windows\Input\Command\MouseActionConverter.cs (1)
101_ => throw new InvalidEnumArgumentException(nameof(value), (int)mouseAction, typeof(MouseAction))
System\Windows\Input\Command\MouseGesture.cs (4)
59throw new InvalidEnumArgumentException("mouseAction", (int)mouseAction, typeof(MouseAction)); 62throw new InvalidEnumArgumentException("modifiers", (int)modifiers, typeof(ModifierKeys)); 90throw new InvalidEnumArgumentException("value", (int)value, typeof(MouseAction)); 111throw new InvalidEnumArgumentException("value", (int)value, typeof(ModifierKeys));
System\Windows\Input\InputReport.cs (2)
77throw new System.ComponentModel.InvalidEnumArgumentException("mode", (int)mode, typeof(InputMode)); 97throw new System.ComponentModel.InvalidEnumArgumentException("type", (int)type, typeof(InputType));
System\Windows\Input\KeyboardDevice.cs (1)
206throw new System.ComponentModel.InvalidEnumArgumentException("key", (int)key, typeof(Key));
System\Windows\Input\KeyEventArgs.cs (1)
33throw new System.ComponentModel.InvalidEnumArgumentException("key", (int)key, typeof(Key));
System\Windows\Input\MouseButton.cs (1)
76throw new System.ComponentModel.InvalidEnumArgumentException("button", (int)button, typeof(MouseButton));
System\Windows\Input\MouseDevice.cs (1)
283throw new System.ComponentModel.InvalidEnumArgumentException("captureMode", (int)captureMode, typeof(CaptureMode));
System\Windows\Input\RawKeyboardInputReport.cs (1)
60throw new System.ComponentModel.InvalidEnumArgumentException("actions", (int)actions, typeof(RawKeyboardActions));
System\Windows\Input\RawMouseInputReport.cs (1)
56throw new System.ComponentModel.InvalidEnumArgumentException("actions", (int)actions, typeof(RawMouseActions));
System\Windows\Input\RawUIStateInputReport.cs (2)
39throw new System.ComponentModel.InvalidEnumArgumentException("action", (int)action, typeof(RawUIStateActions)); 41throw new System.ComponentModel.InvalidEnumArgumentException("targets", (int)targets, typeof(RawUIStateTargets));
System\Windows\Input\Stylus\Common\RawStylusInputReport.cs (2)
182throw new InvalidEnumArgumentException(SR.Format(SR.Enum_Invalid, nameof(actions))); 238throw new InvalidEnumArgumentException(SR.Format(SR.Enum_Invalid, nameof(actions)));
System\Windows\Input\Stylus\Common\RawStylusSystemGestureInputReport.cs (1)
158throw new InvalidEnumArgumentException(SR.Format(SR.Enum_Invalid, nameof(systemGesture)));
System\Windows\Input\Stylus\Common\StylusPointPropertyInfo.cs (1)
51throw new InvalidEnumArgumentException("unit", (int)unit, typeof(StylusPointPropertyUnit));
System\Windows\Input\Stylus\Common\StylusSystemGestureEventArgs.cs (2)
36throw new InvalidEnumArgumentException(SR.Format(SR.Enum_Invalid, "systemGesture")); 78throw new InvalidEnumArgumentException(SR.Format(SR.Enum_Invalid, "systemGesture"));
System\Windows\Input\Stylus\Pointer\PointerStylusDevice.cs (1)
535throw new System.ComponentModel.InvalidEnumArgumentException("captureMode", (int)captureMode, typeof(CaptureMode));
System\Windows\Input\Stylus\Wisp\WispStylusDevice.cs (1)
229throw new System.ComponentModel.InvalidEnumArgumentException("captureMode", (int)captureMode, typeof(CaptureMode));
System\Windows\Input\TextComposition.cs (1)
87throw new InvalidEnumArgumentException("autoComplete",
System\Windows\InterOp\HwndSource.cs (1)
981throw new InvalidEnumArgumentException("value", (int)value, typeof(SizeToContent));
System\Windows\InterOp\HwndTarget.cs (1)
659throw new System.ComponentModel.InvalidEnumArgumentException("value", (int)value, typeof(RenderMode));
System\Windows\LocalizabilityAttribute.cs (3)
41throw new InvalidEnumArgumentException( 77throw new InvalidEnumArgumentException("Readability", (int) value, typeof(Readability)); 97throw new InvalidEnumArgumentException("Modifiability", (int) value, typeof(Modifiability));
System\Windows\Media\Animation\ClockController.cs (2)
157throw new InvalidEnumArgumentException(SR.Format(SR.Enum_Invalid, "TimeSeekOrigin")); 199throw new InvalidEnumArgumentException(SR.Format(SR.Enum_Invalid, "TimeSeekOrigin"));
System\Windows\Media\Animation\TimeManager.cs (1)
258throw new InvalidEnumArgumentException(SR.Format(SR.Enum_Invalid, "TimeSeekOrigin"));
System\Windows\Media\FormattedText.cs (2)
282throw new InvalidEnumArgumentException(parameterName, (int)flowDirection, typeof(FlowDirection)); 1359throw new InvalidEnumArgumentException("value", (int)value, typeof(TextTrimming));
System\Windows\Media\GlyphTypeface.cs (1)
132throw new InvalidEnumArgumentException("styleSimulations", (int)styleSimulations, typeof(StyleSimulations));
System\Windows\Media\RenderOptions.cs (1)
244throw new System.ComponentModel.InvalidEnumArgumentException("value", (int)value, typeof(RenderMode));
System\Windows\Media\textformatting\NumberSubstitution.cs (2)
55throw new InvalidEnumArgumentException("CultureSource", (int)value, typeof(NumberCultureSource)); 124throw new InvalidEnumArgumentException("Substitution", (int)value, typeof(NumberSubstitutionMethod));
System\Windows\Media\textformatting\TextFormatter.cs (1)
46throw new System.ComponentModel.InvalidEnumArgumentException("textFormattingMode", (int)textFormattingMode, typeof(TextFormattingMode));
PresentationFramework (24)
MS\Internal\IO\Packaging\ByteStream.cs (1)
216throw new System.ComponentModel.InvalidEnumArgumentException("origin",
System\Windows\Annotations\AnnotationAuthorChangedEventArgs.cs (1)
57throw new InvalidEnumArgumentException("action", (int)action, typeof(AnnotationAction));
System\Windows\Annotations\AnnotationResourceChangedEventArgs.cs (1)
57throw new InvalidEnumArgumentException("action", (int)action, typeof(AnnotationAction));
System\Windows\Application.cs (1)
837throw new InvalidEnumArgumentException("value", (int)value, typeof(ShutdownMode));
System\Windows\Controls\TextChangedEventArgs.cs (1)
75throw new InvalidEnumArgumentException("action", (int)action, typeof(UndoAction));
System\Windows\Data\Binding.cs (2)
364throw new InvalidEnumArgumentException("value", (int) value, typeof(BindingMode)); 392throw new InvalidEnumArgumentException("value", (int) value, typeof(UpdateSourceTrigger));
System\Windows\Documents\ValidationHelper.cs (2)
74throw new InvalidEnumArgumentException(argumentName, (int)direction, typeof(LogicalDirection)); 86throw new InvalidEnumArgumentException(param, (int)edge, typeof(ElementEdge));
System\Windows\FrameworkContentElement.cs (1)
1491throw new InvalidEnumArgumentException("value", (int)value, typeof(InheritanceBehavior));
System\Windows\FrameworkElement.cs (1)
2629throw new InvalidEnumArgumentException("value", (int)value, typeof(InheritanceBehavior));
System\Windows\FrameworkPropertyMetadata.cs (2)
223throw new InvalidEnumArgumentException("defaultUpdateSourceTrigger", (int) defaultUpdateSourceTrigger, typeof(UpdateSourceTrigger)); 482throw new InvalidEnumArgumentException("value", (int) value, typeof(UpdateSourceTrigger));
System\Windows\Input\KeyboardNavigation.cs (4)
2548throw new System.ComponentModel.InvalidEnumArgumentException("direction", (int)direction, typeof(FocusNavigationDirection)); 2590throw new System.ComponentModel.InvalidEnumArgumentException("direction", (int)direction, typeof(FocusNavigationDirection)); 2610throw new System.ComponentModel.InvalidEnumArgumentException("direction", (int)direction, typeof(FocusNavigationDirection)); 2698throw new System.ComponentModel.InvalidEnumArgumentException("direction", (int)direction, typeof(FocusNavigationDirection));
System\Windows\Markup\Baml2006\SharedStream.cs (1)
235throw new InvalidEnumArgumentException(nameof(origin), (int)origin, typeof(SeekOrigin));
System\Windows\Markup\XamlDesignerSerializationManager.cs (1)
74throw new InvalidEnumArgumentException("value", (int)value, typeof(XamlWriterMode));
System\Windows\MessageBox.cs (4)
350throw new InvalidEnumArgumentException ("button", (int)button, typeof(MessageBoxButton)); 354throw new InvalidEnumArgumentException ("icon", (int)icon, typeof(MessageBoxImage)); 358throw new InvalidEnumArgumentException ("defaultResult", (int)defaultResult, typeof(MessageBoxResult)); 362throw new InvalidEnumArgumentException("options", (int)options, typeof(MessageBoxOptions));
System\Windows\Window.cs (1)
1127throw new InvalidEnumArgumentException("value", (int)value, typeof( WindowStartupLocation ));
System.Data.Common (1)
System\Data\DataException.cs (1)
344private static Exception _InvalidEnumArgumentException(string error) => TraceExceptionAsReturnValue(new InvalidEnumArgumentException(error));
System.Diagnostics.Process (2)
System\Diagnostics\Process.cs (1)
485throw new InvalidEnumArgumentException(nameof(value), (int)value, typeof(ProcessPriorityClass));
System\Diagnostics\ProcessStartInfo.cs (1)
179throw new InvalidEnumArgumentException(nameof(value), (int)value, typeof(ProcessWindowStyle));
System.Private.Windows.Core (1)
System\Private\Windows\Ole\DragDropHelper.cs (1)
335throw new InvalidEnumArgumentException(nameof(dropImageType), (int)dropImageType, typeof(DROPIMAGETYPE));
System.ServiceModel.Federation (1)
System\ServiceModel\Federation\WSTrustChannelSecurityTokenProvider.cs (1)
370throw new InvalidEnumArgumentException(nameof(value), (int)value, typeof(SecurityKeyEntropyMode));
System.ServiceModel.NetFramingBase (1)
System\ServiceModel\Channels\SslProtocolsHelper.cs (1)
25throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidEnumArgumentException("value", (int)value,
System.ServiceModel.UnixDomainSocket (1)
System\ServiceModel\Channels\SslProtocolsHelper.cs (1)
25throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidEnumArgumentException(nameof(value), (int)value,
System.Windows.Forms (33)
System\Windows\Forms\Control.cs (1)
5217throw new InvalidEnumArgumentException(nameof(skipValue), value, typeof(GetChildAtPointSkip));
System\Windows\Forms\Controls\DataGridView\DataGridView.cs (2)
896throw new InvalidEnumArgumentException(nameof(value), (int)value, typeof(DataGridViewAutoSizeColumnsMode)); 962throw new InvalidEnumArgumentException(nameof(value), (int)value, typeof(DataGridViewAutoSizeRowsMode));
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (7)
1710throw new InvalidEnumArgumentException(nameof(autoSizeColumnMode), (int)autoSizeColumnMode, typeof(DataGridViewAutoSizeColumnMode)); 1958throw new InvalidEnumArgumentException(nameof(autoSizeRowMode), (int)autoSizeRowMode, typeof(DataGridViewAutoSizeRowMode)); 1992throw new InvalidEnumArgumentException(nameof(rowHeadersWidthSizeMode), (int)rowHeadersWidthSizeMode, typeof(DataGridViewRowHeadersWidthSizeMode)); 2137throw new InvalidEnumArgumentException(nameof(rowHeadersWidthSizeMode), (int)rowHeadersWidthSizeMode, typeof(DataGridViewRowHeadersWidthSizeMode)); 2359throw new InvalidEnumArgumentException(nameof(autoSizeRowsMode), (int)autoSizeRowsMode, typeof(DataGridViewAutoSizeRowsMode)); 2381throw new InvalidEnumArgumentException(nameof(autoSizeRowMode), (int)autoSizeRowMode, typeof(DataGridViewAutoSizeRowMode)); 28172throw new InvalidEnumArgumentException(nameof(direction), (int)direction, typeof(ListSortDirection));
System\Windows\Forms\Controls\DataGridView\DataGridViewBand.cs (1)
503throw new InvalidEnumArgumentException(nameof(value), (int)value, typeof(DataGridViewTriState));
System\Windows\Forms\Controls\DataGridView\DataGridViewCell.cs (3)
2547throw new InvalidEnumArgumentException(nameof(flags), (int)flags, typeof(TextFormatFlags)); 2571throw new InvalidEnumArgumentException(nameof(flags), (int)flags, typeof(TextFormatFlags)); 2615throw new InvalidEnumArgumentException(nameof(flags), (int)flags, typeof(TextFormatFlags));
System\Windows\Forms\Controls\DataGridView\DataGridViewCellStyle.cs (1)
86throw new InvalidEnumArgumentException(nameof(value), (int)value, typeof(DataGridViewContentAlignment));
System\Windows\Forms\Controls\DataGridView\DataGridViewColumn.cs (2)
91throw new InvalidEnumArgumentException(nameof(value), (int)value, typeof(DataGridViewAutoSizeColumnMode)); 905throw new InvalidEnumArgumentException(nameof(autoSizeColumnMode), (int)autoSizeColumnMode, typeof(DataGridViewAutoSizeColumnMode));
System\Windows\Forms\Controls\DataGridView\DataGridViewRow.cs (2)
1278throw new InvalidEnumArgumentException(nameof(autoSizeRowMode), (int)autoSizeRowMode, typeof(DataGridViewAutoSizeRowMode)); 1692throw new InvalidEnumArgumentException(nameof(paintParts), (int)paintParts, typeof(DataGridViewPaintParts));
System\Windows\Forms\Controls\ListView\ColumnHeader.cs (1)
422throw new InvalidEnumArgumentException(nameof(headerAutoResize), (int)headerAutoResize, typeof(ColumnHeaderAutoResizeStyle));
System\Windows\Forms\Controls\MonthCalendar\MonthCalendar.cs (1)
382throw new InvalidEnumArgumentException(nameof(FirstDayOfWeek), (int)value, typeof(Day));
System\Windows\Forms\Controls\RichTextBox\RichTextBox.cs (1)
2654_ => throw new InvalidEnumArgumentException(nameof(fileType), (int)fileType, typeof(RichTextBoxStreamType)),
System\Windows\Forms\Controls\TextBox\TextBox.cs (1)
168throw new InvalidEnumArgumentException(nameof(value), (int)value, typeof(AutoCompleteSource));
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (2)
629throw new InvalidEnumArgumentException(nameof(value), (int)value, typeof(ToolStripDropDownDirection)); 2060throw new InvalidEnumArgumentException(nameof(direction), (int)direction, typeof(ArrowDirection));
System\Windows\Forms\Controls\ToolStrips\ToolStripButton.cs (1)
100throw new InvalidEnumArgumentException(nameof(value), (int)value, typeof(CheckState));
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDownItem.cs (1)
180throw new InvalidEnumArgumentException(nameof(value), (int)value, typeof(ToolStripDropDownDirection));
System\Windows\Forms\Controls\ToolStrips\ToolStripMenuItem.cs (1)
365throw new InvalidEnumArgumentException(nameof(value), (int)value, typeof(Keys));
System\Windows\Forms\Controls\TrackBar\TrackBar.cs (2)
367throw new InvalidEnumArgumentException(nameof(value), (int)value, typeof(Orientation)); 538throw new InvalidEnumArgumentException(nameof(value), (int)value, typeof(TickStyle));
System\Windows\Forms\Layout\Containers\ContainerControl.cs (2)
221throw new InvalidEnumArgumentException(nameof(value), (int)value, typeof(AutoValidate)); 1862throw new InvalidEnumArgumentException(nameof(validationConstraints), (int)validationConstraints, typeof(ValidationConstraints));
System\Windows\Forms\NativeWindow.cs (1)
829throw new InvalidEnumArgumentException(nameof(mode), (int)mode, typeof(UnhandledExceptionMode));
System.Windows.Forms.Analyzers.CSharp (1)
System\Windows\Forms\CSharp\Generators\ApplicationConfiguration\ProjectFileReader.FontConverter.cs (1)
110throw new InvalidEnumArgumentException(nameof(style), (int)fontStyle, typeof(FontStyle));
System.Windows.Forms.Primitives (2)
System\Windows\Forms\Automation\UiaTextRange.cs (2)
1032throw new InvalidEnumArgumentException(nameof(unit), (int)unit, typeof(TextUnit)); 1162throw new InvalidEnumArgumentException(nameof(unit), (int)unit, typeof(TextUnit));
UIAutomationClientSideProviders (3)
MS\Internal\AutomationProxies\WindowsEditBoxRange.cs (3)
175throw new System.ComponentModel.InvalidEnumArgumentException("unit", (int)unit, typeof(TextUnit)); 917throw new System.ComponentModel.InvalidEnumArgumentException("unit", (int)unit, typeof(TextUnit)); 1055throw new System.ComponentModel.InvalidEnumArgumentException("unit", (int)unit, typeof(TextUnit));
249 references to InvalidEnumArgumentException
Microsoft.AspNetCore.Mvc.Core.Test (2)
ApplicationModels\ApiConventionApplicationModelConventionTest.cs (2)
10[assembly: ProducesErrorResponseType(typeof(InvalidEnumArgumentException))] 85var expected = typeof(InvalidEnumArgumentException);
Microsoft.VisualBasic.Forms.Tests (2)
System\Windows\Forms\WindowsFormsApplicationBaseTests.vb (2)
138testCode.Should.Throw(Of InvalidEnumArgumentException)() 154testCode.Should.Throw(Of InvalidEnumArgumentException)()
Microsoft.VisualBasic.Tests (2)
Microsoft\VisualBasic\Devices\AudioTests.cs (2)
27testCode.Should().Throw<InvalidEnumArgumentException>(); 55testCode.Should().Throw<InvalidEnumArgumentException>();
netstandard (1)
netstandard.cs (1)
351[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.ComponentModel.InvalidEnumArgumentException))]
PresentationCore.Tests (1)
System\Windows\Input\MouseActionConverter.Tests.cs (1)
183Assert.Throws<InvalidEnumArgumentException>(() => converter.ConvertTo(null, null, (MouseAction)(MouseAction.MiddleDoubleClick + 1), typeof(string)));
PresentationFramework (9)
System\Windows\Annotations\AnnotationAuthorChangedEventArgs.cs (1)
48/// <exception cref="InvalidEnumArgumentException">action is not a valid value from AnnotationAction</exception>
System\Windows\Annotations\AnnotationResourceChangedEventArgs.cs (1)
48/// <exception cref="InvalidEnumArgumentException">action is not a valid value from AnnotationAction</exception>
System\Windows\Documents\ITextView.cs (7)
83/// <exception cref="System.ComponentModel.InvalidEnumArgumentException"> 120/// <exception cref="System.ComponentModel.InvalidEnumArgumentException"> 180/// <exception cref="System.ComponentModel.InvalidEnumArgumentException"> 258/// <exception cref="System.ComponentModel.InvalidEnumArgumentException"> 297/// <exception cref="System.ComponentModel.InvalidEnumArgumentException"> 323/// <exception cref="System.ComponentModel.InvalidEnumArgumentException"> 381/// <exception cref="System.ComponentModel.InvalidEnumArgumentException">
System (1)
src\libraries\shims\System\ref\System.cs (1)
337[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.ComponentModel.InvalidEnumArgumentException))]
System.ComponentModel.Primitives (3)
System\ComponentModel\InvalidEnumArgumentException.cs (3)
18/// Initializes a new instance of the <see cref='InvalidEnumArgumentException'/> 26/// Initializes a new instance of the <see cref='InvalidEnumArgumentException'/> 43/// Initializes a new instance of the <see cref='InvalidEnumArgumentException'/>
System.ComponentModel.TypeConverter (1)
artifacts\obj\System.ComponentModel.TypeConverter\Debug\net10.0\System.ComponentModel.TypeConverter.Forwards.cs (1)
8[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.ComponentModel.InvalidEnumArgumentException))]
System.Drawing.Common.Tests (9)
System\Drawing\FontConverterTests.cs (1)
71Assert.Throws<InvalidEnumArgumentException>(paramName, () => converter.ConvertFrom(input));
System\Drawing\GraphicsTests.cs (7)
339AssertExtensions.Throws<InvalidEnumArgumentException>("value", () => graphics.CompositingMode = compositingMode); 423AssertExtensions.Throws<InvalidEnumArgumentException>("value", () => graphics.CompositingQuality = compositingQuality); 603AssertExtensions.Throws<InvalidEnumArgumentException>("value", () => graphics.InterpolationMode = interpolationMode); 717AssertExtensions.Throws<InvalidEnumArgumentException>("value", () => graphics.PageUnit = pageUnit); 777AssertExtensions.Throws<InvalidEnumArgumentException>("value", () => graphics.PixelOffsetMode = pixelOffsetMode); 919AssertExtensions.Throws<InvalidEnumArgumentException>("value", () => graphics.SmoothingMode = smoothingMode); 1030AssertExtensions.Throws<InvalidEnumArgumentException>("value", () => graphics.TextRenderingHint = textRenderingHint);
System\Drawing\Printing\PrinterResolutionTests.cs (1)
82Assert.Throws<InvalidEnumArgumentException>("value", () => resolution.Kind = value);
System.Windows.Forms (2)
System\Windows\Forms\Controls\ListView\ListViewGroup.cs (2)
151/// <exception cref="InvalidEnumArgumentException"> 182/// <exception cref="InvalidEnumArgumentException">
System.Windows.Forms.Analyzers.CSharp.Tests (1)
Generators\FontConverter.cs (1)
109Assert.Throws<InvalidEnumArgumentException>(paramName, () => FontConverter.ConvertFrom(input));
System.Windows.Forms.Design.Tests (1)
System\ComponentModel\Design\ByteViewerTests.cs (1)
853Assert.Throws<InvalidEnumArgumentException>("mode", () => control.SetDisplayMode(value));
System.Windows.Forms.Tests (192)
CheckedListBoxTests.cs (2)
119Assert.Throws<InvalidEnumArgumentException>("value", () => control.SelectionMode = value); 387Assert.Throws<InvalidEnumArgumentException>("value", () => control.SetItemCheckState(0, value));
MaskedTextBoxTests.cs (3)
331.Should().Throw<InvalidEnumArgumentException>() 335.Should().Throw<InvalidEnumArgumentException>() 441.Should().Throw<InvalidEnumArgumentException>();
System\Windows\Forms\ApplicationTests.cs (1)
358Assert.Throws<InvalidEnumArgumentException>("highDpiMode", () => Application.SetHighDpiMode(value));
System\Windows\Forms\AxHostTests.cs (2)
342Assert.Throws<InvalidEnumArgumentException>("value", () => control.BackgroundImageLayout = value); 568Assert.Throws<InvalidEnumArgumentException>("value", () => control.ImeMode = value);
System\Windows\Forms\ButtonBaseTests.cs (5)
1373Assert.Throws<InvalidEnumArgumentException>("value", () => control.FlatStyle = value); 2050Assert.Throws<InvalidEnumArgumentException>("value", () => control.ImageAlign = value); 2704Assert.Throws<InvalidEnumArgumentException>("value", () => control.ImeMode = value); 3493Assert.Throws<InvalidEnumArgumentException>("value", () => control.TextAlign = value); 3723Assert.Throws<InvalidEnumArgumentException>("value", () => control.TextImageRelation = value);
System\Windows\Forms\ButtonTests.cs (2)
609Assert.Throws<InvalidEnumArgumentException>("value", () => control.AutoSizeMode = value); 663Assert.Throws<InvalidEnumArgumentException>("value", () => control.DialogResult = value);
System\Windows\Forms\CheckBoxTests.cs (4)
168Assert.Throws<InvalidEnumArgumentException>("value", () => control.Appearance = value); 205Assert.Throws<InvalidEnumArgumentException>("value", () => control.CheckAlign = value); 287Assert.Throws<InvalidEnumArgumentException>("value", () => control.CheckState = value); 442Assert.Throws<InvalidEnumArgumentException>("value", () => control.TextAlign = value);
System\Windows\Forms\ClipboardTests.cs (3)
98action.Should().Throw<InvalidEnumArgumentException>().WithParameterName("format"); 162action.Should().Throw<InvalidEnumArgumentException>().WithParameterName("format"); 526action.Should().Throw<InvalidEnumArgumentException>().WithParameterName("format");
System\Windows\Forms\ColumnHeaderCollectionTests.cs (3)
327Assert.Throws<InvalidEnumArgumentException>("value", () => collection.Add("text", 1, textAlign)); 328Assert.Throws<InvalidEnumArgumentException>("value", () => collection.Add("name", "text", 1, textAlign, "imageKey")); 329Assert.Throws<InvalidEnumArgumentException>("value", () => collection.Add("name", "text", 1, textAlign, 1));
System\Windows\Forms\ColumnHeaderTests.cs (2)
1213Assert.Throws<InvalidEnumArgumentException>("value", () => header.TextAlign = value); 1450Assert.Throws<InvalidEnumArgumentException>("headerAutoResize", () => header.AutoResize(headerAutoResize));
System\Windows\Forms\ComboBoxTests.cs (5)
160Assert.Throws<InvalidEnumArgumentException>("value", () => control.AutoCompleteMode = value); 613Assert.Throws<InvalidEnumArgumentException>("value", () => control.BackgroundImageLayout = value); 887Assert.Throws<InvalidEnumArgumentException>("value", () => control.AutoCompleteSource = source); 981Assert.Throws<InvalidEnumArgumentException>("value", () => control.DropDownStyle = value); 1316Assert.Throws<InvalidEnumArgumentException>("value", () => control.RightToLeft = value);
System\Windows\Forms\ContainerControlTests.cs (3)
273Assert.Throws<InvalidEnumArgumentException>("value", () => control.AutoScaleMode = value); 341Assert.Throws<InvalidEnumArgumentException>("value", () => control.AutoValidate = value); 1215Assert.Throws<InvalidEnumArgumentException>("validationConstraints", () => control.ValidateChildren(validationConstraints));
System\Windows\Forms\ControlTests.Methods.cs (1)
2095Assert.Throws<InvalidEnumArgumentException>("skipValue", () => control.GetChildAtPoint(new Point(5, 5), skipValue));
System\Windows\Forms\ControlTests.Properties.cs (6)
176Assert.Throws<InvalidEnumArgumentException>("value", () => control.AccessibleRole = value); 2135Assert.Throws<InvalidEnumArgumentException>("value", () => control.BackgroundImageLayout = value); 4423Assert.Throws<InvalidEnumArgumentException>("value", () => control.Dock = value); 6445Assert.Throws<InvalidEnumArgumentException>("value", () => control.ImeMode = value); 6552Assert.Throws<InvalidEnumArgumentException>("value", () => control.ImeModeBase = value); 10436Assert.Throws<InvalidEnumArgumentException>("value", () => control.RightToLeft = value);
System\Windows\Forms\DataGridViewCellStyleTests.cs (2)
128Assert.Throws<InvalidEnumArgumentException>("value", () => style.Alignment = value); 610Assert.Throws<InvalidEnumArgumentException>("value", () => style.WrapMode = value);
System\Windows\Forms\DataGridViewCellTests.cs (5)
5317Assert.Throws<InvalidEnumArgumentException>("flags", () => DataGridViewCell.MeasureTextHeight(graphics, "text", SystemFonts.DefaultFont, 10, flags)); 5318Assert.Throws<InvalidEnumArgumentException>("flags", () => DataGridViewCell.MeasureTextHeight(graphics, "text", SystemFonts.DefaultFont, 10, flags, out widthTruncated)); 5375Assert.Throws<InvalidEnumArgumentException>("flags", () => DataGridViewCell.MeasureTextPreferredSize(graphics, "text", SystemFonts.DefaultFont, 0.2f, flags)); 5421Assert.Throws<InvalidEnumArgumentException>("flags", () => DataGridViewCell.MeasureTextSize(graphics, "text", SystemFonts.DefaultFont, flags)); 5477Assert.Throws<InvalidEnumArgumentException>("flags", () => DataGridViewCell.MeasureTextWidth(graphics, "text", SystemFonts.DefaultFont, 10, flags));
System\Windows\Forms\DataGridViewColumnTests.cs (3)
491Assert.Throws<InvalidEnumArgumentException>("value", () => column.AutoSizeMode = value); 1781Assert.Throws<InvalidEnumArgumentException>("autoSizeColumnMode", () => column.GetPreferredWidth(autoSizeColumnMode, fixedHeight: true)); 1782Assert.Throws<InvalidEnumArgumentException>("autoSizeColumnMode", () => column.GetPreferredWidth(autoSizeColumnMode, fixedHeight: false));
System\Windows\Forms\DataGridViewRowTests.cs (2)
2900Assert.Throws<InvalidEnumArgumentException>("value", () => row.Resizable = value); 5675Assert.Throws<InvalidEnumArgumentException>("paintParts", () => row.PaintHeader(graphics, Rectangle.Empty, Rectangle.Empty, -1, DataGridViewElementStates.None, true, true, paintParts));
System\Windows\Forms\DataGridViewTests.cs (2)
784Assert.Throws<InvalidEnumArgumentException>("value", () => control.ColumnHeadersHeightSizeMode = value); 1725Assert.Throws<InvalidEnumArgumentException>("value", () => control.RowHeadersWidthSizeMode = value);
System\Windows\Forms\DataObjectTests.cs (3)
200((Action)(() => dataObject.ContainsText(format))).Should().Throw<InvalidEnumArgumentException>().WithParameterName("format"); 1039action.Should().Throw<InvalidEnumArgumentException>().WithParameterName("format"); 1910.Throw<InvalidEnumArgumentException>().WithParameterName("format");
System\Windows\Forms\DateTimePickerTests.cs (1)
168Assert.Throws<InvalidEnumArgumentException>("value", () => control.Format = value);
System\Windows\Forms\DragDropHelperTests.cs (1)
236Assert.Throws<InvalidEnumArgumentException>(nameof(dropImageType),
System\Windows\Forms\ErrorProviderTests.cs (2)
179Assert.Throws<InvalidEnumArgumentException>("value", () => provider.BlinkStyle = value); 1097Assert.Throws<InvalidEnumArgumentException>("value", () => provider.SetIconAlignment(control, value));
System\Windows\Forms\FlowLayoutPanelTests.cs (1)
175Assert.Throws<InvalidEnumArgumentException>("value", () => control.FlowDirection = value);
System\Windows\Forms\FlowLayoutSettingsTests.cs (1)
52Assert.Throws<InvalidEnumArgumentException>("value", () => settings.FlowDirection = value);
System\Windows\Forms\GroupBoxTests.cs (1)
561Assert.Throws<InvalidEnumArgumentException>("value", () => control.AutoSizeMode = value);
System\Windows\Forms\HelpProviderTests.cs (1)
350Assert.Throws<InvalidEnumArgumentException>("navigator", () => provider.SetHelpNavigator(new Control(), navigator));
System\Windows\Forms\HScrollBarTests.cs (1)
197Assert.Throws<InvalidEnumArgumentException>("value", () => control.RightToLeft = value);
System\Windows\Forms\ImageListTests.cs (1)
223Assert.Throws<InvalidEnumArgumentException>("value", () => list.ColorDepth = value);
System\Windows\Forms\LabelTests.cs (2)
246Assert.Throws<InvalidEnumArgumentException>("value", () => control.ImageAlign = value); 735Assert.Throws<InvalidEnumArgumentException>(() => label.LiveSetting = (AutomationLiveSetting)999);
System\Windows\Forms\Layout\TableLayoutSettingsTests.cs (1)
117Assert.Throws<InvalidEnumArgumentException>("value", () => settings.GrowStyle = value);
System\Windows\Forms\ListBoxTests.cs (5)
588Assert.Throws<InvalidEnumArgumentException>("value", () => control.BackgroundImageLayout = value); 648Assert.Throws<InvalidEnumArgumentException>("value", () => control.BorderStyle = value); 1027Assert.Throws<InvalidEnumArgumentException>("value", () => control.DrawMode = value); 2230Assert.Throws<InvalidEnumArgumentException>("value", () => control.RightToLeft = value); 3905Assert.Throws<InvalidEnumArgumentException>("value", () => control.SelectionMode = value);
System\Windows\Forms\ListViewGroupTests.cs (3)
783Assert.Throws<InvalidEnumArgumentException>("value", () => group.FooterAlignment = value); 1035Assert.Throws<InvalidEnumArgumentException>("value", () => group.HeaderAlignment = value); 1171Assert.Throws<InvalidEnumArgumentException>("value", () => group.CollapsedState = value);
System\Windows\Forms\ListViewTests.cs (6)
246Assert.Throws<InvalidEnumArgumentException>("value", () => listView.Activation = value); 257Assert.Throws<InvalidEnumArgumentException>("value", () => listView.Activation = value); 327Assert.Throws<InvalidEnumArgumentException>("value", () => listView.Alignment = value); 612Assert.Throws<InvalidEnumArgumentException>("value", () => control.BackgroundImageLayout = value); 790Assert.Throws<InvalidEnumArgumentException>("value", () => listView.BorderStyle = value); 2122Assert.Throws<InvalidEnumArgumentException>("value", () => listView.HeaderStyle = value);
System\Windows\Forms\MessageBoxTests.cs (3)
15Assert.Throws<InvalidEnumArgumentException>( 58Assert.Throws<InvalidEnumArgumentException>( 100Assert.Throws<InvalidEnumArgumentException>(
System\Windows\Forms\MonthCalendarTests.cs (3)
490Assert.Throws<InvalidEnumArgumentException>("value", () => control.BackgroundImageLayout = value); 916Assert.Throws<InvalidEnumArgumentException>("FirstDayOfWeek", () => calendar.FirstDayOfWeek = value); 1306Assert.Throws<InvalidEnumArgumentException>("value", () => control.ImeMode = value);
System\Windows\Forms\NotifyIconTests.cs (2)
71Assert.Throws<InvalidEnumArgumentException>("value", () => notifyIcon.BalloonTipIcon = value); 974Assert.Throws<InvalidEnumArgumentException>("tipIcon", () => notifyIcon.ShowBalloonTip(0, "Title", "Text", tipIcon));
System\Windows\Forms\PanelTests.cs (2)
549Assert.Throws<InvalidEnumArgumentException>("value", () => control.AutoSizeMode = value); 605Assert.Throws<InvalidEnumArgumentException>("value", () => control.BorderStyle = value);
System\Windows\Forms\PictureBoxTests.cs (4)
174Assert.Throws<InvalidEnumArgumentException>("value", () => pictureBox.BorderStyle = value); 1004Assert.Throws<InvalidEnumArgumentException>("value", () => control.ImeMode = value); 1274Assert.Throws<InvalidEnumArgumentException>("value", () => control.RightToLeft = value); 1389Assert.Throws<InvalidEnumArgumentException>("value", () => pictureBox.SizeMode = value);
System\Windows\Forms\ProgressBarTests.cs (3)
335Assert.Throws<InvalidEnumArgumentException>("value", () => control.BackgroundImageLayout = value); 757Assert.Throws<InvalidEnumArgumentException>("value", () => control.ImeMode = value); 1505Assert.Throws<InvalidEnumArgumentException>("value", () => control.Style = value);
System\Windows\Forms\PropertyGridTests.cs (1)
527Assert.Throws<InvalidEnumArgumentException>("value", () => control.BackgroundImageLayout = value);
System\Windows\Forms\RadioButtonTests.cs (2)
172Assert.Throws<InvalidEnumArgumentException>("value", () => control.CheckAlign = value); 393Assert.Throws<InvalidEnumArgumentException>("value", () => control.TextAlign = value);
System\Windows\Forms\RichTextBoxTests.cs (4)
3152Assert.Throws<InvalidEnumArgumentException>("value", () => control.ScrollBars = value); 3790Assert.Throws<InvalidEnumArgumentException>("value", () => control.SelectionAlignment = value); 8769Assert.Throws<InvalidEnumArgumentException>("fileType", () => control.LoadFile(stream, fileType)); 9733Assert.Throws<InvalidEnumArgumentException>("fileType", () => control.SaveFile(stream, fileType));
System\Windows\Forms\ScrollBarTests.cs (3)
360Assert.Throws<InvalidEnumArgumentException>("value", () => control.BackgroundImageLayout = value); 679Assert.Throws<InvalidEnumArgumentException>("value", () => control.ImeMode = value); 1237Assert.Throws<InvalidEnumArgumentException>("value", () => control.RightToLeft = value);
System\Windows\Forms\SplitterPanelTests.cs (2)
379Assert.Throws<InvalidEnumArgumentException>("value", () => control.BorderStyle = value); 442Assert.Throws<InvalidEnumArgumentException>("value", () => control.Dock = value);
System\Windows\Forms\SplitterTests.cs (2)
369Assert.Throws<InvalidEnumArgumentException>("value", () => control.BorderStyle = value); 985Assert.Throws<InvalidEnumArgumentException>("value", () => control.ImeMode = value);
System\Windows\Forms\StatusStripTests.cs (1)
607Assert.Throws<InvalidEnumArgumentException>("value", () => control.RenderMode = value);
System\Windows\Forms\TabControlTests.cs (5)
446Assert.Throws<InvalidEnumArgumentException>("value", () => control.Alignment = value); 523Assert.Throws<InvalidEnumArgumentException>("value", () => control.Appearance = value); 735Assert.Throws<InvalidEnumArgumentException>("value", () => control.BackgroundImageLayout = value); 917Assert.Throws<InvalidEnumArgumentException>("value", () => control.DrawMode = value); 2845Assert.Throws<InvalidEnumArgumentException>("value", () => control.SizeMode = value);
System\Windows\Forms\TableLayoutPanelTests.cs (3)
203Assert.Throws<InvalidEnumArgumentException>("value", () => control.BorderStyle = value); 296Assert.Throws<InvalidEnumArgumentException>("value", () => control.CellBorderStyle = value); 406Assert.Throws<InvalidEnumArgumentException>("value", () => control.GrowStyle = value);
System\Windows\Forms\TabPageTests.cs (1)
992Assert.Throws<InvalidEnumArgumentException>("value", () => control.Dock = value);
System\Windows\Forms\ToolStripButtonTests.cs (1)
996Assert.Throws<InvalidEnumArgumentException>("value", () => item.CheckState = value);
System\Windows\Forms\ToolStripContentPanelTests.cs (3)
773Assert.Throws<InvalidEnumArgumentException>("value", () => control.BorderStyle = value); 896Assert.Throws<InvalidEnumArgumentException>("value", () => control.Dock = value); 1422Assert.Throws<InvalidEnumArgumentException>("value", () => control.RenderMode = value);
System\Windows\Forms\ToolStripControlHostTests.cs (8)
249Assert.Throws<InvalidEnumArgumentException>("value", () => item.AccessibleRole = value); 745Assert.Throws<InvalidEnumArgumentException>("value", () => item.ControlAlign = value); 817Assert.Throws<InvalidEnumArgumentException>("value", () => item.DisplayStyle = value); 1264Assert.Throws<InvalidEnumArgumentException>("value", () => item.ImageAlign = value); 1635Assert.Throws<InvalidEnumArgumentException>("value", () => item.RightToLeft = value); 2325Assert.Throws<InvalidEnumArgumentException>("value", () => item.TextAlign = value); 2358Assert.Throws<InvalidEnumArgumentException>("value", () => item.TextDirection = value); 2387Assert.Throws<InvalidEnumArgumentException>("value", () => item.TextImageRelation = value);
System\Windows\Forms\ToolStripDropDownTests.cs (4)
1469Assert.Throws<InvalidEnumArgumentException>("value", () => control.DefaultDropDownDirection = value); 1806Assert.Throws<InvalidEnumArgumentException>("value", () => control.GripStyle = value); 1913Assert.Throws<InvalidEnumArgumentException>("value", () => control.ImeMode = value); 2443Assert.Throws<InvalidEnumArgumentException>("value", () => control.RightToLeft = value);
System\Windows\Forms\ToolStripItemTests.cs (13)
373Assert.Throws<InvalidEnumArgumentException>("value", () => item.AccessibleRole = value); 559Assert.Throws<InvalidEnumArgumentException>("value", () => item.Alignment = value); 2032Assert.Throws<InvalidEnumArgumentException>("value", () => item.BackgroundImageLayout = value); 2323Assert.Throws<InvalidEnumArgumentException>("value", () => item.DisplayStyle = value); 2444Assert.Throws<InvalidEnumArgumentException>("value", () => item.Dock = value); 4376Assert.Throws<InvalidEnumArgumentException>("value", () => item.ImageAlign = value); 5594Assert.Throws<InvalidEnumArgumentException>("value", () => item.ImageScaling = value); 6146Assert.Throws<InvalidEnumArgumentException>("value", () => item.MergeAction = value); 6435Assert.Throws<InvalidEnumArgumentException>("value", () => item.Overflow = value); 7408Assert.Throws<InvalidEnumArgumentException>("value", () => item.RightToLeft = value); 8492Assert.Throws<InvalidEnumArgumentException>("value", () => item.TextAlign = value); 8766Assert.Throws<InvalidEnumArgumentException>("value", () => item.TextDirection = value); 9017Assert.Throws<InvalidEnumArgumentException>("value", () => item.TextImageRelation = value);
System\Windows\Forms\ToolStripMenuItemTests.cs (1)
145Assert.Throws<InvalidEnumArgumentException>(() => item.ShortcutKeys = keys);
System\Windows\Forms\ToolStripSeparatorTests.cs (5)
222Assert.Throws<InvalidEnumArgumentException>("value", () => item.DisplayStyle = value); 467Assert.Throws<InvalidEnumArgumentException>("value", () => item.ImageAlign = value); 644Assert.Throws<InvalidEnumArgumentException>("value", () => item.TextAlign = value); 675Assert.Throws<InvalidEnumArgumentException>("value", () => item.TextDirection = value); 702Assert.Throws<InvalidEnumArgumentException>("value", () => item.TextImageRelation = value);
System\Windows\Forms\ToolStripTests.cs (8)
2242Assert.Throws<InvalidEnumArgumentException>("value", () => control.DefaultDropDownDirection = value); 2667Assert.Throws<InvalidEnumArgumentException>("value", () => control.Dock = value); 2864Assert.Throws<InvalidEnumArgumentException>("value", () => control.GripStyle = value); 3433Assert.Throws<InvalidEnumArgumentException>("value", () => control.RenderMode = value); 3565Assert.Throws<InvalidEnumArgumentException>("value", () => control.RightToLeft = value); 4094Assert.Throws<InvalidEnumArgumentException>("value", () => control.TextDirection = value); 4788Assert.Throws<InvalidEnumArgumentException>("direction", () => toolStrip.GetNextItem(new SubToolStripItem(), direction)); 4789Assert.Throws<InvalidEnumArgumentException>("direction", () => toolStrip.GetNextItem(null, direction));
System\Windows\Forms\ToolTipTests.cs (1)
561Assert.Throws<InvalidEnumArgumentException>("value", () => toolTip.ToolTipIcon = value);
System\Windows\Forms\TreeViewTests.cs (3)
905Assert.Throws<InvalidEnumArgumentException>("value", () => control.BackgroundImageLayout = value); 1031Assert.Throws<InvalidEnumArgumentException>("value", () => treeView.BorderStyle = value); 1454Assert.Throws<InvalidEnumArgumentException>("value", () => treeView.DrawMode = value);
System\Windows\Forms\UpDownBaseTests.cs (3)
806Assert.Throws<InvalidEnumArgumentException>("value", () => control.BorderStyle = value); 1424Assert.Throws<InvalidEnumArgumentException>("value", () => control.TextAlign = value); 1508Assert.Throws<InvalidEnumArgumentException>("value", () => control.UpDownAlign = value);
System\Windows\Forms\UserControlTests.cs (4)
664Assert.Throws<InvalidEnumArgumentException>("value", () => control.AutoSizeMode = value); 732Assert.Throws<InvalidEnumArgumentException>("value", () => control.AutoValidate = value); 788Assert.Throws<InvalidEnumArgumentException>("value", () => control.BorderStyle = value); 1681Assert.Throws<InvalidEnumArgumentException>("validationConstraints", () => control.ValidateChildren(validationConstraints));
System\Windows\Forms\VisualStyles\VisualStyleRendererTests.cs (4)
225Assert.Throws<InvalidEnumArgumentException>("edges", () => renderer.DrawEdge(graphics, new Rectangle(1, 2, 3, 4), edges, EdgeStyle.Bump, EdgeEffects.FillInterior)); 235Assert.Throws<InvalidEnumArgumentException>("style", () => renderer.DrawEdge(graphics, new Rectangle(1, 2, 3, 4), Edges.Bottom, style, EdgeEffects.FillInterior)); 245Assert.Throws<InvalidEnumArgumentException>("effects", () => renderer.DrawEdge(graphics, new Rectangle(1, 2, 3, 4), Edges.Bottom, EdgeStyle.Bump, effects)); 586Assert.Throws<InvalidEnumArgumentException>("prop", () => renderer.GetFont(graphics, value));
TextBoxBaseTests.cs (2)
688Assert.Throws<InvalidEnumArgumentException>("value", () => control.BorderStyle = value); 1588Assert.Throws<InvalidEnumArgumentException>("value", () => control.ImeModeBase = value);
TextBoxTests.cs (2)
267act.Should().Throw<InvalidEnumArgumentException>().And.ParamName.Should().Be("value"); 292act.Should().Throw<InvalidEnumArgumentException>().And.ParamName.Should().Be("value");
TrackBarTests.cs (3)
972Assert.Throws<InvalidEnumArgumentException>("value", () => control.ImeMode = value); 1461Assert.Throws<InvalidEnumArgumentException>("value", () => control.Orientation = value); 1960Assert.Throws<InvalidEnumArgumentException>("value", () => control.TickStyle = value);
WindowsBase.Tests (22)
System\ComponentModel\SortDescriptionTests.cs (2)
35Assert.Throws<InvalidEnumArgumentException>("direction", () => new SortDescription("Name", direction)); 60Assert.Throws<InvalidEnumArgumentException>("value", () => description.Direction = value);
System\Windows\DesignerSerializationOptionsAttributeTests.cs (1)
25Assert.Throws<InvalidEnumArgumentException>(() => new DesignerSerializationOptionsAttribute(options));
System\Windows\Input\ModifierKeysConverterTests.cs (3)
116Assert.Throws<InvalidEnumArgumentException>("value", () => converter.ConvertTo(value, typeof(string))); 117Assert.Throws<InvalidEnumArgumentException>("value", () => converter.ConvertTo(new CustomTypeDescriptorContext(), null, value, typeof(string))); 118Assert.Throws<InvalidEnumArgumentException>("value", () => converter.ConvertTo(new CustomTypeDescriptorContext(), CultureInfo.InvariantCulture, value, typeof(string)));
System\Windows\Input\ModifierKeysValueSerializerTests.cs (2)
48Assert.Throws<InvalidEnumArgumentException>("value", () => serializer.ConvertToString(key, null)); 49Assert.Throws<InvalidEnumArgumentException>("value", () => serializer.ConvertToString(key, new CustomValueSerializerContext()));
System\Windows\Input\TraversalRequestTests.cs (1)
31Assert.Throws<InvalidEnumArgumentException>("focusNavigationDirection", () => new TraversalRequest(focusNavigationDirection));
System\Windows\Threading\DispatcherOperationTests.cs (1)
99Assert.Throws<InvalidEnumArgumentException>("value", () => operation.Priority = value);
System\Windows\Threading\DispatcherSynchronizationContextTests.cs (1)
52Assert.Throws<InvalidEnumArgumentException>("priority", () => new DispatcherSynchronizationContext(Dispatcher.CurrentDispatcher, priority));
System\Windows\Threading\DispatcherTests.cs (8)
81Assert.Throws<InvalidEnumArgumentException>("priority", () => Dispatcher.ValidatePriority(priority, "priority")); 82Assert.Throws<InvalidEnumArgumentException>("", () => Dispatcher.ValidatePriority(priority, "")); 83Assert.Throws<InvalidEnumArgumentException>(() => Dispatcher.ValidatePriority(priority, null)); 120Assert.Throws<InvalidEnumArgumentException>("priority", () => Dispatcher.Yield(priority)); 144Assert.Throws<InvalidEnumArgumentException>("priority", () => dispatcher.BeginInvoke(priority, (Action)(() => { }))); 145Assert.Throws<InvalidEnumArgumentException>("priority", () => dispatcher.BeginInvoke(priority, (Action<object>)((arg) => { }), new object())); 146Assert.Throws<InvalidEnumArgumentException>("priority", () => dispatcher.BeginInvoke(priority, (Action<object, object>)((arg1, arg2) => { }), new object(), new object[] { new object() })); 147Assert.Throws<InvalidEnumArgumentException>("priority", () => dispatcher.BeginInvoke(priority, (Action<object, object>)((arg1, arg2) => { }), new object[] { new object(), new object() }));
System\Windows\Threading\DispatcherTimerTests.cs (3)
92Assert.Throws<InvalidEnumArgumentException>("priority", () => new DispatcherTimer(priority)); 93Assert.Throws<InvalidEnumArgumentException>("priority", () => new DispatcherTimer(priority, Dispatcher.CurrentDispatcher)); 94Assert.Throws<InvalidEnumArgumentException>("priority", () => new DispatcherTimer(TimeSpan.Zero, priority, (s, e) => {}, Dispatcher.CurrentDispatcher));