21 references to GetFormat
System.Windows.Forms.Tests (21)
System\Windows\Forms\ClipboardTests.cs (1)
1030cfFormat = (short)DataFormats.GetFormat("testFormat").Id,
System\Windows\Forms\DataFormatsTests.cs (9)
67DataFormats.Format result = DataFormats.GetFormat(format); 68Assert.Same(result, DataFormats.GetFormat(format.ToLowerInvariant())); 73Assert.Same(result, DataFormats.GetFormat(format)); 90DataFormats.Format result = DataFormats.GetFormat(format); 91Assert.Same(result, DataFormats.GetFormat(format)); 92Assert.Same(result, DataFormats.GetFormat(format.ToLowerInvariant())); 108Assert.Throws<ArgumentException>("format", () => DataFormats.GetFormat("")); 109Assert.Throws<ArgumentNullException>("format", () => DataFormats.GetFormat(null)); 121Assert.Throws<Win32Exception>(() => DataFormats.GetFormat(format));
System\Windows\Forms\DataObjectTests.cs (6)
2165result[0].cfFormat.Should().Be(unchecked((short)(ushort)(DataFormats.GetFormat(format1).Id))); 2268result[0].cfFormat.Should().Be(unchecked((short)(ushort)(DataFormats.GetFormat("Format1").Id))); 2278result[0].cfFormat.Should().Be(unchecked((short)(ushort)(DataFormats.GetFormat("Format2").Id))); 2355result[0].cfFormat.Should().Be(unchecked((short)(ushort)(DataFormats.GetFormat(format1).Id))); 2452{ TextDataFormat.Rtf, (short)DataFormats.GetFormat(DataFormats.Rtf).Id }, 2453{ TextDataFormat.Html, (short)DataFormats.GetFormat(DataFormats.Html).Id }
System\Windows\Forms\RichTextBoxTests.ClipboardTests.cs (3)
46richTextBox1.Paste(DataFormats.GetFormat(DataFormats.Text)); 58richTextBox1.Paste(DataFormats.GetFormat(DataFormats.Text)); 79richTextBox1.Paste(DataFormats.GetFormat(DataFormats.Rtf));
System\Windows\Forms\RichTextBoxTests.cs (2)
7841yield return new object[] { DataFormats.GetFormat(DataFormats.Palette), false }; 7889Assert.Equal(expected, control.CanPaste(DataFormats.GetFormat(DataFormats.Text)));