ArgumentNullException was introduced by https://github.com/mono/mono/pull/5593
but it should be NotSupportedException instead to match with Windows .NET.
Similar change to what was noticed during review of https://github.com/mono/mono/pull/5343#discussion_r132166426.
public override object ConvertFromString (string value, IValueSerializerContext context)
{
if (value == null)
public override object ConvertFromString (string value, IValueSerializerContext context)
{
if (value == null)
- throw new ArgumentNullException ("value");
+ throw new NotSupportedException ("value != null");
return Int32Rect.Parse (value);
}
return Int32Rect.Parse (value);
}
public override object ConvertFromString (string value, IValueSerializerContext context)
{
if (value == null)
public override object ConvertFromString (string value, IValueSerializerContext context)
{
if (value == null)
- throw new ArgumentNullException ("value");
+ throw new NotSupportedException ("value != null");
return Point.Parse (value);
}
return Point.Parse (value);
}
public override object ConvertFromString (string value, IValueSerializerContext context)
{
if (value == null)
public override object ConvertFromString (string value, IValueSerializerContext context)
{
if (value == null)
- throw new ArgumentNullException ("value");
+ throw new NotSupportedException ("value != null");
return Rect.Parse (value);
}
return Rect.Parse (value);
}
public override object ConvertFromString (string value, IValueSerializerContext context)
{
if (value == null)
public override object ConvertFromString (string value, IValueSerializerContext context)
{
if (value == null)
- throw new ArgumentNullException ("value");
+ throw new NotSupportedException ("value != null");
return Size.Parse (value);
}
return Size.Parse (value);
}
public override object ConvertFromString (string value, IValueSerializerContext context)
{
if (value == null)
public override object ConvertFromString (string value, IValueSerializerContext context)
{
if (value == null)
- throw new ArgumentNullException ("value");
+ throw new NotSupportedException ("value != null");
return Vector.Parse (value);
}
return Vector.Parse (value);
}
- [ExpectedException (typeof (ArgumentNullException))]
+ [ExpectedException (typeof (NotSupportedException))]
public void ConvertFromStringShouldThrowExceptionWhenStringIsNull ()
{
var serializer = new Int32RectValueSerializer ();
public void ConvertFromStringShouldThrowExceptionWhenStringIsNull ()
{
var serializer = new Int32RectValueSerializer ();
- [ExpectedException (typeof (ArgumentNullException))]
+ [ExpectedException (typeof (NotSupportedException))]
public void ConvertFromStringShouldThrowExceptionWhenStringIsNull ()
{
var serializer = new PointValueSerializer ();
public void ConvertFromStringShouldThrowExceptionWhenStringIsNull ()
{
var serializer = new PointValueSerializer ();
- [ExpectedException (typeof (ArgumentNullException))]
+ [ExpectedException (typeof (NotSupportedException))]
public void ConvertFromStringShouldThrowExceptionWhenStringIsNull ()
{
var serializer = new RectValueSerializer ();
public void ConvertFromStringShouldThrowExceptionWhenStringIsNull ()
{
var serializer = new RectValueSerializer ();
- [ExpectedException (typeof (ArgumentNullException))]
+ [ExpectedException (typeof (NotSupportedException))]
public void ConvertFromStringShouldThrowExceptionWhenStringIsNull ()
{
var serializer = new SizeValueSerializer ();
public void ConvertFromStringShouldThrowExceptionWhenStringIsNull ()
{
var serializer = new SizeValueSerializer ();
- [ExpectedException (typeof (ArgumentNullException))]
+ [ExpectedException (typeof (NotSupportedException))]
public void ConvertFromStringShouldThrowExceptionWhenStringIsNull ()
{
var serializer = new VectorValueSerializer ();
public void ConvertFromStringShouldThrowExceptionWhenStringIsNull ()
{
var serializer = new VectorValueSerializer ();