internal ServerBase(IServerConfig config, IDeviceContainer deviceContainer = null, ILogContainer logContainer = null) { if (config == null) { throw new ArgumentNullException("配制信息", "参数为空"); } ServerConfig = config; _deviceContainer = deviceContainer; if (_deviceContainer != null) { _deviceContainer.MouseRightContextMenu += Device_MouseRightContextMenu; } if (logContainer == null) { logContainer = new ConsoleContainer(); } Logger = (new LogFactory()).GetLog(ServerName, logContainer); _monitorException = new MonitorException(); ServiceManager = new ServiceManager(Logger); GraphicsShowManager = new GraphicsShowManager(Logger); DeviceManager = new DeviceManager(Logger); ChannelManager = new ChannelManager(Logger); ControllerManager = new ControllerManager(Logger); IsDisposed = false; }
public IServer CreateServer(IServerConfig config, IDeviceContainer deviceContainer = null, ILogContainer logContainer = null) { try { return(new Server(config, deviceContainer, logContainer)); } catch { throw; } }
protected List <DeviceNode> GetDevices(IDeviceContainer node, bool recurse) { var devices = node.Devices; if (node is IGroupContainer && recurse) { foreach (var group in ((IGroupContainer)node).Groups) { devices.AddRange(GetDevices(group, true)); } } return(devices); }
internal SocketServer(IServerConfig config, IDeviceContainer deviceContainer = null, ILogContainer logContainer = null) : base(config, deviceContainer, logContainer) { }