48 instantiations of EncoderParameter
System.Drawing.Common (1)
System\Drawing\Imaging\EncoderParameters.cs (1)
46parameters.Param[i] = new 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, new byte[] { })) }; 277yield return new object[] { new Action(() => new EncoderParameter(null, new short[] { })) }; 278yield return new object[] { new Action(() => new EncoderParameter(null, new 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, new byte[] { })); 296Assert.Throws<NullReferenceException>(() => new EncoderParameter(null, new short[] { })); 297Assert.Throws<NullReferenceException>(() => new EncoderParameter(null, new long[] { })); 310Assert.Throws(expected, () => new EncoderParameter(s_anyEncoder, numberOfValues, type, IntPtr.Zero)); 322Assert.Throws<OutOfMemoryException>(() => new EncoderParameter(s_anyEncoder, numberOfValues, anyType, anyValue));
31 references to EncoderParameter
System.Drawing (1)
System.Drawing.cs (1)
81[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Drawing.Imaging.EncoderParameter))]
System.Drawing.Common (4)
System\Drawing\Imaging\EncoderParameters.cs (4)
10public EncoderParameters(int count) => Param = new EncoderParameter[count]; 12public EncoderParameters() => Param = new EncoderParameter[1]; 14public EncoderParameter[] Param { get; set; } 58foreach (EncoderParameter p in Param)
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 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);