c# - Service Fabric with F# not working -


i tried convert default template "service fabric applicatoin" "actor service" c# f#.

here github repo.

i can compile when deploy local cluster system.argumentnullexception. anyoune know wrong here?

here stack trace (it's in german, sorry):

bei system.reflection.emit.fieldbuilder..ctor(typebuilder typebuilder, string fieldname, type type, type[] requiredcustommodifiers, type[] optionalcustommodifiers, fieldattributes attributes) bei system.reflection.emit.typebuilder.definefieldnolock(string fieldname, type type, type[] requiredcustommodifiers, type[] optionalcustommodifiers, fieldattributes attributes) bei system.reflection.emit.typebuilder.definefield(string fieldname, type type, type[] requiredcustommodifiers, type[] optionalcustommodifiers, fieldattributes attributes) bei microsoft.servicefabric.services.remoting.builder.methodbodytypesbuilder.buildrequestbodytype(icodebuildernames codebuildernames, codebuildercontext context, methoddescription methoddescription) bei microsoft.servicefabric.services.remoting.builder.methodbodytypesbuilder.build(icodebuildernames codebuildernames, codebuildercontext context, methoddescription methoddescription) bei microsoft.servicefabric.services.remoting.builder.methodbodytypesbuilder.build(interfacedescription interfacedescription) bei microsoft.servicefabric.services.remoting.builder.codebuilder.microsoft.servicefabric.services.remoting.builder.icodebuilder.getorbuildmethodbodytypes(type interfacetype) bei microsoft.servicefabric.services.remoting.builder.methoddispatcherbuilder`1.build(interfacedescription interfacedescription) bei microsoft.servicefabric.services.remoting.builder.codebuilder.microsoft.servicefabric.services.remoting.builder.icodebuilder.getorbuildermethoddispatcher(type interfacetype) bei microsoft.servicefabric.actors.remoting.builder.actorcodebuilder.getorcreatemethoddispatcher(type actorinterfacetype) bei microsoft.servicefabric.actors.remoting.runtime.actormethoddispatchermap..ctor(actortypeinformation actortypeinformation) bei microsoft.servicefabric.actors.runtime.actorruntime.<registeractorasync>d__7`1.movenext() ---  ende der stapelüberwachung vom vorhergehenden ort, dem die ausnahme ausgelöst wurde --- bei system.runtime.compilerservices.taskawaiter.throwfornonsuccess(task task) bei system.runtime.compilerservices.taskawaiter.handlenonsuccessanddebuggernotification(task task) bei system.runtime.compilerservices.taskawaiter.getresult() bei program.main(string[] argv) in c:\users\tomas\projects\playground\myservicefabricapp\myactor\program.fs:zeile 18. 

your problem subtle. stumbled across myself.

each parameter in actor interface must have explicit name. isaac abraham mentioned in blog post (but post outdated)

change actor interface this:

type imyactor =   inherit iactor   abstract member getcountasync : unit -> task<int>   abstract member setcountasync : int -> task 

to following: (notice count argument)

type imyactor =   inherit iactor   abstract member getcountasync : unit -> task<int>   abstract member setcountasync : count: int -> task 

after change example worked fine me.


Comments

Popular posts from this blog

php - How to display all orders for a single product showing the most recent first? Woocommerce -

asp.net - How to correctly use QUERY_STRING in ISAPI rewrite? -

angularjs - How restrict admin panel using in backend laravel and admin panel on angular? -