示例#1
0
        /// <summary>
        /// Initializes the object of this class. We have chosen to use this method instead of a constructor as various
        /// other methods called from Initilize require a ServerSync.Instance to be set, which requires a construct to
        /// have finished constructing the object already.
        /// </summary>
        public void Initialize()
        {
            localServer   = new LocalServerImpl();
            remoteServers = new Dictionary <Connection, IRemoteServer>();

            domainSync    = new DomainSync();
            worldSync     = new WorldSync();
            componentSync = new ComponentSync();

            localServer.Service.OnNewClient += HandleNewServerConnected;

            ConnectToRemoteServers();

            PluginManager.Instance.AddPluginLoadedHandler("Terminal", RegisterTerminalCommands);
        }
示例#2
0
        /// <summary>
        /// Initializes the object of this class. We have chosen to use this method instead of a constructor as various
        /// other methods called from Initilize require a ServerSync.Instance to be set, which requires a construct to
        /// have finished constructing the object already.
        /// </summary>
        public void Initialize()
        {
            localServer          = new LocalServerImpl();
            remoteServers        = new Dictionary <Connection, IRemoteServer>();
            AttemptedConnections = new HashSet <Connection>();

            domainSync    = new DomainSync();
            worldSync     = new WorldSync();
            componentSync = new ComponentSync();

            localServer.Service.OnNewClient += HandleNewServerConnected;

            if (ServerDiscovery == null)
            {
                ServerDiscovery = new ConfigDiscovery();
            }

            ConnectToRemoteServers();

            PluginManager.Instance.AddPluginLoadedHandler("Terminal", RegisterTerminalCommands);
        }
        /// <summary>
        /// Initializes the object of this class. We have chosen to use this method instead of a constructor as various
        /// other methods called from Initilize require a ServerSync.Instance to be set, which requires a construct to
        /// have finished constructing the object already.
        /// </summary>
        public void Initialize()
        {
            localServer = new LocalServerImpl();
            remoteServers = new Dictionary<Connection, IRemoteServer>();

            domainSync = new DomainSync();
            worldSync = new WorldSync();
            componentSync = new ComponentSync();

            localServer.Service.OnNewClient += HandleNewServerConnected;

            ConnectToRemoteServers();

            PluginManager.Instance.AddPluginLoadedHandler("Terminal", RegisterTerminalCommands);
        }