Advertisement
Guest User

Untitled

a guest
Oct 22nd, 2023
22
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     public class EsotericModule
  2.     {
  3.         //Delegate types used for binding code from the engine.
  4.         //Don't change these.
  5.         public delegate bool GetLogicDelegate(ulong CallID);
  6.         public delegate long GetIntegerDelegate(ulong CallID);
  7.         public delegate double GetRealDelegate(ulong CallID);
  8.         public delegate string GetStringDelegate(ulong CallID);
  9.         public delegate List<bool> GetLogicArrayDelegate(ulong CallID);
  10.         public delegate List<long> GetIntegerArrayDelegate(ulong CallID);
  11.         public delegate List<double> GetRealArrayDelegate(ulong CallID);
  12.         public delegate List<string> GetStringArrayDelegate(ulong CallID);
  13.         public delegate bool CallLogicDelegate(ulong CallID, string Code);
  14.         public delegate long CallIntegerDelegate(ulong CallID, string Code);
  15.         public delegate double CallRealDelegate(ulong CallID, string Code);
  16.         public delegate string CallStringDelegate(ulong CallID, string Code);
  17.         public delegate List<bool> CallLogicArrayDelegate(ulong CallID, string Code);
  18.         public delegate List<long> CallIntegerArrayDelegate(ulong CallID, string Code);
  19.         public delegate List<double> CallRealArrayDelegate(ulong CallID, string Code);
  20.         public delegate List<string> CallStringArrayDelegate(ulong CallID, string Code);
  21.         public delegate void CallVoidDelegate(ulong CallID, string Code);
  22.  
  23.         //This function defines the name of your library.
  24.         //This name will be used to call the library from the engine.
  25.         //For example: lib "esql" "open" "test.db" "test"
  26.         //             lib "esql" "close" "test"
  27.         //             etc.
  28.         public string GetName(ulong CallID) => "esql";
  29.  
  30.         //These functions are called when the engine tries to access the library.
  31.         //The function depends on the return type requested.
  32.         public bool GetLogic(ulong CallID) => throw new NotImplementedException();
  33.         public long GetInteger(ulong CallID) => throw new NotImplementedException();
  34.         public double GetReal(ulong CallID) => throw new NotImplementedException();
  35.         public string GetString(ulong CallID) => throw new NotImplementedException();
  36.         public List<bool> GetLogicArray(ulong CallID) => throw new NotImplementedException();
  37.         public List<long> GetIntegerArray(ulong CallID) => throw new NotImplementedException();
  38.         public List<double> GetRealArray(ulong CallID) => throw new NotImplementedException();
  39.         public List<string> GetStringArray(ulong CallID) => throw new NotImplementedException();
  40.         //This function represents void calls.
  41.         //Note you should use Take*Param(CallID) calls to obtain parameters.
  42.         public void GetVoid(ulong CallID) => throw new NotImplementedException();
  43.  
  44.         //Use these properties to get parameters for your library call.
  45.         //Select the property based on the return value you want.
  46.         //Pass your CallID token into the first parameter.
  47.         public GetLogicDelegate TakeLogicParam { get; set; }
  48.         public GetIntegerDelegate TakeIntegerParam { get; set; }
  49.         public GetRealDelegate TakeRealParam { get; set; }
  50.         public GetStringDelegate TakeStringParam { get; set; }
  51.         public GetLogicArrayDelegate TakeLogicArrayParam { get; set; }
  52.         public GetIntegerArrayDelegate TakeIntegerArrayParam { get; set; }
  53.         public GetRealArrayDelegate TakeRealArrayParam { get; set; }
  54.         public GetStringArrayDelegate TakeStringArrayParam { get; set; }
  55.  
  56.         //Use these properties to call code inside of the engine.
  57.         //Select the property based on the return value you want.
  58.         //Pass your CallID token into the first parameter and a valid script statement into the second.
  59.         public CallLogicDelegate CallLogicCode { get; set; }
  60.         public CallIntegerDelegate CallIntegerCode { get; set; }
  61.         public CallRealDelegate CallRealCode { get; set; }
  62.         public CallStringDelegate CallStringCode { get; set; }
  63.         public CallLogicArrayDelegate CallLogicArrayCode { get; set; }
  64.         public CallIntegerArrayDelegate CallIntegerArrayCode { get; set; }
  65.         public CallRealArrayDelegate CallRealArrayCode { get; set; }
  66.         public CallStringArrayDelegate CallStringArrayCode { get; set; }
  67.         public CallVoidDelegate CallVoidCode { get; set; }
  68.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement