{"action":"created","issue":{"url":"https://api.github.com/repos/MarimerLLC/csla/issues/536","repository_url":"https://api.github.com/repos/MarimerLLC/csla","labels_url":"https://api.github.com/repos/MarimerLLC/csla/issues/536/labels{/name}","comments_url":"https://api.github.com/repos/MarimerLLC/csla/issues/536/comments","events_url":"https://api.github.com/repos/MarimerLLC/csla/issues/536/events","html_url":"https://github.com/MarimerLLC/csla/issues/536","id":133877005,"number":536,"title":"Visual Studio 2015 compiler and RegisterMethod ","user":{"login":"drabb1956","id":11463725,"avatar_url":"https://avatars.githubusercontent.com/u/11463725?v=3","gravatar_id":"","url":"https://api.github.com/users/drabb1956","html_url":"https://github.com/drabb1956","followers_url":"https://api.github.com/users/drabb1956/followers","following_url":"https://api.github.com/users/drabb1956/following{/other_user}","gists_url":"https://api.github.com/users/drabb1956/gists{/gist_id}","starred_url":"https://api.github.com/users/drabb1956/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drabb1956/subscriptions","organizations_url":"https://api.github.com/users/drabb1956/orgs","repos_url":"https://api.github.com/users/drabb1956/repos","events_url":"https://api.github.com/users/drabb1956/events{/privacy}","received_events_url":"https://api.github.com/users/drabb1956/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/MarimerLLC/csla/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-02-16T03:42:35Z","updated_at":"2016-02-17T03:57:51Z","closed_at":null,"body":"The following code, when compiled in VS 2015:\r\n\r\n    Private Shared ProcessMethod As MethodInfo = RegisterMethod(Function(c) c.Process)\r\n    Public Function Process() As Boolean\r\n\r\nproduces a runtime error because the Lambda method is passed into the GetMethod function as:\r\n\r\n{a0 => Invoke(c => c.Process(), a0)}\r\n\r\nThis results in the statement:  if (lambda.Body.NodeType != ExpressionType.Call)  to return true causing the method to throw an ArgumentException Not a method Call\"\r\n\r\nlambda.Body.NodeType in this case is ExpressionType.Invoke, not ExpressionType.Call.\r\n\r\nThe following, however, does still work in VS 2015:\r\n    Private Shared UnapproveMethod As MethodInfo = RegisterMethod(Sub(c) c.Unapprove())\r\n    Public Sub Unapprove()\r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/MarimerLLC/csla/issues/comments/185005969","html_url":"https://github.com/MarimerLLC/csla/issues/536#issuecomment-185005969","issue_url":"https://api.github.com/repos/MarimerLLC/csla/issues/536","id":185005969,"user":{"login":"rockfordlhotka","id":2333134,"avatar_url":"https://avatars.githubusercontent.com/u/2333134?v=3","gravatar_id":"","url":"https://api.github.com/users/rockfordlhotka","html_url":"https://github.com/rockfordlhotka","followers_url":"https://api.github.com/users/rockfordlhotka/followers","following_url":"https://api.github.com/users/rockfordlhotka/following{/other_user}","gists_url":"https://api.github.com/users/rockfordlhotka/gists{/gist_id}","starred_url":"https://api.github.com/users/rockfordlhotka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rockfordlhotka/subscriptions","organizations_url":"https://api.github.com/users/rockfordlhotka/orgs","repos_url":"https://api.github.com/users/rockfordlhotka/repos","events_url":"https://api.github.com/users/rockfordlhotka/events{/privacy}","received_events_url":"https://api.github.com/users/rockfordlhotka/received_events","type":"User","site_admin":false},"created_at":"2016-02-17T03:57:51Z","updated_at":"2016-02-17T03:57:51Z","body":"`RegisterMethod` accepts an `Expression<Action<T>>`\r\n\r\nhttps://github.com/MarimerLLC/csla/blob/master/Source/Csla.Shared/BusinessBase.cs#L590\r\n"}}