You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ali Yousefi edited this page Jan 2, 2018
·
1 revision
Just write "Async" for your interface methods you can have both of sync and async methods;
Name and parameters of methods is important:
[SignalGo.Shared.DataTypes.ServiceContract("TestServerModel")]publicinterfaceITestServerModel{//your sync method of HelloWorldstringHelloWorld(stringyourName);//your async method of HelloWorldTask<string>HelloWorldAsync(stringyourName);}
if your sync method name is "HelloWorld" you must add "Async" word after your method name and add return of method inside of Task, for example if your method return is string you must change it to Task;
Note: you can remove sync method and make HelloWorld return type to Task without renaming to "HelloWorldAsync"