public bool Start(RTCSide side) { Logging.GlobalLogger.Info(string.Format("{0} v{1} initializing.", (object)this.Name, (object)this.Version)); if (side == RTCSide.Client) { connectorEMU = new MemVisConnectorEMU(); //S.SET<PluginForm>(new PluginForm()); } else if (side == RTCSide.Server) { if (S.ISNULL <OpenToolsForm>()) { ((Logger)Logging.GlobalLogger).Error(string.Format("{0} v{1} failed to start: Singleton RTC_OpenTools_Form was null.", (object)this.Name, (object)this.Version)); return(false); } if (S.ISNULL <CoreForm>()) { ((Logger)Logging.GlobalLogger).Error(string.Format("{0} v{1} failed to start: Singleton UI_CoreForm was null.", (object)this.Name, (object)this.Version)); return(false); } S.GET <OpenToolsForm>().RegisterTool("Memory Visualizer", "Open Memory Visualizer", () => { LocalNetCoreRouter.Route(Ep.EMU_SIDE, Commands.SHOW_WINDOW, true); }); } Logging.GlobalLogger.Info(string.Format("{0} v{1} initialized.", (object)this.Name, (object)this.Version)); CurrentSide = side; return(true); }
public bool Start(RTCSide side) { RTCV.Common.Logging.GlobalLogger.Info($"ScriptHost v{Version} initializing."); S.GET <RTC_OpenTools_Form>().RegisterTool("ScriptHost", "Open Script Host", () => { S.SET(new ScriptHost()); S.GET <ScriptHost>().Show(); }); RTCV.Common.Logging.GlobalLogger.Info($"ScriptHost v{Version} initialized."); return(true); }
public bool Start(RTCSide side) { RTCV.Common.Logging.GlobalLogger.Info($"{Name} v{Version} initializing."); if (side == RTCSide.Client) { var conn = new HexEditorConnector(); LocalNetCoreRouter.registerEndpoint(conn, "HEXEDITOR"); } RTCV.Common.Logging.GlobalLogger.Info($"{Name} v{Version} initialized."); return(true); }
public void Start(string[] pluginDirs, RTCSide side) { if (initialized) { logger.Error(new InvalidOperationException("Host has already been started.")); } initialize(pluginDirs, side); foreach (var p in plugins) { if (p.SupportedSide == side || p.SupportedSide == RTCSide.Both) { logger.Info($"Loading {p.Name}"); //Hack Hack Hack. If we're in attached, we're both sides. We can't thin-client this, we're actually both sides. //Start both sides and leave it up to the plugin dev to handle it for now if they're devving in attached mode (sorry Narry) //Narry 3-22-20 if (side == RTCSide.Both) { if (p.Start(RTCSide.Client)) { logger.Info("Loaded {pluginName} as client successfully", p.Name); } if (p.Start(RTCSide.Server)) { logger.Info("Loaded {pluginName} as server successfully", p.Name); } _loadedPlugins.Add(p); } else if (p.Start(side)) { logger.Info("Loaded {pluginName} successfully", p.Name); _loadedPlugins.Add(p); } else { logger.Error("Failed to load {pluginName}", p.Name); } } } initialized = true; }
public bool Start(RTCSide side) { Logging.GlobalLogger.Info($"{Name} v{Version} initializing."); if (side == RTCSide.Client) { connectorEMU = new PluginConnectorEMU(); S.SET <PluginForm>(new PluginForm()); } else if (side == RTCSide.Server) { //Uncomment if needed //connectorRTC = new PluginConnectorRTC(); S.GET <RTC_OpenTools_Form>().RegisterTool("Plugin Template", "Open Plugin Template", () => { //This is the method you use to route commands between the RTC side and the Emulator side LocalNetCoreRouter.Route(Endpoint.EMU_SIDE, Commands.SHOW_WINDOW, true); }); } Logging.GlobalLogger.Info($"{Name} v{Version} initialized."); CurrentSide = side; return(true); }
private void initialize(string[] pluginDirs, RTCSide side) { var catalog = new AggregateCatalog(); foreach (var dir in pluginDirs) { if (Directory.Exists(dir)) { catalog.Catalogs.Add(new DirectoryCatalog(dir)); } } _container = new CompositionContainer(catalog); try { this._container.ComposeParts(this); } catch (CompositionException compositionException) { logger.Error(compositionException, "Composition failed in plugin initialization"); } }
public bool Start(RTCSide side) { Console.WriteLine("Test plugin loaded!"); return(true); }
public bool Start(RTCSide side) { CurrentSide = side; return(true); }