private void SetComponentUpdateMode <T>(T target, bool isUpdateByScene = false, params int[] willRelateComponents) where T : IShipDockComponent, new() { bool isSystem = target.IsSystem; if (isSystem) { ISystemComponent system = target as ISystemComponent; system.RelateComponents = willRelateComponents; } target.SetSceneUpdate(isUpdateByScene); target.OnFinalUpdateForTime = OnFinalUpdateForTime; target.OnFinalUpdateForEntitas = OnFinalUpdateForEntitas; target.OnFinalUpdateForExecute = OnFinalUpdateForExecute; mComponents.Add(target); int index = mComponents.Count - 1; if (isSystem) { if (isUpdateByScene) { mUpdateByScene.Add(index); } else { mUpdateByTicks.Add(index); } } }
public void DetachComponent(ISystemComponent component) { _components.Remove(component); if (component is IRunnableSystemComponent) { _runDelegates.Remove((IRunnableSystemComponent)component); } }
public ShellOperation( IActionCenter actionCenter, IEnumerable <IActionCenterActivator> activators, ActionCenterSettings actionCenterSettings, ILogger logger, INotificationInfo aboutInfo, INotificationController aboutController, INotificationInfo logInfo, INotificationController logController, ISystemComponent <ISystemKeyboardLayoutControl> keyboardLayout, ISystemComponent <ISystemPowerSupplyControl> powerSupply, ISystemComponent <ISystemWirelessNetworkControl> wirelessNetwork, ISystemInfo systemInfo, ITaskbar taskbar, TaskbarSettings taskbarSettings, ITerminationActivator terminationActivator, IText text, IUserInterfaceFactory uiFactory) { this.aboutInfo = aboutInfo; this.aboutController = aboutController; this.actionCenter = actionCenter; this.activators = activators; this.actionCenterSettings = actionCenterSettings; this.logger = logger; this.logInfo = logInfo; this.logController = logController; this.keyboardLayout = keyboardLayout; this.powerSupply = powerSupply; this.systemInfo = systemInfo; this.taskbarSettings = taskbarSettings; this.terminationActivator = terminationActivator; this.text = text; this.taskbar = taskbar; this.uiFactory = uiFactory; this.wirelessNetwork = wirelessNetwork; }
public AuthenticationService(ISystemComponent system) { _system = system; }
public void AttachComponent(ISystemComponent component) { _components.Add(component); }
internal void BuildObjectGraph(Action shutdown) { ValidateCommandLineArguments(); configuration = new ClientConfiguration(); logger = new Logger(); nativeMethods = new NativeMethods(); systemInfo = new SystemInfo(); InitializeLogging(); InitializeText(); actionCenter = BuildActionCenter(); keyboardLayout = new KeyboardLayout(new ModuleLogger(logger, nameof(KeyboardLayout)), text); messageBox = BuildMessageBox(); powerSupply = new PowerSupply(new ModuleLogger(logger, nameof(PowerSupply)), text); processMonitor = new ProcessMonitor(new ModuleLogger(logger, nameof(ProcessMonitor)), nativeMethods); uiFactory = BuildUserInterfaceFactory(); runtimeProxy = new RuntimeProxy(runtimeHostUri, new ProxyObjectFactory(), new ModuleLogger(logger, nameof(RuntimeProxy))); taskbar = BuildTaskbar(); terminationActivator = new TerminationActivator(new ModuleLogger(logger, nameof(TerminationActivator))); windowMonitor = new WindowMonitor(new ModuleLogger(logger, nameof(WindowMonitor)), nativeMethods); wirelessNetwork = new WirelessNetwork(new ModuleLogger(logger, nameof(WirelessNetwork)), text); var displayMonitor = new DisplayMonitor(new ModuleLogger(logger, nameof(DisplayMonitor)), nativeMethods, systemInfo); var explorerShell = new ExplorerShell(new ModuleLogger(logger, nameof(ExplorerShell)), nativeMethods); var hashAlgorithm = new HashAlgorithm(); var operations = new Queue <IOperation>(); operations.Enqueue(new I18nOperation(logger, text, textResource)); operations.Enqueue(new RuntimeConnectionOperation(logger, runtimeProxy, startupToken)); operations.Enqueue(new ConfigurationOperation(configuration, logger, runtimeProxy)); operations.Enqueue(new DelegateOperation(UpdateAppConfig)); operations.Enqueue(new LazyInitializationOperation(BuildClientHostOperation)); operations.Enqueue(new LazyInitializationOperation(BuildClientHostDisconnectionOperation)); operations.Enqueue(new LazyInitializationOperation(BuildKeyboardInterceptorOperation)); operations.Enqueue(new LazyInitializationOperation(BuildMouseInterceptorOperation)); operations.Enqueue(new LazyInitializationOperation(BuildWindowMonitorOperation)); operations.Enqueue(new LazyInitializationOperation(BuildProcessMonitorOperation)); operations.Enqueue(new DisplayMonitorOperation(displayMonitor, logger, taskbar)); operations.Enqueue(new LazyInitializationOperation(BuildShellOperation)); operations.Enqueue(new LazyInitializationOperation(BuildBrowserOperation)); operations.Enqueue(new ClipboardOperation(logger, nativeMethods)); operations.Enqueue(new DelegateOperation(UpdateClientControllerDependencies)); var sequence = new OperationSequence(logger, operations); ClientController = new ClientController( actionCenter, displayMonitor, explorerShell, hashAlgorithm, logger, messageBox, sequence, processMonitor, runtimeProxy, shutdown, taskbar, terminationActivator, text, uiFactory, windowMonitor); }