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