Base:
method
ConvertTo
System.ComponentModel.TypeConverter.ConvertTo(System.ComponentModel.ITypeDescriptorContext, System.Globalization.CultureInfo, System.Object, System.Type)
22 references to ConvertTo
System.Drawing.Common.Tests (22)
System\Drawing\ImageConverterTests.cs (22)
157
Assert.Equal(_imageStr, (string)_imgConv.
ConvertTo
(null, CultureInfo.InvariantCulture, _image, typeof(string)));
159
Assert.Equal(_imageStr, (string)_imgConvFrmTD.
ConvertTo
(null, CultureInfo.InvariantCulture, _image, typeof(string)));
165
Assert.Equal("(none)", (string)_imgConv.
ConvertTo
(null, CultureInfo.CreateSpecificCulture("ru-RU"), null, typeof(string)));
168
Assert.Equal("(none)", (string)_imgConvFrmTD.
ConvertTo
(null, CultureInfo.CreateSpecificCulture("de-DE"), null, typeof(string)));
175
byte[] newImageBytes = (byte[])_imgConv.
ConvertTo
(null, CultureInfo.InvariantCulture, _image, _imageBytes.GetType());
178
newImageBytes = (byte[])_imgConvFrmTD.
ConvertTo
(null, CultureInfo.InvariantCulture, _image, _imageBytes.GetType());
197
Assert.Throws<NotSupportedException>(() => _imgConv.
ConvertTo
(null, CultureInfo.InvariantCulture, _image, typeof(Rectangle)));
198
Assert.Throws<NotSupportedException>(() => _imgConv.
ConvertTo
(null, CultureInfo.InvariantCulture, _image, _image.GetType()));
199
Assert.Throws<NotSupportedException>(() => _imgConv.
ConvertTo
(null, CultureInfo.InvariantCulture, _image, typeof(Size)));
200
Assert.Throws<NotSupportedException>(() => _imgConv.
ConvertTo
(null, CultureInfo.InvariantCulture, _image, typeof(Bitmap)));
201
Assert.Throws<NotSupportedException>(() => _imgConv.
ConvertTo
(null, CultureInfo.InvariantCulture, _image, typeof(Point)));
202
Assert.Throws<NotSupportedException>(() => _imgConv.
ConvertTo
(null, CultureInfo.InvariantCulture, _image, typeof(Metafile)));
203
Assert.Throws<NotSupportedException>(() => _imgConv.
ConvertTo
(null, CultureInfo.InvariantCulture, _image, typeof(object)));
204
Assert.Throws<NotSupportedException>(() => _imgConv.
ConvertTo
(null, CultureInfo.InvariantCulture, _image, typeof(int)));
206
Assert.Throws<NotSupportedException>(() => _imgConvFrmTD.
ConvertTo
(null, CultureInfo.InvariantCulture, _image, typeof(Rectangle)));
207
Assert.Throws<NotSupportedException>(() => _imgConvFrmTD.
ConvertTo
(null, CultureInfo.InvariantCulture, _image, _image.GetType()));
208
Assert.Throws<NotSupportedException>(() => _imgConvFrmTD.
ConvertTo
(null, CultureInfo.InvariantCulture, _image, typeof(Size)));
209
Assert.Throws<NotSupportedException>(() => _imgConvFrmTD.
ConvertTo
(null, CultureInfo.InvariantCulture, _image, typeof(Bitmap)));
210
Assert.Throws<NotSupportedException>(() => _imgConvFrmTD.
ConvertTo
(null, CultureInfo.InvariantCulture, _image, typeof(Point)));
211
Assert.Throws<NotSupportedException>(() => _imgConvFrmTD.
ConvertTo
(null, CultureInfo.InvariantCulture, _image, typeof(Metafile)));
212
Assert.Throws<NotSupportedException>(() => _imgConvFrmTD.
ConvertTo
(null, CultureInfo.InvariantCulture, _image, typeof(object)));
213
Assert.Throws<NotSupportedException>(() => _imgConvFrmTD.
ConvertTo
(null, CultureInfo.InvariantCulture, _image, typeof(int)));