private static void Main(string[] args) { var api = new Api(); var hello = api.SayHello("John"); Console.WriteLine(hello); var john = api.CreateJohnDoe(); var helloJohn = api.SayHello($"{john.FirstName} {john.LastName}"); Console.WriteLine(helloJohn); var jane = new Person("Jane", "Doe"); var helloJane = api.SayHello($"{jane.FirstName} {jane.LastName}"); Console.WriteLine(helloJane); Console.WriteLine($"4 + 4 = {api.Add(4.0, 4.0)}"); }
public void Add(long uid, string verifyInfo, System.Action <bool> callback) { if (Instance.CheckBeblack(uid)) { return; } if (MyFriends.Find(uid) != null) { MessageTemplateManager.ShowMessage(CodeHasFriend); return; } Api.ExceptionFun = (string error) => { if (error.Equals("send Invite too much")) { MessageTemplateManager.ShowMessage(eMessageUIType.MessageDialogue_1, EB.Localizer.GetString("ID_codefont_in_FriendManager_17152")); return(true); } return(false); }; Api.Add(uid, verifyInfo, delegate(EB.Sparx.Response response) { if (response != null) { FetchDataHandler(response); callback(response.sucessful); } else { callback(false); } }); }
public ActionResult <int> Add(string key) { return(Api.Add(key)); }