public JsJinxBotClientObjectInstance(IJinxBotClient client, JsHost js, ScriptEngine engine) : base(engine.Object.InstancePrototype) { this.PopulateFunctions(); this._client = client; _js = js; _engine = engine; }
protected virtual void ResetScriptEngine(ScriptSource source, IJinxBotClient client) { _jsEngine = new ScriptEngine(); _host = new JsHost(_jsEngine, client); _jsEngine.Execute(source); __accountCreated = GetFunc("accountCreated"); __accountCreationFailed = GetFunc("accountCreationFailed"); __adChanged = GetFunc("adChanged"); __channelDidNotExist = GetFunc("channelDidNotExist"); __channelListReceived = GetFunc("channelListReceived"); __channelWasFull = GetFunc("channelWasFull"); __channelWasRestricted = GetFunc("channelWasRestricted"); __clientCheckFailed = GetFunc("clientCheckFailed"); __clientCheckPassed = GetFunc("clientCheckPassed"); __commandSent = GetFunc("commandSent"); __connected = GetFunc("connected"); __disconnected = GetFunc("disconnected"); __enteredChat = GetFunc("enteredChat"); __error = GetFunc("error"); __friendAdded = GetFunc("friendAdded"); __friendListReceived = GetFunc("friendListReceived"); __friendMoved = GetFunc("friendMoved"); __friendRemoved = GetFunc("friendRemoved"); __friendUpdated = GetFunc("friendUpdated"); __information = GetFunc("information"); __informationReceived = GetFunc("informationReceived"); __joinedChannel = GetFunc("joinedChannel"); __loginFailed = GetFunc("loginFailed"); __loginSucceeded = GetFunc("loginSucceeded"); __messageSent = GetFunc("messageSent"); __profileLookupFailed = GetFunc("profileLookupFailed"); __serverBroadcast = GetFunc("serverBroadcast"); __serverErrorReceived = GetFunc("serverErrorReceived"); __serverNews = GetFunc("serverNews"); __userEmoted = GetFunc("userEmoted"); __userFlagsChanged = GetFunc("userFlagsChanged"); __userJoined = GetFunc("userJoined"); __userLeft = GetFunc("userLeft"); __userProfileReceived = GetFunc("userProfileReceived"); __userShown = GetFunc("userShown"); __userSpoke = GetFunc("userSpoke"); __warcraftProfileReceived = GetFunc("warcraftProfileReceived"); __whisperReceived = GetFunc("whisperReceived"); __whisperSent = GetFunc("whisperSent"); }