Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class EsotericModule
- {
- //Delegate types used for binding code from the engine.
- //Don't change these.
- public delegate bool GetLogicDelegate(ulong CallID);
- public delegate long GetIntegerDelegate(ulong CallID);
- public delegate double GetRealDelegate(ulong CallID);
- public delegate string GetStringDelegate(ulong CallID);
- public delegate List<bool> GetLogicArrayDelegate(ulong CallID);
- public delegate List<long> GetIntegerArrayDelegate(ulong CallID);
- public delegate List<double> GetRealArrayDelegate(ulong CallID);
- public delegate List<string> GetStringArrayDelegate(ulong CallID);
- public delegate bool CallLogicDelegate(ulong CallID, string Code);
- public delegate long CallIntegerDelegate(ulong CallID, string Code);
- public delegate double CallRealDelegate(ulong CallID, string Code);
- public delegate string CallStringDelegate(ulong CallID, string Code);
- public delegate List<bool> CallLogicArrayDelegate(ulong CallID, string Code);
- public delegate List<long> CallIntegerArrayDelegate(ulong CallID, string Code);
- public delegate List<double> CallRealArrayDelegate(ulong CallID, string Code);
- public delegate List<string> CallStringArrayDelegate(ulong CallID, string Code);
- public delegate void CallVoidDelegate(ulong CallID, string Code);
- //This function defines the name of your library.
- //This name will be used to call the library from the engine.
- //For example: lib "esql" "open" "test.db" "test"
- // lib "esql" "close" "test"
- // etc.
- public string GetName(ulong CallID) => "esql";
- //These functions are called when the engine tries to access the library.
- //The function depends on the return type requested.
- public bool GetLogic(ulong CallID) => throw new NotImplementedException();
- public long GetInteger(ulong CallID) => throw new NotImplementedException();
- public double GetReal(ulong CallID) => throw new NotImplementedException();
- public string GetString(ulong CallID) => throw new NotImplementedException();
- public List<bool> GetLogicArray(ulong CallID) => throw new NotImplementedException();
- public List<long> GetIntegerArray(ulong CallID) => throw new NotImplementedException();
- public List<double> GetRealArray(ulong CallID) => throw new NotImplementedException();
- public List<string> GetStringArray(ulong CallID) => throw new NotImplementedException();
- //This function represents void calls.
- //Note you should use Take*Param(CallID) calls to obtain parameters.
- public void GetVoid(ulong CallID) => throw new NotImplementedException();
- //Use these properties to get parameters for your library call.
- //Select the property based on the return value you want.
- //Pass your CallID token into the first parameter.
- public GetLogicDelegate TakeLogicParam { get; set; }
- public GetIntegerDelegate TakeIntegerParam { get; set; }
- public GetRealDelegate TakeRealParam { get; set; }
- public GetStringDelegate TakeStringParam { get; set; }
- public GetLogicArrayDelegate TakeLogicArrayParam { get; set; }
- public GetIntegerArrayDelegate TakeIntegerArrayParam { get; set; }
- public GetRealArrayDelegate TakeRealArrayParam { get; set; }
- public GetStringArrayDelegate TakeStringArrayParam { get; set; }
- //Use these properties to call code inside of the engine.
- //Select the property based on the return value you want.
- //Pass your CallID token into the first parameter and a valid script statement into the second.
- public CallLogicDelegate CallLogicCode { get; set; }
- public CallIntegerDelegate CallIntegerCode { get; set; }
- public CallRealDelegate CallRealCode { get; set; }
- public CallStringDelegate CallStringCode { get; set; }
- public CallLogicArrayDelegate CallLogicArrayCode { get; set; }
- public CallIntegerArrayDelegate CallIntegerArrayCode { get; set; }
- public CallRealArrayDelegate CallRealArrayCode { get; set; }
- public CallStringArrayDelegate CallStringArrayCode { get; set; }
- public CallVoidDelegate CallVoidCode { get; set; }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement