public void Initialize(IMubox mubox, string extensionDllPath) { if (_extension != null) { return; } var inner = default(Exception); try { var name = Path.GetFileNameWithoutExtension(extensionDllPath); LoadExtensionDLL(extensionDllPath); if (CreateExtensionInstance()) { InitializeDispatchRuntime(mubox, name); return; } //mubox.AddServiceProvider(this); // TODO: need to attempt to remove this when loader is unloading } catch (Exception ex) { ex.Log(); inner = ex; } throw new Exception("No extension found or other error occured, check Inner Exception property.", inner); }
private void InitializeDispatchRuntime(IMubox mubox, string name) { _dispatchQueue = new ConcurrentQueue <dynamic>(); _exitYet = new ManualResetEvent(false); _shutdownYet = new ManualResetEvent(false); _dispatchThread = new Thread(DispatchThreadMain); _dispatchThread.IsBackground = true; _dispatchThread.Name = name; _dispatchThread.Start(mubox); }
public void OnLoad(IMubox mubox) { "AntiAfk::OnLoad".Log(); _mubox = mubox; (_mubox as MarshalByRefObject).GetLifetimeService(); _onActiveClientChanged = new ProxyEventHandler <ClientEventArgs>(_mubox_ActiveClientChanged); _mubox.ActiveClientChanged += _onActiveClientChanged.Proxy; _onKeyboardInputReceived = new ProxyEventHandler <Mubox.Extensibility.Input.KeyboardEventArgs>(Keyboard_InputReceived); _mubox.Keyboard.InputReceived += _onKeyboardInputReceived.Proxy; _onMouseInputReceived = new ProxyEventHandler <Mubox.Extensibility.Input.MouseEventArgs>(Mouse_InputReceived); _mubox.Mouse.InputReceived += _onMouseInputReceived.Proxy; _exitYet = false; Show(); }
public void OnLoad(IMubox mubox) { "AntiAfk::OnLoad".Log(); _mubox = mubox; (_mubox as MarshalByRefObject).GetLifetimeService(); _onActiveClientChanged = new ProxyEventHandler<ClientEventArgs>(_mubox_ActiveClientChanged); _mubox.ActiveClientChanged += _onActiveClientChanged.Proxy; _onKeyboardInputReceived = new ProxyEventHandler<Mubox.Extensibility.Input.KeyboardEventArgs>(Keyboard_InputReceived); _mubox.Keyboard.InputReceived += _onKeyboardInputReceived.Proxy; _onMouseInputReceived = new ProxyEventHandler<Mubox.Extensibility.Input.MouseEventArgs>(Mouse_InputReceived); _mubox.Mouse.InputReceived += _onMouseInputReceived.Proxy; _exitYet = false; Show(); }
public void OnLoad(IMubox mubox) { "Console::OnLoad".Log(); _mubox = mubox; _onActiveClientChanged = new ProxyEventHandler <ClientEventArgs>(_mubox_ActiveClientChanged); _mubox.ActiveClientChanged += _onActiveClientChanged.Proxy; _onKeyboardInputReceived = new ProxyEventHandler <Mubox.Extensibility.Input.KeyboardEventArgs>(Keyboard_InputReceived); _mubox.Keyboard.InputReceived += _onKeyboardInputReceived.Proxy; _onMouseInputReceived = new ProxyEventHandler <Mubox.Extensibility.Input.MouseEventArgs>(Mouse_InputReceived); _mubox.Mouse.InputReceived += _onMouseInputReceived.Proxy; _exitYet = false; //_mubox.AddServiceProvider(this); Show(); }
public void OnLoad(IMubox mubox) { "Console::OnLoad".Log(); _mubox = mubox; _onActiveClientChanged = new ProxyEventHandler<ClientEventArgs>(_mubox_ActiveClientChanged); _mubox.ActiveClientChanged += _onActiveClientChanged.Proxy; _onKeyboardInputReceived = new ProxyEventHandler<Mubox.Extensibility.Input.KeyboardEventArgs>(Keyboard_InputReceived); _mubox.Keyboard.InputReceived += _onKeyboardInputReceived.Proxy; _onMouseInputReceived = new ProxyEventHandler<Mubox.Extensibility.Input.MouseEventArgs>(Mouse_InputReceived); _mubox.Mouse.InputReceived += _onMouseInputReceived.Proxy; _exitYet = false; //_mubox.AddServiceProvider(this); Show(); }
private void InitializeDispatchRuntime(IMubox mubox, string name) { _dispatchQueue = new ConcurrentQueue<dynamic>(); _exitYet = new ManualResetEvent(false); _shutdownYet = new ManualResetEvent(false); _dispatchThread = new Thread(DispatchThreadMain); _dispatchThread.IsBackground = true; _dispatchThread.Name = name; _dispatchThread.Start(mubox); }