- Home /
Question by
Ekta-Mehta-D · Apr 04, 2014 at 11:47 AM ·
c#javascriptconvert
convert c# to JavaScript Problem
Hello Friends..
I am working on google play service nd unfortunately i stuck at one point. i want to convert block of code into javascript..
here is c# code :
Social.localUser.Authenticate((bool success) => {
mWaitingForAuth = false;
mStatusText = success ? "Successfully authenticated" : "Authentication failed.";
});
I want to convert this block in java script.. Parameter passed is of type Action
The method which is called is here :
/// <summary>
/// Authenticates the local user. Equivalent to calling
/// <see cref="PlayGamesPlatform.Authenticate" />.
/// </summary>
public void Authenticate(Action<bool> callback) {
mPlatform.Authenticate(callback);
}
/// <summary>
/// Authenticates the local user. Equivalent to calling
/// <see cref="PlayGamesPlatform.Authenticate" />.
/// </summary>
public void Authenticate(Action<bool> callback, bool silent) {
mPlatform.Authenticate(callback, silent);
}
this is available in another class.
If u dont understand then plz ask me again.
Thanks for your help and support till now..
Comment
Your answer
Follow this Question
Related Questions
Help with conversion from javascript to c# 3 Answers
Convert Javascript to C# 1 Answer
Convert this string formatting from C# to JS 1 Answer
Need help converting Javascript to C# 3 Answers