public void Run( Services.Cache cache, Services.Settings setting, Services.ConfigMgr configMgr, Services.Servers servers) { //external dependency injection coreCtrl = new CoreServerComponent.CoreCtrl(setting, configMgr); states = new CoreServerComponent.CoreStates(servers, coreInfo); logger = new CoreServerComponent.Logger(setting); configer = new CoreServerComponent.Configer( setting, cache, configMgr, coreInfo); AddChild(coreCtrl); AddChild(states); AddChild(logger); AddChild(configer); //inter-container dependency injection coreCtrl.Prepare(); states.Prepare(); logger.Prepare(); configer.Prepare(); //other initializiations coreCtrl.BindEvents(); }
public Quick( Button skipCN, Button mtProto, CheckBox chkUseV4) { cache = Services.Cache.Instance; servers = Services.Servers.Instance; configMgr = Services.ConfigMgr.Instance; isUseV4 = chkUseV4.Checked; chkUseV4.CheckedChanged += (s, a) => { isUseV4 = chkUseV4.Checked; }; skipCN.Click += (s, a) => { container.InjectConfigHelper( () => configMgr .InjectSkipCnSiteSettingsIntoConfig( ref container.config, isUseV4) ); }; mtProto.Click += (s, a) => { container.InjectConfigHelper(() => { InsertMTProto(ref container.config); }); }; }
public ApiController(Services.Configuration configuration, Services.Cache cache, ApplicationDbContext context, IEmailSender emailSender) { Configuration = configuration; _cache = cache; _context = context; _emailSender = emailSender; }
public MenuItemsServer( // misc ToolStripMenuItem refreshSummary, ToolStripMenuItem deleteAllServers, ToolStripMenuItem deleteSelected, // copy ToolStripMenuItem copyAsV2cfgLinks, ToolStripMenuItem copyAsVmessLinks, ToolStripMenuItem copyAsVeeLinks, ToolStripMenuItem copyAsVmessSubscriptions, ToolStripMenuItem copyAsVeeSubscriptions, // batch op ToolStripMenuItem stopBatchSpeedtest, ToolStripMenuItem runBatchSpeedtest, ToolStripMenuItem modifySelected, ToolStripMenuItem stopSelected, ToolStripMenuItem restartSelected, // view ToolStripMenuItem moveToTop, ToolStripMenuItem moveToBottom, ToolStripMenuItem sortBySpeed, ToolStripMenuItem sortByDate, ToolStripMenuItem sortBySummary) { cache = Services.Cache.Instance; servers = Services.Servers.Instance; slinkMgr = Services.ShareLinkMgr.Instance; settings = Services.Settings.Instance; InitCtrlSorting(sortBySpeed, sortByDate, sortBySummary); InitCtrlView(moveToTop, moveToBottom); InitCtrlCopyToClipboard( copyAsV2cfgLinks, copyAsVmessLinks, copyAsVeeLinks, copyAsVmessSubscriptions, copyAsVeeSubscriptions); InitCtrlMisc( refreshSummary, deleteSelected, deleteAllServers); InitCtrlBatchOperation( stopSelected, restartSelected, runBatchSpeedtest, stopBatchSpeedtest, modifySelected); }
public Configer( Services.Settings setting, Services.Cache cache, Services.ConfigMgr configMgr, VgcApis.Models.Datas.CoreInfo coreInfo) { this.configMgr = configMgr; this.setting = setting; this.cache = cache; this.coreInfo = coreInfo; }
public Editor( Panel panel, ComboBox cboxSection, ComboBox cboxExample, Button btnFormat, Button btnRestore) { cache = Services.Cache.Instance; this.cboxSection = cboxSection; this.cboxExample = cboxExample; this.btnFormat = btnFormat; this.btnRestore = btnRestore; CreateEditor(panel); }
public StreamSettings( ComboBox type, ComboBox param, RadioButton inbound, CheckBox v4mode, Button insert, CheckBox tls, CheckBox sockopt) { cache = Services.Cache.Instance; isServer = false; isV4Mode = false; DataBinding(type, param, tls, sockopt); Connect(type, param); AttachEvent(inbound, v4mode, insert); InitComboBox(type); }
public Shadowsocks( RadioButton rbtnInboundMode, CheckBox chkV4Mode, TextBox tboxAddress, TextBox tboxPassword, CheckBox chkIsShowPassword, ComboBox cboxMethods, CheckBox chkIsUseOTA, Button btnInsert) { cache = Services.Cache.Instance; isServerMode = false; isV4Mode = false; Misc.UI.FillComboBox(cboxMethods, Models.Datas.Table.ssMethods); Misc.UI.ResetComboBoxDropdownMenuWidth(cboxMethods); AttachEvents(tboxPassword, chkIsShowPassword, btnInsert, rbtnInboundMode, chkV4Mode); DataBinding(tboxAddress, tboxPassword, cboxMethods, chkIsUseOTA); }
public ApiController(Services.Configuration configuration, Services.Cache cache) { _configuration = configuration; _cache = cache; }
public NewsController(Services.Configuration configuration, Services.Cache cache) { Configuration = configuration; _cache = cache; }
public ApiController(Services.Configuration configuration, Services.Cache cache, ApplicationDbContext context) { Configuration = configuration; _cache = cache; _context = context; }