1 write to _imgConvFrmTD
System.Drawing.Common.Tests (1)
System\Drawing\ImageConverterTests.cs (1)
29
_imgConvFrmTD
= (ImageConverter)TypeDescriptor.GetConverter(_image);
49 references to _imgConvFrmTD
System.Drawing.Common.Tests (49)
System\Drawing\ImageConverterTests.cs (49)
76
Assert.True(
_imgConvFrmTD
.CanConvertFrom(typeof(byte[])), "TD byte[] (no context)");
77
Assert.True(
_imgConvFrmTD
.CanConvertFrom(null, typeof(byte[])), "TD byte[]");
78
Assert.True(
_imgConvFrmTD
.CanConvertFrom(null, _imageBytes.GetType()), "TD _imageBytes.GetType()");
79
Assert.False(
_imgConvFrmTD
.CanConvertFrom(null, typeof(string)), "TD string");
80
Assert.False(
_imgConvFrmTD
.CanConvertFrom(null, typeof(Rectangle)), "TD Rectangle");
81
Assert.False(
_imgConvFrmTD
.CanConvertFrom(null, typeof(Point)), "TD Point");
82
Assert.False(
_imgConvFrmTD
.CanConvertFrom(null, typeof(PointF)), "TD PointF");
83
Assert.False(
_imgConvFrmTD
.CanConvertFrom(null, typeof(Size)), "TD Size");
84
Assert.False(
_imgConvFrmTD
.CanConvertFrom(null, typeof(SizeF)), "TD SizeF");
85
Assert.False(
_imgConvFrmTD
.CanConvertFrom(null, typeof(object)), "TD object");
86
Assert.False(
_imgConvFrmTD
.CanConvertFrom(null, typeof(int)), "TD int");
87
Assert.False(
_imgConvFrmTD
.CanConvertFrom(null, typeof(Metafile)), "TD Metafile");
107
Assert.True(
_imgConvFrmTD
.CanConvertTo(typeof(string)), "TD string (no context)");
108
Assert.True(
_imgConvFrmTD
.CanConvertTo(null, typeof(string)), "TD string");
109
Assert.True(
_imgConvFrmTD
.CanConvertTo(null, _imageStr.GetType()), "TD _imageStr.GetType()");
110
Assert.True(
_imgConvFrmTD
.CanConvertTo(typeof(byte[])), "TD byte[] (no context)");
111
Assert.True(
_imgConvFrmTD
.CanConvertTo(null, typeof(byte[])), "TD byte[]");
112
Assert.True(
_imgConvFrmTD
.CanConvertTo(null, _imageBytes.GetType()), "TD _imageBytes.GetType()");
113
Assert.False(
_imgConvFrmTD
.CanConvertTo(null, typeof(Rectangle)), "TD Rectangle");
114
Assert.False(
_imgConvFrmTD
.CanConvertTo(null, typeof(Point)), "TD Point");
115
Assert.False(
_imgConvFrmTD
.CanConvertTo(null, typeof(PointF)), "TD PointF");
116
Assert.False(
_imgConvFrmTD
.CanConvertTo(null, typeof(Size)), "TD Size");
117
Assert.False(
_imgConvFrmTD
.CanConvertTo(null, typeof(SizeF)), "TD SizeF");
118
Assert.False(
_imgConvFrmTD
.CanConvertTo(null, typeof(object)), "TD object");
119
Assert.False(
_imgConvFrmTD
.CanConvertTo(null, typeof(int)), "TD int");
130
newImage = (Image)
_imgConvFrmTD
.ConvertFrom(null, CultureInfo.InvariantCulture, _imageBytes);
146
Assert.Throws<NotSupportedException>(() =>
_imgConvFrmTD
.ConvertFrom("System.Drawing.String"));
147
Assert.Throws<NotSupportedException>(() =>
_imgConvFrmTD
.ConvertFrom(null, CultureInfo.InvariantCulture, "System.Drawing.String"));
148
Assert.Throws<NotSupportedException>(() =>
_imgConvFrmTD
.ConvertFrom(null, CultureInfo.InvariantCulture, new Bitmap(20, 20)));
149
Assert.Throws<NotSupportedException>(() =>
_imgConvFrmTD
.ConvertFrom(null, CultureInfo.InvariantCulture, new Point(10, 10)));
150
Assert.Throws<NotSupportedException>(() =>
_imgConvFrmTD
.ConvertFrom(null, CultureInfo.InvariantCulture, new SizeF(10, 10)));
151
Assert.Throws<NotSupportedException>(() =>
_imgConvFrmTD
.ConvertFrom(null, CultureInfo.InvariantCulture, new object()));
159
Assert.Equal(_imageStr, (string)
_imgConvFrmTD
.ConvertTo(null, CultureInfo.InvariantCulture, _image, typeof(string)));
160
Assert.Equal(_imageStr, (string)
_imgConvFrmTD
.ConvertTo(_image, typeof(string)));
167
Assert.Equal("(none)", (string)
_imgConvFrmTD
.ConvertTo(null, typeof(string)));
168
Assert.Equal("(none)", (string)
_imgConvFrmTD
.ConvertTo(null, CultureInfo.CreateSpecificCulture("de-DE"), null, typeof(string)));
178
newImageBytes = (byte[])
_imgConvFrmTD
.ConvertTo(null, CultureInfo.InvariantCulture, _image, _imageBytes.GetType());
181
newImageBytes = (byte[])
_imgConvFrmTD
.ConvertTo(_image, _imageBytes.GetType());
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)));
246
propsColl =
_imgConvFrmTD
.GetProperties(null, _image, null);
250
propsColl =
_imgConvFrmTD
.GetProperties(null, _image);
252
propsColl =
_imgConvFrmTD
.GetProperties(_image);