public override Func0 addCameraPhotoEventListener(Func5 cb) { string cbId = Guid.NewGuid().ToString(); camera_callbacks[cbId] = cb; return(() => { camera_callbacks.Remove(cbId); return null; }); }
public Func5PipeFunction(Func5 fn) { this.fn = fn; }
/// <summary> /// Creates a pipe function that takes five arguments from pipe. /// </summary> /// <param name="fn">A delegate that encapsulates a method that match the signature of <see cref="Func5"/>.</param> /// <returns>The constructed pipe function that can be invoked with a given pipe context.</returns> public static PipeFunction Create(Func5 fn) { CommonHelper.ConfirmNotNull(fn, "fn"); return(new Func5PipeFunction(fn)); }
public virtual Func0 addGestureListener(String name, Func5 cb) { return(null); }
public virtual Func0 addCameraPhotoEventListener(Func5 cb) { return(no_op); }
// The program part of the Main Menu // Directs players to other parts of the program public static void MenuProg() { string rawInput = "TBC"; char input = '0'; bool check = false; GameDraw(); // Checks if player input is valid while (!check) { Console.Write("\nYour Input: "); rawInput = Console.ReadLine(); try{ input = Convert.ToChar(rawInput); if (input >= 49 && input <= 56) { check = true; } else { GameDraw(); Console.WriteLine("\nError: '{0}' is not a valid input", rawInput); } } catch { if (rawInput == "") { check = true; } else { GameDraw(); Console.WriteLine("\nError: '{0}' is not a valid input", rawInput); } } } // Directs player to corresponding menu switch (input) { case '1': Func1.CovidAnnProg(Global.covidAnnPurch); break; case '2': Func2.HealthProg(); break; case '3': Func3.VaccineProg(); break; case '4': Func4.BorderProg(); break; case '5': Func5.DefenceProg(); break; case '6': Func6.EducationProg(); break; case '7': Intro(true); break; case '8': Help(); break; default: // Initiates all inputs and simulates Covid-19 Game.Submit(); break; } }