Very simple trivial implementaions of 'not implemented' interfaces.

I understand that the change is partial - that is what our MS implementation depends upon, which we are trying to port onto Mono.

Thanks,
Dmitriy
Yes, something is wrong… Sorry to waste your time. I will have to re-submit the patch again later. Should I somehow remove the poll request from github?

Thanks,
Dmitriy

From: Alexander Köplinger [mailto:notifications@github.com]
Sent: Friday, August 01, 2014 3:36 PM
To: mono/mono
Cc: Dmitriy Shvidchenko
Subject: Re: [mono] Very simple trivial implementaions of 'not implemented' interfaces. (#1186)


In mcs/class/System.Data.Services/System.Data.Services.Providers/ResourceType.cs:

> @@ -118,10 +118,6 @@ public ResourceType (Type instanceType, ResourceTypeKind resourceTypeKind, Resou

>                              throw new ArgumentNullException ("instanceType");

>                      if (String.IsNullOrEmpty (name))

>                              throw new ArgumentNullException ("name");

> -                    if (resourceTypeKind == ResourceTypeKind.Primitive)

> -                            throw new ArgumentException ("'Primitive' is not a valid value for resourceTypeKind", "resourceTypeKind");

> -                    if (instanceType.IsValueType)

> -                            throw new ArgumentException ("Clr type for the resource type cannot be a value type.");

I just tried this on Microsoft .NET 4.5:

var r = new ResourceType(typeof(string), ResourceTypeKind.Primitive, null, "test", "test", false);

...and it raises an ArgumentException for resourceTypeKind as well, so removing the checks in the constructor is wrong.

System.ArgumentException was unhandled
Message='Primitive' is not a valid value for resourceTypeKind.
Parameter name: resourceTypeKind
Source=System.Data.Services
ParamName=resourceTypeKind
StackTrace:
at System.Data.Services.Providers.ResourceType..ctor(Type instanceType, ResourceTypeKind resourceTypeKind, ResourceType baseType, String namespaceName, String name, Boolean isAbstract)

—
Reply to this email directly or view it on GitHub<https://github.com/mono/mono/pull/1186/files#r15714644>.