171 references to OrThrowIfNull
PresentationCore (11)
System\Windows\clipboard.cs (1)
447resolver.OrThrowIfNull();
System\Windows\dataobject.cs (10)
58SetData(format, data.OrThrowIfNull()); 64SetData(format.FullName.OrThrowIfNull(), data.OrThrowIfNull()); 70SetData(format, data.OrThrowIfNull(), autoConvert); 140public object? GetData(Type format) => GetData(format.OrThrowIfNull().FullName.OrThrowIfNull()); 151resolver.OrThrowIfNull(); 195public bool GetDataPresent(Type format) => GetDataPresent(format.OrThrowIfNull().FullName.OrThrowIfNull()); 359string[] strings = new string[fileDropList.OrThrowIfNull().Count];
System.Private.Windows.Core (7)
System\Private\Windows\Ole\Composition.cs (2)
127format ??= typeof(T).FullName.OrThrowIfNull(); 177ManagedDataObject.TryGetData(typeof(T).FullName.OrThrowIfNull(), out data);
System\Private\Windows\Ole\Composition.NativeToManagedAdapter.cs (3)
516public object? GetData(Type format) => GetData(format.FullName.OrThrowIfNull()); 517public bool GetDataPresent(Type format) => GetDataPresent(format.FullName.OrThrowIfNull()); 629typeof(T).FullName.OrThrowIfNull(),
System\Private\Windows\Ole\DataObjectExtensions.cs (1)
12if (filePaths.OrThrowIfNull().Count == 0)
System\Private\Windows\Ole\DataStore.cs (1)
94SetData(format.FullName.OrThrowIfNull(), data);
System.Windows.Forms (131)
System\Drawing\Design\PaintValueEventArgs.cs (1)
25Graphics = graphics.OrThrowIfNull();
System\Drawing\Design\PropertyValueUIItem.cs (2)
17Image = uiItemImage.OrThrowIfNull(); 18InvokeHandler = handler.OrThrowIfNull();
System\Resources\ResXDataNode.cs (1)
108_fileRef = fileRef.OrThrowIfNull();
System\Resources\ResXFileRef.cs (2)
25FileName = fileName.OrThrowIfNull(); 26TypeName = typeName.OrThrowIfNull();
System\Windows\Forms\Accessibility\Control.ControlAccessibleObject.cs (1)
41_ownerControl = new(ownerControl.OrThrowIfNull());
System\Windows\Forms\Accessibility\LabelEditUiaTextProvider.cs (1)
34_owningChildEditAccessibilityObject = childEditAccessibilityObject.OrThrowIfNull();
System\Windows\Forms\ActiveX\AxHost.OleInterfaces.cs (1)
34internal OleInterfaces(AxHost host) => _host = host.OrThrowIfNull();
System\Windows\Forms\Control.ControlCollection.cs (1)
26Owner = owner.OrThrowIfNull();
System\Windows\Forms\Control.ControlNativeWindow.cs (1)
17_control = control.OrThrowIfNull();
System\Windows\Forms\Control.cs (2)
507accessibleObject = CreateAccessibilityInstance().OrThrowIfNull(); 4887data.OrThrowIfNull(nameof(data));
System\Windows\Forms\Controls\Buttons\ButtonInternal\ButtonBaseAdapter.cs (1)
19internal ButtonBaseAdapter(ButtonBase control) => Control = control.OrThrowIfNull();
System\Windows\Forms\Controls\ComboBox\ComboBox.ChildAccessibleObject.cs (1)
14_owner = owner.OrThrowIfNull();
System\Windows\Forms\Controls\ComboBox\ComboBox.ComboBoxItemAccessibleObject.cs (1)
29_owningComboBox = owningComboBox.OrThrowIfNull();
System\Windows\Forms\Controls\ComboBox\ComboBox.ComboBoxUiaTextProvider.cs (1)
34_owningComboBox = owner.OrThrowIfNull();
System\Windows\Forms\Controls\ComboBox\ComboBox.ObjectCollection.cs (1)
410InnerList[index].Item = value.OrThrowIfNull();
System\Windows\Forms\Controls\DataGridView\DataGridViewCellCollection.cs (1)
70DataGridViewCell dataGridViewCell = value.OrThrowIfNull();
System\Windows\Forms\Controls\DataGridView\DataGridViewCellPaintingEventArgs.cs (3)
33_dataGridView = dataGridView.OrThrowIfNull(); 34Graphics = graphics.OrThrowIfNull(); 43CellStyle = cellStyle.OrThrowIfNull();
System\Windows\Forms\Controls\DataGridView\DataGridViewCellStateChangedEventArgs.cs (1)
10Cell = dataGridViewCell.OrThrowIfNull();
System\Windows\Forms\Controls\DataGridView\DataGridViewCellStyleContentChangedEventArgs.cs (1)
10CellStyle = dataGridViewCellStyle.OrThrowIfNull();
System\Windows\Forms\Controls\DataGridView\DataGridViewComboBoxCell.ObjectCollection.cs (1)
166InnerArray[index] = value.OrThrowIfNull();
System\Windows\Forms\Controls\DataGridView\DataGridViewEditingControlShowingEventArgs.cs (3)
12Control = control.OrThrowIfNull(); 13_cellStyle = cellStyle.OrThrowIfNull(); 21set => _cellStyle = value.OrThrowIfNull();
System\Windows\Forms\Controls\DataGridView\DataGridViewRowDividerDoubleClickEventArgs.cs (1)
9: base((e.OrThrowIfNull()).Button, e.Clicks, e.X, e.Y, e.Delta, e.Handled)
System\Windows\Forms\Controls\DataGridView\DataGridViewRowEventArgs.cs (1)
10Row = dataGridViewRow.OrThrowIfNull();
System\Windows\Forms\Controls\DataGridView\DataGridViewRowPostPaintEventArgs.cs (3)
24_dataGridView = dataGridView.OrThrowIfNull(); 25Graphics = graphics.OrThrowIfNull(); 31InheritedRowStyle = inheritedRowStyle.OrThrowIfNull();
System\Windows\Forms\Controls\DataGridView\DataGridViewRowPrePaintEventArgs.cs (3)
26_dataGridView = dataGridView.OrThrowIfNull(); 27Graphics = graphics.OrThrowIfNull(); 33InheritedRowStyle = inheritedRowStyle.OrThrowIfNull();
System\Windows\Forms\Controls\DataGridView\DataGridViewRowStateChangedEventArgs.cs (1)
10Row = dataGridViewRow.OrThrowIfNull();
System\Windows\Forms\Controls\Labels\LinkLabel.Link.LinkAccessibleObject.cs (2)
22_owningLink = link.OrThrowIfNull(); 23_owningLinkLabel = owner.OrThrowIfNull();
System\Windows\Forms\Controls\Labels\LinkLabel.LinkCollection.cs (1)
22public LinkCollection(LinkLabel owner) => _owner = owner.OrThrowIfNull();
System\Windows\Forms\Controls\ListBoxes\CheckedListBox.CheckedIndexCollection.cs (1)
17_owner = owner.OrThrowIfNull();
System\Windows\Forms\Controls\ListBoxes\ListBox.IntegerCollection.cs (1)
19_owner = owner.OrThrowIfNull();
System\Windows\Forms\Controls\ListBoxes\ListBox.ItemAccessibleObject.cs (3)
23_owningListBox = owningListBox.OrThrowIfNull(); 24_itemEntry = itemEntry.OrThrowIfNull(); 25_owningAccessibleObject = owningAccessibleObject.OrThrowIfNull();
System\Windows\Forms\Controls\ListBoxes\ListBox.ObjectCollection.cs (1)
25_owner = owner.OrThrowIfNull();
System\Windows\Forms\Controls\ListBoxes\ListBox.SelectedIndexCollection.cs (1)
17_owner = owner.OrThrowIfNull();
System\Windows\Forms\Controls\ListBoxes\ListBox.SelectedObjectCollection.cs (1)
24_owner = owner.OrThrowIfNull();
System\Windows\Forms\Controls\ListView\ColumnHeader.ListViewColumnHeaderAccessibleObject.cs (1)
17_owningColumnHeader = columnHeader.OrThrowIfNull();
System\Windows\Forms\Controls\ListView\DrawListViewColumnHeaderEventArgs.cs (1)
28Graphics = graphics.OrThrowIfNull();
System\Windows\Forms\Controls\ListView\DrawListViewItemEventArgs.cs (2)
23Graphics = graphics.OrThrowIfNull(); 24Item = item.OrThrowIfNull();
System\Windows\Forms\Controls\ListView\DrawListViewSubItemEventArgs.cs (1)
26Graphics = graphics.OrThrowIfNull();
System\Windows\Forms\Controls\ListView\ListView.CheckedIndexCollection.cs (1)
19_owner = owner.OrThrowIfNull();
System\Windows\Forms\Controls\ListView\ListView.CheckedListViewItemCollection.cs (1)
24_owner = owner.OrThrowIfNull();
System\Windows\Forms\Controls\ListView\ListView.ColumnHeaderCollection.cs (1)
18_owner = owner.OrThrowIfNull();
System\Windows\Forms\Controls\ListView\ListView.SelectedListViewItemCollection.cs (1)
23_owner = owner.OrThrowIfNull();
System\Windows\Forms\Controls\ListView\ListViewGroup.ListViewGroupAccessibleObject.cs (2)
22_owningGroup = owningGroup.OrThrowIfNull(); 23_owningListView = listView.OrThrowIfNull();
System\Windows\Forms\Controls\ListView\ListViewItem.ListViewItemBaseAccessibleObject.cs (1)
28_owningItem = owningItem.OrThrowIfNull();
System\Windows\Forms\Controls\ListView\ListViewItem.ListViewItemImageAccessibleObject.cs (1)
18_owningItem = owner.OrThrowIfNull();
System\Windows\Forms\Controls\ListView\ListViewItem.ListViewSubItem.ListViewSubItemAccessibleObject.cs (1)
26_owningItem = owningItem.OrThrowIfNull();
System\Windows\Forms\Controls\ListView\ListViewItem.ListViewSubItemCollection.cs (2)
23_owner = owner.OrThrowIfNull(); 59_owner._subItems[index] = value.OrThrowIfNull();
System\Windows\Forms\Controls\MonthCalendar\MonthCalendar.MonthCalendarChildAccessibleObject.cs (1)
20_monthCalendarAccessibleObject = calendarAccessibleObject.OrThrowIfNull();
System\Windows\Forms\Controls\PropertyGrid\PropertyGrid.PropertyTabCollection.cs (1)
18_ownerPropertyGrid = ownerPropertyGrid.OrThrowIfNull();
System\Windows\Forms\Controls\TabControl\TabControl.TabPageCollection.cs (1)
23_owner = owner.OrThrowIfNull();
System\Windows\Forms\Controls\TabControl\TabPage.TabAccessibleObject.cs (1)
18_owningTabPage = owningTabPage.OrThrowIfNull();
System\Windows\Forms\Controls\TextBox\TextBoxBase.TextBoxBaseUiaTextProvider.cs (1)
20_owner = new(owner.OrThrowIfNull());
System\Windows\Forms\Controls\ToolStrips\ToolStripArrowRenderEventArgs.cs (1)
20Graphics = g.OrThrowIfNull();
System\Windows\Forms\Controls\ToolStrips\ToolStripContentPanelRenderEventArgs.cs (2)
15Graphics = g.OrThrowIfNull(); 16ToolStripContentPanel = contentPanel.OrThrowIfNull();
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDown.cs (3)
1815SourceControlInternal = control.OrThrowIfNull(); 1831SourceControlInternal = control.OrThrowIfNull(); 1840SourceControlInternal = control.OrThrowIfNull();
System\Windows\Forms\Controls\ToolStrips\ToolStripDropTargetManager.cs (1)
23_owner = owner.OrThrowIfNull();
System\Windows\Forms\Controls\ToolStrips\ToolStripItem.ToolStripItemAccessibleObject.cs (1)
27_ownerItem = ownerItem.OrThrowIfNull();
System\Windows\Forms\Controls\ToolStrips\ToolStripItem.ToolStripItemInternalLayout.cs (1)
27_ownerItem = ownerItem.OrThrowIfNull();
System\Windows\Forms\Controls\ToolStrips\ToolStripItemCollection.cs (1)
38_owner = owner.OrThrowIfNull();
System\Windows\Forms\Controls\ToolStrips\ToolStripItemRenderEventArgs.cs (2)
15Graphics = g.OrThrowIfNull(); 16Item = item.OrThrowIfNull();
System\Windows\Forms\Controls\ToolStrips\ToolStripManager.cs (1)
1356=> RevertMergeInternal(targetToolStrip, sourceToolStrip.OrThrowIfNull(nameof(sourceToolStrip)), revertMDIControls: false);
System\Windows\Forms\Controls\ToolStrips\ToolStripPanelRenderEventArgs.cs (2)
15Graphics = g.OrThrowIfNull(); 16ToolStripPanel = toolStripPanel.OrThrowIfNull();
System\Windows\Forms\Controls\ToolStrips\ToolStripRenderEventArgs.cs (3)
16: this(g, toolStrip, new Rectangle(Point.Empty, toolStrip.OrThrowIfNull().Size), Color.Empty) 29Graphics = g.OrThrowIfNull(); 30ToolStrip = toolStrip.OrThrowIfNull();
System\Windows\Forms\Controls\ToolStrips\ToolStripSplitStackDragDropHandler.cs (1)
18_owner = owner.OrThrowIfNull();
System\Windows\Forms\Controls\TrackBar\TrackBar.TrackBarChildAccessibleObject.cs (1)
18=> _owningTrackBar = new(owningTrackBar.OrThrowIfNull());
System\Windows\Forms\Controls\TreeView\DrawTreeNodeEventArgs.cs (1)
22Graphics = graphics.OrThrowIfNull();
System\Windows\Forms\Controls\TreeView\TreeNode.TreeNodeAccessibleObject.cs (2)
19_owningTreeNode = owningTreeNode.OrThrowIfNull(); 20_owningTreeView = owningTreeView.OrThrowIfNull();
System\Windows\Forms\Controls\UpDown\UpDownBase.UpDownButtons.UpDownButtonsAccessibleObject.DirectionButtonAccessibleObject.cs (1)
23_parent = parent.OrThrowIfNull();
System\Windows\Forms\Controls\UpDown\UpDownBase.UpDownEdit.UpDownEditAccessibleObject.cs (1)
18_parent = parent.OrThrowIfNull();
System\Windows\Forms\Controls\WebBrowser\WebBrowserSiteBase.cs (1)
40internal WebBrowserSiteBase(WebBrowserBase h) => _host = h.OrThrowIfNull();
System\Windows\Forms\Design\ComponentEditorForm.ComponentEditorPageSite.cs (1)
34_form = form.OrThrowIfNull();
System\Windows\Forms\Dialogs\TaskDialog\TaskDialog.cs (4)
331=> ShowDialogAsync(IntPtr.Zero, page.OrThrowIfNull(), startupLocation); 462=> ShowDialog(IntPtr.Zero, page.OrThrowIfNull(), startupLocation); 495=> ShowDialog(owner.OrThrowIfNull().Handle, page.OrThrowIfNull(), startupLocation);
System\Windows\Forms\Dialogs\TaskDialog\TaskDialog.WindowSubclassHandler.cs (1)
13: base((HWND)taskDialog.OrThrowIfNull().Handle)
System\Windows\Forms\Dialogs\TaskDialog\TaskDialogControl.cs (1)
60BoundPage = page.OrThrowIfNull();
System\Windows\Forms\Dialogs\TaskDialog\TaskDialogIcon.cs (2)
112: this(BitmapToIcon(image.OrThrowIfNull()), true) 130: this(icon.OrThrowIfNull(), false)
System\Windows\Forms\Dialogs\TaskDialog\TaskDialogPage.cs (2)
134_buttons = value.OrThrowIfNull(); 165_radioButtons = value.OrThrowIfNull();
System\Windows\Forms\ErrorProvider\ErrorProvider.cs (1)
572_icon = value.OrThrowIfNull();
System\Windows\Forms\Input\Cursor.cs (2)
46: this(typeof(Cursors).Assembly.GetManifestResourceStream(typeof(Cursor), resource).OrThrowIfNull()) 84: this(type.OrThrowIfNull().Module.Assembly.GetManifestResourceStream(type, resource)!)
System\Windows\Forms\Input\InputLanguageChangedEventArgs.cs (1)
33InputLanguage = inputLanguage.OrThrowIfNull();
System\Windows\Forms\Input\InputLanguageChangingEventArgs.cs (1)
34InputLanguage = inputLanguage.OrThrowIfNull();
System\Windows\Forms\ItemCheckedEventArgs.cs (1)
13Item = item.OrThrowIfNull();
System\Windows\Forms\OLE\Clipboard.cs (4)
311resolver.OrThrowIfNull(); 417public static void SetAudio(byte[] audioBytes) => SetAudio(new MemoryStream(audioBytes.OrThrowIfNull())); 423SetDataObject(new DataObject(DataFormatNames.WaveAudio, audioStream.OrThrowIfNull()), copy: true); 463SetDataObject(new DataObject(DataFormatNames.Bitmap, autoConvert: true, image.OrThrowIfNull()), copy: true);
System\Windows\Forms\OLE\DataObject.cs (7)
76public DataObject(string format, object data) : this() => SetData(format, data.OrThrowIfNull()); 79SetData(format, autoConvert, data.OrThrowIfNull()); 159resolver.OrThrowIfNull(); 236public virtual void SetAudio(byte[] audioBytes) => SetAudio(new MemoryStream(audioBytes.OrThrowIfNull())); 239SetData(DataFormatNames.WaveAudio, autoConvert: false, audioStream.OrThrowIfNull()); 243string[] strings = new string[filePaths.OrThrowIfNull().Count]; 248public virtual void SetImage(Image image) => SetData(DataFormatNames.Bitmap, true, image.OrThrowIfNull());
System\Windows\Forms\OLE\DropSource.cs (2)
22_peer = peer.OrThrowIfNull(); 23_dataObject = dataObject.OrThrowIfNull();
System\Windows\Forms\OLE\DropTarget.cs (1)
23_owner = owner.OrThrowIfNull();
System\Windows\Forms\Panels\TableLayoutPanel\TableLayoutControlCollection.cs (1)
16public TableLayoutControlCollection(TableLayoutPanel container) : base(container.OrThrowIfNull())
System\Windows\Forms\Rendering\DrawingEventArgs.cs (1)
35_graphics = graphics.OrThrowIfNull();
System\Windows\Forms\ToolTip\DrawToolTipEventArgs.cs (1)
29Graphics = graphics.OrThrowIfNull();
System\Windows\Forms\ToolTip\ToolTip.ToolTipNativeWindow.cs (1)
14_toolTip = toolTip.OrThrowIfNull();
System\Windows\Forms\VisualStyles\VisualStyleElement.cs (1)
21ClassName = className.OrThrowIfNull();
System.Windows.Forms.Design (18)
System\ComponentModel\Design\CollectionEditor.CollectionForm.cs (1)
30_editor = editor.OrThrowIfNull();
System\ComponentModel\Design\CollectionEditor.cs (1)
26public CollectionEditor(Type type) => CollectionType = type.OrThrowIfNull();
System\ComponentModel\Design\DesignerActionPanel.Line.cs (1)
18ActionPanel = actionPanel.OrThrowIfNull();
System\ComponentModel\Design\DesignSurfaceEvent.cs (1)
21Surface = surface.OrThrowIfNull();
System\ComponentModel\Design\EventBindingService.cs (1)
27_provider = provider.OrThrowIfNull();
System\ComponentModel\Design\Serialization\DesignerSerializationManager.cs (1)
53_provider = provider.OrThrowIfNull();
System\ComponentModel\Design\Serialization\ExpressionContext.cs (3)
28Expression = expression.OrThrowIfNull(); 29ExpressionType = expressionType.OrThrowIfNull(); 30Owner = owner.OrThrowIfNull();
System\ComponentModel\Design\Serialization\RootContext.cs (2)
22Expression = expression.OrThrowIfNull(); 23Value = value.OrThrowIfNull();
System\ComponentModel\Design\UndoEngine.cs (1)
38_provider = provider.OrThrowIfNull();
System\ComponentModel\Design\UndoEngine.UndoUnit.cs (1)
30UndoEngine = engine.OrThrowIfNull();
System\Windows\Forms\Design\ControlDesigner.TransparentBehavior.cs (1)
24internal TransparentBehavior(ControlDesigner designer) => _designer = designer.OrThrowIfNull();
System\Windows\Forms\Design\ListAdapter.cs (4)
18internal ListAdapter(IList list) => _list = list.OrThrowIfNull(); 23set => _list[index] = value.OrThrowIfNull(); 30void ICollection<T>.Add(T item) => _list.Add(item.OrThrowIfNull()); 36void IList<T>.Insert(int index, T item) => _list.Insert(index, item.OrThrowIfNull());
System.Windows.Forms.Primitives (1)
System\Windows\Forms\Automation\UiaTextRange.cs (1)
41_provider = provider.OrThrowIfNull();
System.Windows.Forms.Primitives.Tests (3)
System\Windows\Forms\Internals\ArgumentValidationTests.cs (3)
12var exception = Assert.Throws<ArgumentNullException>(() => _ = param.OrThrowIfNull()); 21var exception = Assert.Throws<ArgumentNullException>(() => _ = param.OrThrowIfNull(paramName)); 29object variable = param.OrThrowIfNull();