21 references to GetFormat
System.Windows.Forms.Tests (21)
System\Windows\Forms\ClipboardTests.cs (1)
1022cfFormat = (short)DataFormats.GetFormat("testFormat").Id,
System\Windows\Forms\DataFormatsTests.cs (9)
69DataFormats.Format result = DataFormats.GetFormat(format); 70Assert.Same(result, DataFormats.GetFormat(format.ToLowerInvariant())); 75Assert.Same(result, DataFormats.GetFormat(format)); 92DataFormats.Format result = DataFormats.GetFormat(format); 93Assert.Same(result, DataFormats.GetFormat(format)); 94Assert.Same(result, DataFormats.GetFormat(format.ToLowerInvariant())); 110Assert.Throws<ArgumentException>("format", () => DataFormats.GetFormat("")); 111Assert.Throws<ArgumentNullException>("format", () => DataFormats.GetFormat(null)); 123Assert.Throws<Win32Exception>(() => DataFormats.GetFormat(format));
System\Windows\Forms\DataObjectTests.cs (6)
2164result[0].cfFormat.Should().Be(unchecked((short)(ushort)(DataFormats.GetFormat(format1).Id))); 2267result[0].cfFormat.Should().Be(unchecked((short)(ushort)(DataFormats.GetFormat("Format1").Id))); 2277result[0].cfFormat.Should().Be(unchecked((short)(ushort)(DataFormats.GetFormat("Format2").Id))); 2354result[0].cfFormat.Should().Be(unchecked((short)(ushort)(DataFormats.GetFormat(format1).Id))); 2451{ TextDataFormat.Rtf, (short)DataFormats.GetFormat(DataFormats.Rtf).Id }, 2452{ TextDataFormat.Html, (short)DataFormats.GetFormat(DataFormats.Html).Id }
System\Windows\Forms\RichTextBoxTests.ClipboardTests.cs (3)
48richTextBox1.Paste(DataFormats.GetFormat(DataFormats.Text)); 60richTextBox1.Paste(DataFormats.GetFormat(DataFormats.Text)); 81richTextBox1.Paste(DataFormats.GetFormat(DataFormats.Rtf));
System\Windows\Forms\RichTextBoxTests.cs (2)
7843yield return new object[] { DataFormats.GetFormat(DataFormats.Palette), false }; 7891Assert.Equal(expected, control.CanPaste(DataFormats.GetFormat(DataFormats.Text)));