134 instantiations of InvalidEnumArgumentException
Aspire.Hosting (1)
Dcp\DcpExecutor.cs (1)
332_ => 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)
376throw new InvalidEnumArgumentException("format", (int)format, typeof(TextDataFormat)); 432throw new InvalidEnumArgumentException("format", (int)format, typeof(TextDataFormat)); 528throw 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)); 28170throw 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)
1282throw new InvalidEnumArgumentException(nameof(autoSizeRowMode), (int)autoSizeRowMode, typeof(DataGridViewAutoSizeRowMode)); 1696throw 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)
1034throw new InvalidEnumArgumentException(nameof(unit), (int)unit, typeof(TextUnit)); 1164throw 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)
FontConverterTests.cs (1)
109Assert.Throws<InvalidEnumArgumentException>(paramName, () => FontConverter.ConvertFrom(input));
System.Windows.Forms.Design.Tests (1)
System\ComponentModel\Design\ByteViewerTests.cs (1)
855Assert.Throws<InvalidEnumArgumentException>("mode", () => control.SetDisplayMode(value));
System.Windows.Forms.Tests (192)
CheckedListBoxTests.cs (2)
121Assert.Throws<InvalidEnumArgumentException>("value", () => control.SelectionMode = value); 389Assert.Throws<InvalidEnumArgumentException>("value", () => control.SetItemCheckState(0, value));
MaskedTextBoxTests.cs (3)
333.Should().Throw<InvalidEnumArgumentException>() 337.Should().Throw<InvalidEnumArgumentException>() 443.Should().Throw<InvalidEnumArgumentException>();
System\Windows\Forms\ApplicationTests.cs (1)
360Assert.Throws<InvalidEnumArgumentException>("highDpiMode", () => Application.SetHighDpiMode(value));
System\Windows\Forms\AxHostTests.cs (2)
344Assert.Throws<InvalidEnumArgumentException>("value", () => control.BackgroundImageLayout = value); 570Assert.Throws<InvalidEnumArgumentException>("value", () => control.ImeMode = value);
System\Windows\Forms\ButtonBaseTests.cs (5)
1375Assert.Throws<InvalidEnumArgumentException>("value", () => control.FlatStyle = value); 2052Assert.Throws<InvalidEnumArgumentException>("value", () => control.ImageAlign = value); 2706Assert.Throws<InvalidEnumArgumentException>("value", () => control.ImeMode = value); 3495Assert.Throws<InvalidEnumArgumentException>("value", () => control.TextAlign = value); 3725Assert.Throws<InvalidEnumArgumentException>("value", () => control.TextImageRelation = value);
System\Windows\Forms\ButtonTests.cs (2)
611Assert.Throws<InvalidEnumArgumentException>("value", () => control.AutoSizeMode = value); 665Assert.Throws<InvalidEnumArgumentException>("value", () => control.DialogResult = value);
System\Windows\Forms\CheckBoxTests.cs (4)
170Assert.Throws<InvalidEnumArgumentException>("value", () => control.Appearance = value); 207Assert.Throws<InvalidEnumArgumentException>("value", () => control.CheckAlign = value); 289Assert.Throws<InvalidEnumArgumentException>("value", () => control.CheckState = value); 444Assert.Throws<InvalidEnumArgumentException>("value", () => control.TextAlign = value);
System\Windows\Forms\ClipboardTests.cs (3)
96action.Should().Throw<InvalidEnumArgumentException>().WithParameterName("format"); 160action.Should().Throw<InvalidEnumArgumentException>().WithParameterName("format"); 528action.Should().Throw<InvalidEnumArgumentException>().WithParameterName("format");
System\Windows\Forms\ColumnHeaderCollectionTests.cs (3)
329Assert.Throws<InvalidEnumArgumentException>("value", () => collection.Add("text", 1, textAlign)); 330Assert.Throws<InvalidEnumArgumentException>("value", () => collection.Add("name", "text", 1, textAlign, "imageKey")); 331Assert.Throws<InvalidEnumArgumentException>("value", () => collection.Add("name", "text", 1, textAlign, 1));
System\Windows\Forms\ColumnHeaderTests.cs (2)
1215Assert.Throws<InvalidEnumArgumentException>("value", () => header.TextAlign = value); 1452Assert.Throws<InvalidEnumArgumentException>("headerAutoResize", () => header.AutoResize(headerAutoResize));
System\Windows\Forms\ComboBoxTests.cs (5)
162Assert.Throws<InvalidEnumArgumentException>("value", () => control.AutoCompleteMode = value); 615Assert.Throws<InvalidEnumArgumentException>("value", () => control.BackgroundImageLayout = value); 889Assert.Throws<InvalidEnumArgumentException>("value", () => control.AutoCompleteSource = source); 983Assert.Throws<InvalidEnumArgumentException>("value", () => control.DropDownStyle = value); 1318Assert.Throws<InvalidEnumArgumentException>("value", () => control.RightToLeft = value);
System\Windows\Forms\ContainerControlTests.cs (3)
275Assert.Throws<InvalidEnumArgumentException>("value", () => control.AutoScaleMode = value); 343Assert.Throws<InvalidEnumArgumentException>("value", () => control.AutoValidate = value); 1217Assert.Throws<InvalidEnumArgumentException>("validationConstraints", () => control.ValidateChildren(validationConstraints));
System\Windows\Forms\ControlTests.Methods.cs (1)
2097Assert.Throws<InvalidEnumArgumentException>("skipValue", () => control.GetChildAtPoint(new Point(5, 5), skipValue));
System\Windows\Forms\ControlTests.Properties.cs (6)
178Assert.Throws<InvalidEnumArgumentException>("value", () => control.AccessibleRole = value); 2137Assert.Throws<InvalidEnumArgumentException>("value", () => control.BackgroundImageLayout = value); 4425Assert.Throws<InvalidEnumArgumentException>("value", () => control.Dock = value); 6447Assert.Throws<InvalidEnumArgumentException>("value", () => control.ImeMode = value); 6554Assert.Throws<InvalidEnumArgumentException>("value", () => control.ImeModeBase = value); 10438Assert.Throws<InvalidEnumArgumentException>("value", () => control.RightToLeft = value);
System\Windows\Forms\DataGridViewCellStyleTests.cs (2)
130Assert.Throws<InvalidEnumArgumentException>("value", () => style.Alignment = value); 612Assert.Throws<InvalidEnumArgumentException>("value", () => style.WrapMode = value);
System\Windows\Forms\DataGridViewCellTests.cs (5)
5319Assert.Throws<InvalidEnumArgumentException>("flags", () => DataGridViewCell.MeasureTextHeight(graphics, "text", SystemFonts.DefaultFont, 10, flags)); 5320Assert.Throws<InvalidEnumArgumentException>("flags", () => DataGridViewCell.MeasureTextHeight(graphics, "text", SystemFonts.DefaultFont, 10, flags, out widthTruncated)); 5377Assert.Throws<InvalidEnumArgumentException>("flags", () => DataGridViewCell.MeasureTextPreferredSize(graphics, "text", SystemFonts.DefaultFont, 0.2f, flags)); 5423Assert.Throws<InvalidEnumArgumentException>("flags", () => DataGridViewCell.MeasureTextSize(graphics, "text", SystemFonts.DefaultFont, flags)); 5479Assert.Throws<InvalidEnumArgumentException>("flags", () => DataGridViewCell.MeasureTextWidth(graphics, "text", SystemFonts.DefaultFont, 10, flags));
System\Windows\Forms\DataGridViewColumnTests.cs (3)
493Assert.Throws<InvalidEnumArgumentException>("value", () => column.AutoSizeMode = value); 1783Assert.Throws<InvalidEnumArgumentException>("autoSizeColumnMode", () => column.GetPreferredWidth(autoSizeColumnMode, fixedHeight: true)); 1784Assert.Throws<InvalidEnumArgumentException>("autoSizeColumnMode", () => column.GetPreferredWidth(autoSizeColumnMode, fixedHeight: false));
System\Windows\Forms\DataGridViewRowTests.cs (2)
2902Assert.Throws<InvalidEnumArgumentException>("value", () => row.Resizable = value); 5677Assert.Throws<InvalidEnumArgumentException>("paintParts", () => row.PaintHeader(graphics, Rectangle.Empty, Rectangle.Empty, -1, DataGridViewElementStates.None, true, true, paintParts));
System\Windows\Forms\DataGridViewTests.cs (2)
786Assert.Throws<InvalidEnumArgumentException>("value", () => control.ColumnHeadersHeightSizeMode = value); 1727Assert.Throws<InvalidEnumArgumentException>("value", () => control.RowHeadersWidthSizeMode = value);
System\Windows\Forms\DataObjectTests.cs (3)
200((Action)(() => dataObject.ContainsText(format))).Should().Throw<InvalidEnumArgumentException>().WithParameterName("format"); 1038action.Should().Throw<InvalidEnumArgumentException>().WithParameterName("format"); 1909.Throw<InvalidEnumArgumentException>().WithParameterName("format");
System\Windows\Forms\DateTimePickerTests.cs (1)
170Assert.Throws<InvalidEnumArgumentException>("value", () => control.Format = value);
System\Windows\Forms\DragDropHelperTests.cs (1)
238Assert.Throws<InvalidEnumArgumentException>(nameof(dropImageType),
System\Windows\Forms\ErrorProviderTests.cs (2)
181Assert.Throws<InvalidEnumArgumentException>("value", () => provider.BlinkStyle = value); 1099Assert.Throws<InvalidEnumArgumentException>("value", () => provider.SetIconAlignment(control, value));
System\Windows\Forms\FlowLayoutPanelTests.cs (1)
177Assert.Throws<InvalidEnumArgumentException>("value", () => control.FlowDirection = value);
System\Windows\Forms\FlowLayoutSettingsTests.cs (1)
54Assert.Throws<InvalidEnumArgumentException>("value", () => settings.FlowDirection = value);
System\Windows\Forms\GroupBoxTests.cs (1)
563Assert.Throws<InvalidEnumArgumentException>("value", () => control.AutoSizeMode = value);
System\Windows\Forms\HelpProviderTests.cs (1)
352Assert.Throws<InvalidEnumArgumentException>("navigator", () => provider.SetHelpNavigator(new Control(), navigator));
System\Windows\Forms\HScrollBarTests.cs (1)
199Assert.Throws<InvalidEnumArgumentException>("value", () => control.RightToLeft = value);
System\Windows\Forms\ImageListTests.cs (1)
225Assert.Throws<InvalidEnumArgumentException>("value", () => list.ColorDepth = value);
System\Windows\Forms\LabelTests.cs (2)
248Assert.Throws<InvalidEnumArgumentException>("value", () => control.ImageAlign = value); 737Assert.Throws<InvalidEnumArgumentException>(() => label.LiveSetting = (AutomationLiveSetting)999);
System\Windows\Forms\Layout\TableLayoutSettingsTests.cs (1)
119Assert.Throws<InvalidEnumArgumentException>("value", () => settings.GrowStyle = value);
System\Windows\Forms\ListBoxTests.cs (5)
590Assert.Throws<InvalidEnumArgumentException>("value", () => control.BackgroundImageLayout = value); 650Assert.Throws<InvalidEnumArgumentException>("value", () => control.BorderStyle = value); 1029Assert.Throws<InvalidEnumArgumentException>("value", () => control.DrawMode = value); 2232Assert.Throws<InvalidEnumArgumentException>("value", () => control.RightToLeft = value); 3907Assert.Throws<InvalidEnumArgumentException>("value", () => control.SelectionMode = value);
System\Windows\Forms\ListViewGroupTests.cs (3)
785Assert.Throws<InvalidEnumArgumentException>("value", () => group.FooterAlignment = value); 1037Assert.Throws<InvalidEnumArgumentException>("value", () => group.HeaderAlignment = value); 1173Assert.Throws<InvalidEnumArgumentException>("value", () => group.CollapsedState = value);
System\Windows\Forms\ListViewTests.cs (6)
248Assert.Throws<InvalidEnumArgumentException>("value", () => listView.Activation = value); 259Assert.Throws<InvalidEnumArgumentException>("value", () => listView.Activation = value); 329Assert.Throws<InvalidEnumArgumentException>("value", () => listView.Alignment = value); 614Assert.Throws<InvalidEnumArgumentException>("value", () => control.BackgroundImageLayout = value); 792Assert.Throws<InvalidEnumArgumentException>("value", () => listView.BorderStyle = value); 2124Assert.Throws<InvalidEnumArgumentException>("value", () => listView.HeaderStyle = value);
System\Windows\Forms\MessageBoxTests.cs (3)
17Assert.Throws<InvalidEnumArgumentException>( 60Assert.Throws<InvalidEnumArgumentException>( 102Assert.Throws<InvalidEnumArgumentException>(
System\Windows\Forms\MonthCalendarTests.cs (3)
492Assert.Throws<InvalidEnumArgumentException>("value", () => control.BackgroundImageLayout = value); 918Assert.Throws<InvalidEnumArgumentException>("FirstDayOfWeek", () => calendar.FirstDayOfWeek = value); 1308Assert.Throws<InvalidEnumArgumentException>("value", () => control.ImeMode = value);
System\Windows\Forms\NotifyIconTests.cs (2)
73Assert.Throws<InvalidEnumArgumentException>("value", () => notifyIcon.BalloonTipIcon = value); 976Assert.Throws<InvalidEnumArgumentException>("tipIcon", () => notifyIcon.ShowBalloonTip(0, "Title", "Text", tipIcon));
System\Windows\Forms\PanelTests.cs (2)
551Assert.Throws<InvalidEnumArgumentException>("value", () => control.AutoSizeMode = value); 607Assert.Throws<InvalidEnumArgumentException>("value", () => control.BorderStyle = value);
System\Windows\Forms\PictureBoxTests.cs (4)
176Assert.Throws<InvalidEnumArgumentException>("value", () => pictureBox.BorderStyle = value); 1006Assert.Throws<InvalidEnumArgumentException>("value", () => control.ImeMode = value); 1276Assert.Throws<InvalidEnumArgumentException>("value", () => control.RightToLeft = value); 1391Assert.Throws<InvalidEnumArgumentException>("value", () => pictureBox.SizeMode = value);
System\Windows\Forms\ProgressBarTests.cs (3)
337Assert.Throws<InvalidEnumArgumentException>("value", () => control.BackgroundImageLayout = value); 759Assert.Throws<InvalidEnumArgumentException>("value", () => control.ImeMode = value); 1507Assert.Throws<InvalidEnumArgumentException>("value", () => control.Style = value);
System\Windows\Forms\PropertyGridTests.cs (1)
529Assert.Throws<InvalidEnumArgumentException>("value", () => control.BackgroundImageLayout = value);
System\Windows\Forms\RadioButtonTests.cs (2)
174Assert.Throws<InvalidEnumArgumentException>("value", () => control.CheckAlign = value); 395Assert.Throws<InvalidEnumArgumentException>("value", () => control.TextAlign = value);
System\Windows\Forms\RichTextBoxTests.cs (4)
3154Assert.Throws<InvalidEnumArgumentException>("value", () => control.ScrollBars = value); 3792Assert.Throws<InvalidEnumArgumentException>("value", () => control.SelectionAlignment = value); 8771Assert.Throws<InvalidEnumArgumentException>("fileType", () => control.LoadFile(stream, fileType)); 9735Assert.Throws<InvalidEnumArgumentException>("fileType", () => control.SaveFile(stream, fileType));
System\Windows\Forms\ScrollBarTests.cs (3)
362Assert.Throws<InvalidEnumArgumentException>("value", () => control.BackgroundImageLayout = value); 681Assert.Throws<InvalidEnumArgumentException>("value", () => control.ImeMode = value); 1239Assert.Throws<InvalidEnumArgumentException>("value", () => control.RightToLeft = value);
System\Windows\Forms\SplitterPanelTests.cs (2)
381Assert.Throws<InvalidEnumArgumentException>("value", () => control.BorderStyle = value); 444Assert.Throws<InvalidEnumArgumentException>("value", () => control.Dock = value);
System\Windows\Forms\SplitterTests.cs (2)
371Assert.Throws<InvalidEnumArgumentException>("value", () => control.BorderStyle = value); 987Assert.Throws<InvalidEnumArgumentException>("value", () => control.ImeMode = value);
System\Windows\Forms\StatusStripTests.cs (1)
609Assert.Throws<InvalidEnumArgumentException>("value", () => control.RenderMode = value);
System\Windows\Forms\TabControlTests.cs (5)
448Assert.Throws<InvalidEnumArgumentException>("value", () => control.Alignment = value); 525Assert.Throws<InvalidEnumArgumentException>("value", () => control.Appearance = value); 737Assert.Throws<InvalidEnumArgumentException>("value", () => control.BackgroundImageLayout = value); 919Assert.Throws<InvalidEnumArgumentException>("value", () => control.DrawMode = value); 2847Assert.Throws<InvalidEnumArgumentException>("value", () => control.SizeMode = value);
System\Windows\Forms\TableLayoutPanelTests.cs (3)
205Assert.Throws<InvalidEnumArgumentException>("value", () => control.BorderStyle = value); 298Assert.Throws<InvalidEnumArgumentException>("value", () => control.CellBorderStyle = value); 408Assert.Throws<InvalidEnumArgumentException>("value", () => control.GrowStyle = value);
System\Windows\Forms\TabPageTests.cs (1)
994Assert.Throws<InvalidEnumArgumentException>("value", () => control.Dock = value);
System\Windows\Forms\ToolStripButtonTests.cs (1)
998Assert.Throws<InvalidEnumArgumentException>("value", () => item.CheckState = value);
System\Windows\Forms\ToolStripContentPanelTests.cs (3)
775Assert.Throws<InvalidEnumArgumentException>("value", () => control.BorderStyle = value); 898Assert.Throws<InvalidEnumArgumentException>("value", () => control.Dock = value); 1424Assert.Throws<InvalidEnumArgumentException>("value", () => control.RenderMode = value);
System\Windows\Forms\ToolStripControlHostTests.cs (8)
251Assert.Throws<InvalidEnumArgumentException>("value", () => item.AccessibleRole = value); 747Assert.Throws<InvalidEnumArgumentException>("value", () => item.ControlAlign = value); 819Assert.Throws<InvalidEnumArgumentException>("value", () => item.DisplayStyle = value); 1266Assert.Throws<InvalidEnumArgumentException>("value", () => item.ImageAlign = value); 1637Assert.Throws<InvalidEnumArgumentException>("value", () => item.RightToLeft = value); 2327Assert.Throws<InvalidEnumArgumentException>("value", () => item.TextAlign = value); 2360Assert.Throws<InvalidEnumArgumentException>("value", () => item.TextDirection = value); 2389Assert.Throws<InvalidEnumArgumentException>("value", () => item.TextImageRelation = value);
System\Windows\Forms\ToolStripDropDownTests.cs (4)
1471Assert.Throws<InvalidEnumArgumentException>("value", () => control.DefaultDropDownDirection = value); 1808Assert.Throws<InvalidEnumArgumentException>("value", () => control.GripStyle = value); 1915Assert.Throws<InvalidEnumArgumentException>("value", () => control.ImeMode = value); 2445Assert.Throws<InvalidEnumArgumentException>("value", () => control.RightToLeft = value);
System\Windows\Forms\ToolStripItemTests.cs (13)
375Assert.Throws<InvalidEnumArgumentException>("value", () => item.AccessibleRole = value); 561Assert.Throws<InvalidEnumArgumentException>("value", () => item.Alignment = value); 2034Assert.Throws<InvalidEnumArgumentException>("value", () => item.BackgroundImageLayout = value); 2325Assert.Throws<InvalidEnumArgumentException>("value", () => item.DisplayStyle = value); 2446Assert.Throws<InvalidEnumArgumentException>("value", () => item.Dock = value); 4378Assert.Throws<InvalidEnumArgumentException>("value", () => item.ImageAlign = value); 5596Assert.Throws<InvalidEnumArgumentException>("value", () => item.ImageScaling = value); 6148Assert.Throws<InvalidEnumArgumentException>("value", () => item.MergeAction = value); 6437Assert.Throws<InvalidEnumArgumentException>("value", () => item.Overflow = value); 7410Assert.Throws<InvalidEnumArgumentException>("value", () => item.RightToLeft = value); 8494Assert.Throws<InvalidEnumArgumentException>("value", () => item.TextAlign = value); 8768Assert.Throws<InvalidEnumArgumentException>("value", () => item.TextDirection = value); 9019Assert.Throws<InvalidEnumArgumentException>("value", () => item.TextImageRelation = value);
System\Windows\Forms\ToolStripMenuItemTests.cs (1)
143Assert.Throws<InvalidEnumArgumentException>(() => item.ShortcutKeys = keys);
System\Windows\Forms\ToolStripSeparatorTests.cs (5)
224Assert.Throws<InvalidEnumArgumentException>("value", () => item.DisplayStyle = value); 469Assert.Throws<InvalidEnumArgumentException>("value", () => item.ImageAlign = value); 646Assert.Throws<InvalidEnumArgumentException>("value", () => item.TextAlign = value); 677Assert.Throws<InvalidEnumArgumentException>("value", () => item.TextDirection = value); 704Assert.Throws<InvalidEnumArgumentException>("value", () => item.TextImageRelation = value);
System\Windows\Forms\ToolStripTests.cs (8)
2244Assert.Throws<InvalidEnumArgumentException>("value", () => control.DefaultDropDownDirection = value); 2669Assert.Throws<InvalidEnumArgumentException>("value", () => control.Dock = value); 2866Assert.Throws<InvalidEnumArgumentException>("value", () => control.GripStyle = value); 3435Assert.Throws<InvalidEnumArgumentException>("value", () => control.RenderMode = value); 3567Assert.Throws<InvalidEnumArgumentException>("value", () => control.RightToLeft = value); 4096Assert.Throws<InvalidEnumArgumentException>("value", () => control.TextDirection = value); 4790Assert.Throws<InvalidEnumArgumentException>("direction", () => toolStrip.GetNextItem(new SubToolStripItem(), direction)); 4791Assert.Throws<InvalidEnumArgumentException>("direction", () => toolStrip.GetNextItem(null, direction));
System\Windows\Forms\ToolTipTests.cs (1)
563Assert.Throws<InvalidEnumArgumentException>("value", () => toolTip.ToolTipIcon = value);
System\Windows\Forms\TreeViewTests.cs (3)
907Assert.Throws<InvalidEnumArgumentException>("value", () => control.BackgroundImageLayout = value); 1033Assert.Throws<InvalidEnumArgumentException>("value", () => treeView.BorderStyle = value); 1456Assert.Throws<InvalidEnumArgumentException>("value", () => treeView.DrawMode = value);
System\Windows\Forms\UpDownBaseTests.cs (3)
808Assert.Throws<InvalidEnumArgumentException>("value", () => control.BorderStyle = value); 1426Assert.Throws<InvalidEnumArgumentException>("value", () => control.TextAlign = value); 1510Assert.Throws<InvalidEnumArgumentException>("value", () => control.UpDownAlign = value);
System\Windows\Forms\UserControlTests.cs (4)
666Assert.Throws<InvalidEnumArgumentException>("value", () => control.AutoSizeMode = value); 734Assert.Throws<InvalidEnumArgumentException>("value", () => control.AutoValidate = value); 790Assert.Throws<InvalidEnumArgumentException>("value", () => control.BorderStyle = value); 1683Assert.Throws<InvalidEnumArgumentException>("validationConstraints", () => control.ValidateChildren(validationConstraints));
System\Windows\Forms\VisualStyles\VisualStyleRendererTests.cs (4)
227Assert.Throws<InvalidEnumArgumentException>("edges", () => renderer.DrawEdge(graphics, new Rectangle(1, 2, 3, 4), edges, EdgeStyle.Bump, EdgeEffects.FillInterior)); 237Assert.Throws<InvalidEnumArgumentException>("style", () => renderer.DrawEdge(graphics, new Rectangle(1, 2, 3, 4), Edges.Bottom, style, EdgeEffects.FillInterior)); 247Assert.Throws<InvalidEnumArgumentException>("effects", () => renderer.DrawEdge(graphics, new Rectangle(1, 2, 3, 4), Edges.Bottom, EdgeStyle.Bump, effects)); 588Assert.Throws<InvalidEnumArgumentException>("prop", () => renderer.GetFont(graphics, value));
TextBoxBaseTests.cs (2)
690Assert.Throws<InvalidEnumArgumentException>("value", () => control.BorderStyle = value); 1590Assert.Throws<InvalidEnumArgumentException>("value", () => control.ImeModeBase = value);
TextBoxTests.cs (2)
269act.Should().Throw<InvalidEnumArgumentException>().And.ParamName.Should().Be("value"); 294act.Should().Throw<InvalidEnumArgumentException>().And.ParamName.Should().Be("value");
TrackBarTests.cs (3)
974Assert.Throws<InvalidEnumArgumentException>("value", () => control.ImeMode = value); 1463Assert.Throws<InvalidEnumArgumentException>("value", () => control.Orientation = value); 1962Assert.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));