{"action":"closed","issue":{"url":"https://api.github.com/repos/couchbaselabs/Linq2Couchbase/issues/150","repository_url":"https://api.github.com/repos/couchbaselabs/Linq2Couchbase","labels_url":"https://api.github.com/repos/couchbaselabs/Linq2Couchbase/issues/150/labels{/name}","comments_url":"https://api.github.com/repos/couchbaselabs/Linq2Couchbase/issues/150/comments","events_url":"https://api.github.com/repos/couchbaselabs/Linq2Couchbase/issues/150/events","html_url":"https://github.com/couchbaselabs/Linq2Couchbase/issues/150","id":164058703,"number":150,"title":"Queries fail if DefaultSerializer.ContractResolver is null","user":{"login":"rogeralsing","id":647031,"avatar_url":"https://avatars.githubusercontent.com/u/647031?v=3","gravatar_id":"","url":"https://api.github.com/users/rogeralsing","html_url":"https://github.com/rogeralsing","followers_url":"https://api.github.com/users/rogeralsing/followers","following_url":"https://api.github.com/users/rogeralsing/following{/other_user}","gists_url":"https://api.github.com/users/rogeralsing/gists{/gist_id}","starred_url":"https://api.github.com/users/rogeralsing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rogeralsing/subscriptions","organizations_url":"https://api.github.com/users/rogeralsing/orgs","repos_url":"https://api.github.com/users/rogeralsing/repos","events_url":"https://api.github.com/users/rogeralsing/events{/privacy}","received_events_url":"https://api.github.com/users/rogeralsing/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-07-06T11:53:32Z","updated_at":"2016-07-08T01:54:34Z","closed_at":"2016-07-08T01:54:34Z","body":"Assuming this code:\r\n\r\n```csharp\r\nvar config = new ClientConfiguration();\r\nvar jsonSettings = new JsonSerializerSettings\r\n{\r\n       Binder = SerializationBinder,\r\n       TypeNameHandling = TypeNameHandling.All,\r\n};\r\nconfig.Serializer = () => new DefaultSerializer(jsonSettings, jsonSettings);\r\nvar cluster = new Cluster(config);\r\nvar bucket = cluster.OpenBucket(\"MyBucket\");\r\nvar context = new BucketContext(bucket);\r\n```\r\n\r\nQueries will fail at this line:\r\n\r\n```csharp\r\n        //ExtendedTypeSerializerMemberNameResolver.cs\r\n  \r\n        public bool TryResolveMemberName(MemberInfo member, out string memberName)\r\n        {\r\n            memberName = null;\r\n\r\n            if (member == null)\r\n                return false;\r\n\r\n            memberName = _serializer.GetMemberName(member);  //BOOM, here\r\n\r\n            return memberName != null;\r\n        }\r\n```\r\n\r\nBy setting a `ContractResolver = new CamelCasePropertyNamesContractResolver()` on the json settings, this problem is resolved.\r\n\r\nThe BucketContext should probably throw if the client configuration does not provide the above.\r\n"}}
{"actor":{"display_login":"jeffrymorris"}}