47 instantiations of EncoderParameter
System.Drawing.Common.Tests (47)
System\Drawing\Imaging\EncoderParametersTests.cs (1)
30
yield return new object[] { new EncoderParameter[1] {
new
(Encoder.ChrominanceTable, 0) } };
System\Drawing\Imaging\EncoderParameterTests.cs (46)
42
using EncoderParameter ep =
new
(encoder, value);
51
EncoderParameter ep =
new
(s_anyEncoder, 0, undefined);
61
using EncoderParameter ep =
new
(s_anyEncoder, value);
71
using EncoderParameter ep =
new
(s_anyEncoder, value);
81
using EncoderParameter ep =
new
(s_anyEncoder, numerator, denominator);
90
using EncoderParameter ep =
new
(s_anyEncoder, numerator1, denominator1, numerator2, denominator2);
99
using EncoderParameter ep =
new
(s_anyEncoder, rangeBegin, rangeEnd);
108
using EncoderParameter ep =
new
(s_anyEncoder, value);
117
using EncoderParameter ep =
new
(s_anyEncoder, value);
126
using EncoderParameter ep =
new
(s_anyEncoder, value, undefined);
135
using EncoderParameter ep =
new
(s_anyEncoder, value);
144
using EncoderParameter ep =
new
(s_anyEncoder, value);
152
using EncoderParameter ep =
new
(s_anyEncoder, numerator, denominator);
160
using EncoderParameter ep =
new
(s_anyEncoder, rangeBegin, rangeEnd);
168
using EncoderParameter ep =
new
(s_anyEncoder, numerator1, denominator1, numerator2, denominator2);
192
using EncoderParameter ep =
new
(s_anyEncoder, numberOfValues, type, value);
200
using EncoderParameter ep =
new
(s_anyEncoder, 0)
210
Assert.Throws<InvalidOperationException>(() => new
EncoderParameter
(s_anyEncoder, 1, (EncoderParameterValueType)999, IntPtr.Zero));
222
Assert.Throws(expected, () => new
EncoderParameter
(s_anyEncoder, numerator1, denominator1, numerator2, denominator2));
228
using EncoderParameter ep =
new
(s_anyEncoder, 0);
239
Assert.Throws(expected, () => new
EncoderParameter
(s_anyEncoder, numerator, denominator));
249
Assert.Throws(expected, () => new
EncoderParameter
(s_anyEncoder, rangeBegin, rangeEnd));
255
Assert.Throws<NullReferenceException>(() => new
EncoderParameter
(s_anyEncoder, (string)null));
261
Assert.Throws<NullReferenceException>(() => new
EncoderParameter
(s_anyEncoder, (byte[])null));
268
yield return new object[] { new Action(() => new
EncoderParameter
(null, 0)) };
269
yield return new object[] { new Action(() => new
EncoderParameter
(null, 0, false)) };
270
yield return new object[] { new Action(() => new
EncoderParameter
(null, (short)0)) };
271
yield return new object[] { new Action(() => new
EncoderParameter
(null, numerator: 0, denominator: 0)) };
272
yield return new object[] { new Action(() => new
EncoderParameter
(null, rangebegin: 0, rangeend: 0)) };
273
yield return new object[] { new Action(() => new
EncoderParameter
(null, 0, 0, 0, 0)) };
274
yield return new object[] { new Action(() => new
EncoderParameter
(null, "anyString")) };
275
yield return new object[] { new Action(() => new
EncoderParameter
(null, Array.Empty<byte>())) };
277
yield return new object[] { new Action(() => new
EncoderParameter
(null, Array.Empty<short>())) };
278
yield return new object[] { new Action(() => new
EncoderParameter
(null, Array.Empty<long>())) };
287
Assert.Throws<NullReferenceException>(() => new
EncoderParameter
(null, 0));
288
Assert.Throws<NullReferenceException>(() => new
EncoderParameter
(null, 0, false));
289
Assert.Throws<NullReferenceException>(() => new
EncoderParameter
(null, (short)0));
290
Assert.Throws<NullReferenceException>(() => new
EncoderParameter
(null, numerator: 0, denominator: 0));
291
Assert.Throws<NullReferenceException>(() => new
EncoderParameter
(null, rangebegin: 0, rangeend: 0));
292
Assert.Throws<NullReferenceException>(() => new
EncoderParameter
(null, 0, 0, 0, 0));
293
Assert.Throws<NullReferenceException>(() => new
EncoderParameter
(null, "anyString"));
294
Assert.Throws<NullReferenceException>(() => new
EncoderParameter
(null, Array.Empty<byte>()));
296
Assert.Throws<NullReferenceException>(() => new
EncoderParameter
(null, Array.Empty<short>()));
297
Assert.Throws<NullReferenceException>(() => new
EncoderParameter
(null, Array.Empty<long>()));
310
Assert.Throws(expected, () => new
EncoderParameter
(s_anyEncoder, numberOfValues, type, IntPtr.Zero));
322
Assert.Throws<OutOfMemoryException>(() => new
EncoderParameter
(s_anyEncoder, numberOfValues, anyType, anyValue));
28 references to EncoderParameter
System.Drawing (1)
System.Drawing.cs (1)
81
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Drawing.Imaging.
EncoderParameter
))]
System.Drawing.Common (1)
Special\NotSupported.cs (1)
2344
public System.Drawing.Imaging.
EncoderParameter
[] Param { get { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } set { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } }
System.Drawing.Common.Tests (26)
System\Drawing\Imaging\EncoderParametersTests.cs (7)
13
Assert.Equal(new
EncoderParameter
[1], ep.Param);
22
Assert.Equal(new
EncoderParameter
[count], ep.Param);
29
yield return new object[] { new
EncoderParameter
[1] };
30
yield return new object[] { new
EncoderParameter
[1] { new(Encoder.ChrominanceTable, 0) } };
31
yield return new object[] { new
EncoderParameter
[1] { null } };
37
public void Param_Success(
EncoderParameter
[] param)
46
public void Dispose_Success(
EncoderParameter
[] param)
System\Drawing\Imaging\EncoderParameterTests.cs (19)
10
private static void CheckEncoderParameter(
EncoderParameter
encoderParameter, Encoder expectedEncoder, EncoderParameterValueType expectedType, int expectedNumberOfValues)
42
using
EncoderParameter
ep = new(encoder, value);
51
EncoderParameter
ep = new(s_anyEncoder, 0, undefined);
61
using
EncoderParameter
ep = new(s_anyEncoder, value);
71
using
EncoderParameter
ep = new(s_anyEncoder, value);
81
using
EncoderParameter
ep = new(s_anyEncoder, numerator, denominator);
90
using
EncoderParameter
ep = new(s_anyEncoder, numerator1, denominator1, numerator2, denominator2);
99
using
EncoderParameter
ep = new(s_anyEncoder, rangeBegin, rangeEnd);
108
using
EncoderParameter
ep = new(s_anyEncoder, value);
117
using
EncoderParameter
ep = new(s_anyEncoder, value);
126
using
EncoderParameter
ep = new(s_anyEncoder, value, undefined);
135
using
EncoderParameter
ep = new(s_anyEncoder, value);
144
using
EncoderParameter
ep = new(s_anyEncoder, value);
152
using
EncoderParameter
ep = new(s_anyEncoder, numerator, denominator);
160
using
EncoderParameter
ep = new(s_anyEncoder, rangeBegin, rangeEnd);
168
using
EncoderParameter
ep = new(s_anyEncoder, numerator1, denominator1, numerator2, denominator2);
192
using
EncoderParameter
ep = new(s_anyEncoder, numberOfValues, type, value);
200
using
EncoderParameter
ep = new(s_anyEncoder, 0)
228
using
EncoderParameter
ep = new(s_anyEncoder, 0);