43 references to EncoderParameterValueType
System.Drawing (1)
System.Drawing.cs (1)
83[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Drawing.Imaging.EncoderParameterValueType))]
System.Drawing.Common (3)
Special\NotSupported.cs (3)
2320public EncoderParameter(System.Drawing.Imaging.Encoder encoder, int numberValues, System.Drawing.Imaging.EncoderParameterValueType type, System.IntPtr value) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 2334public System.Drawing.Imaging.EncoderParameterValueType Type { get { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } } 2335public System.Drawing.Imaging.EncoderParameterValueType ValueType { get { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } }
System.Drawing.Common.Tests (39)
System\Drawing\Imaging\EncoderParameterTests.cs (39)
10private static void CheckEncoderParameter(EncoderParameter encoderParameter, Encoder expectedEncoder, EncoderParameterValueType expectedType, int expectedNumberOfValues) 43CheckEncoderParameter(ep, encoder, EncoderParameterValueType.ValueTypeByte, 1); 47[InlineData(false, EncoderParameterValueType.ValueTypeByte)] 48[InlineData(true, EncoderParameterValueType.ValueTypeUndefined)] 49public void Ctor_Encoder_ByteValue_Bool(bool undefined, EncoderParameterValueType expected) 62CheckEncoderParameter(ep, s_anyEncoder, EncoderParameterValueType.ValueTypeShort, 1); 72CheckEncoderParameter(ep, s_anyEncoder, EncoderParameterValueType.ValueTypeLong, 1); 82CheckEncoderParameter(ep, s_anyEncoder, EncoderParameterValueType.ValueTypeRational, 1); 91CheckEncoderParameter(ep, s_anyEncoder, EncoderParameterValueType.ValueTypeRationalRange, 1); 100CheckEncoderParameter(ep, s_anyEncoder, EncoderParameterValueType.ValueTypeLongRange, 1); 109CheckEncoderParameter(ep, s_anyEncoder, EncoderParameterValueType.ValueTypeAscii, value.Length); 118CheckEncoderParameter(ep, s_anyEncoder, EncoderParameterValueType.ValueTypeByte, value.Length); 122[InlineData(new byte[] { 1, 2 }, false, EncoderParameterValueType.ValueTypeByte)] 123[InlineData(new byte[] { 1, 2 }, true, EncoderParameterValueType.ValueTypeUndefined)] 124public void Ctor_Encoder_ByteArray_Bool(byte[] value, bool undefined, EncoderParameterValueType expected) 136CheckEncoderParameter(ep, s_anyEncoder, EncoderParameterValueType.ValueTypeShort, value.Length); 145CheckEncoderParameter(ep, s_anyEncoder, EncoderParameterValueType.ValueTypeLong, value.Length); 153CheckEncoderParameter(ep, s_anyEncoder, EncoderParameterValueType.ValueTypeRational, numerator.Length); 161CheckEncoderParameter(ep, s_anyEncoder, EncoderParameterValueType.ValueTypeLongRange, rangeBegin.Length); 169CheckEncoderParameter(ep, s_anyEncoder, EncoderParameterValueType.ValueTypeRationalRange, numerator1.Length); 176yield return new object[] { 0, EncoderParameterValueType.ValueTypeAscii, IntPtr.Zero }; 177yield return new object[] { 0, EncoderParameterValueType.ValueTypeByte, IntPtr.Zero }; 178yield return new object[] { 0, EncoderParameterValueType.ValueTypeLong, IntPtr.Zero }; 179yield return new object[] { 0, EncoderParameterValueType.ValueTypeLongRange, IntPtr.Zero }; 180yield return new object[] { 0, EncoderParameterValueType.ValueTypeRational, IntPtr.Zero }; 181yield return new object[] { 0, EncoderParameterValueType.ValueTypeRationalRange, IntPtr.Zero }; 182yield return new object[] { 0, EncoderParameterValueType.ValueTypeShort, IntPtr.Zero }; 183yield return new object[] { 0, EncoderParameterValueType.ValueTypeUndefined, IntPtr.Zero }; 184yield return new object[] { 0, EncoderParameterValueType.ValueTypeUndefined, IntPtr.Zero }; 190public void Ctor_Encoder_NumberOfValues_Type_Value(int numberOfValues, EncoderParameterValueType type, IntPtr value) 210Assert.Throws<InvalidOperationException>(() => new EncoderParameter(s_anyEncoder, 1, (EncoderParameterValueType)999, IntPtr.Zero)); 303[InlineData(EncoderParameterValueType.ValueTypeShort, (int.MaxValue / 2) + 1, typeof(OverflowException))] 304[InlineData(EncoderParameterValueType.ValueTypeLong, (int.MaxValue / 4) + 1, typeof(OverflowException))] 305[InlineData(EncoderParameterValueType.ValueTypeRational, (int.MaxValue / 8) + 1, typeof(OverflowException))] 306[InlineData(EncoderParameterValueType.ValueTypeLongRange, (int.MaxValue / 8) + 1, typeof(OverflowException))] 307[InlineData(EncoderParameterValueType.ValueTypeRationalRange, (int.MaxValue / 16) + 1, typeof(OverflowException))] 308public void Ctor_Encoder_TooBigNumberOfValues_Type_Value_AccessViolationException(EncoderParameterValueType type, int numberOfValues, Type expected) 321EncoderParameterValueType anyType = EncoderParameterValueType.ValueTypeAscii;