{"action":"created","issue":{"url":"https://api.github.com/repos/aspnet/Blazor/issues/565","repository_url":"https://api.github.com/repos/aspnet/Blazor","labels_url":"https://api.github.com/repos/aspnet/Blazor/issues/565/labels{/name}","comments_url":"https://api.github.com/repos/aspnet/Blazor/issues/565/comments","events_url":"https://api.github.com/repos/aspnet/Blazor/issues/565/events","html_url":"https://github.com/aspnet/Blazor/issues/565","id":314138979,"number":565,"title":"C# method registration for Javascript Interop","user":{"login":"ericgrantholland","id":32780408,"avatar_url":"https://avatars2.githubusercontent.com/u/32780408?v=4","gravatar_id":"","url":"https://api.github.com/users/ericgrantholland","html_url":"https://github.com/ericgrantholland","followers_url":"https://api.github.com/users/ericgrantholland/followers","following_url":"https://api.github.com/users/ericgrantholland/following{/other_user}","gists_url":"https://api.github.com/users/ericgrantholland/gists{/gist_id}","starred_url":"https://api.github.com/users/ericgrantholland/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ericgrantholland/subscriptions","organizations_url":"https://api.github.com/users/ericgrantholland/orgs","repos_url":"https://api.github.com/users/ericgrantholland/repos","events_url":"https://api.github.com/users/ericgrantholland/events{/privacy}","received_events_url":"https://api.github.com/users/ericgrantholland/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-04-13T14:53:23Z","updated_at":"2018-04-13T15:07:42Z","closed_at":null,"author_association":"NONE","body":"Possibly consider adding a feature to register a C# method to prevent many calls to Blazor.platform.findMethod()? \r\n\r\nconst myMethod = Blazor.platform.findMethod(\r\n    assemblyName,\r\n    namespace,\r\n    typeName,\r\n    methodName\r\n);\r\nBlazor.platform.RegisterBlazorMethod(myMethod,\"UpdateCountFromJavaScript\")"},"comment":{"url":"https://api.github.com/repos/aspnet/Blazor/issues/comments/381165695","html_url":"https://github.com/aspnet/Blazor/issues/565#issuecomment-381165695","issue_url":"https://api.github.com/repos/aspnet/Blazor/issues/565","id":381165695,"user":{"login":"SteveSandersonMS","id":1101362,"avatar_url":"https://avatars3.githubusercontent.com/u/1101362?v=4","gravatar_id":"","url":"https://api.github.com/users/SteveSandersonMS","html_url":"https://github.com/SteveSandersonMS","followers_url":"https://api.github.com/users/SteveSandersonMS/followers","following_url":"https://api.github.com/users/SteveSandersonMS/following{/other_user}","gists_url":"https://api.github.com/users/SteveSandersonMS/gists{/gist_id}","starred_url":"https://api.github.com/users/SteveSandersonMS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SteveSandersonMS/subscriptions","organizations_url":"https://api.github.com/users/SteveSandersonMS/orgs","repos_url":"https://api.github.com/users/SteveSandersonMS/repos","events_url":"https://api.github.com/users/SteveSandersonMS/events{/privacy}","received_events_url":"https://api.github.com/users/SteveSandersonMS/received_events","type":"User","site_admin":false},"created_at":"2018-04-13T15:07:42Z","updated_at":"2018-04-13T15:07:42Z","author_association":"MEMBER","body":"I guess we could offer an overload of `callMethod` that takes a `string` instead of a `MethodHandle`. The `string` value would be of the form `[AssemblyName]Namespace.TypeName::MethodName()`. On the first call we'd do the method handle lookup then call it, and would also cache the method handle under that string key for subsequent invocations.\r\n\r\nThe only tricky bit would be dealing with multiple method overloads (because the JS side doesn't know about the .NET types in the signature). We might just not support that for the time being."}}
{"actor":{"display_login":"SteveSandersonMS"}}