Base:
method
ConvertFrom
System.ComponentModel.TypeConverter.ConvertFrom(System.ComponentModel.ITypeDescriptorContext, System.Globalization.CultureInfo, System.Object)
13 references to ConvertFrom
System.Drawing.Common.Tests (13)
System\Drawing\ImageFormatConverterTests.cs (13)
65
Assert.Equal(_imageFmt, (ImageFormat)_imgFmtConv.
ConvertFrom
(null, CultureInfo.InvariantCulture, ImageFormat.Bmp.ToString()));
66
Assert.Equal(_imageFmt, (ImageFormat)_imgFmtConvFrmTD.
ConvertFrom
(null, CultureInfo.InvariantCulture, ImageFormat.Bmp.ToString()));
72
Assert.Throws<NotSupportedException>(() => _imgFmtConv.
ConvertFrom
(null, CultureInfo.InvariantCulture, ImageFormat.Bmp));
73
Assert.Throws<NotSupportedException>(() => _imgFmtConv.
ConvertFrom
(null, CultureInfo.InvariantCulture, ImageFormat.Bmp.Guid));
74
Assert.Throws<NotSupportedException>(() => _imgFmtConv.
ConvertFrom
(null, CultureInfo.InvariantCulture, new object()));
75
Assert.Throws<NotSupportedException>(() => _imgFmtConv.
ConvertFrom
(null, CultureInfo.InvariantCulture, 10));
77
Assert.Throws<NotSupportedException>(() => _imgFmtConvFrmTD.
ConvertFrom
(null, CultureInfo.InvariantCulture, ImageFormat.Bmp));
78
Assert.Throws<NotSupportedException>(() => _imgFmtConvFrmTD.
ConvertFrom
(null, CultureInfo.InvariantCulture, ImageFormat.Bmp.Guid));
79
Assert.Throws<NotSupportedException>(() => _imgFmtConvFrmTD.
ConvertFrom
(null, CultureInfo.InvariantCulture, new object()));
80
Assert.Throws<NotSupportedException>(() => _imgFmtConvFrmTD.
ConvertFrom
(null, CultureInfo.InvariantCulture, 10));
85
return (ImageFormat)_imgFmtConvFrmTD.
ConvertFrom
(null, CultureInfo.InvariantCulture, imgFormatName);
119
Assert.Throws<FormatException>(() => _imgFmtConv.
ConvertFrom
(null, CultureInfo.InvariantCulture, "System.Drawing.String"));
123
Assert.Throws<FormatException>(() => _imgFmtConvFrmTD.
ConvertFrom
(null, CultureInfo.InvariantCulture, "System.Drawing.String"));