/// <summary> /// Initialise the server. /// </summary> /// <param name="client"></param> /// <param name="watcher"></param> /// <param name="fetchVersion">Whether the version number should be fetched or not.</param> private void InitialiseServer(CruiseServerClientBase client, IServerWatcher watcher, bool fetchVersion) { this.watcher = watcher; this.watcher.Update += OnWatcherUpdate; this.client = client; if (fetchVersion) { try { client.ProcessSingleAction(s => { version = new Version(client.GetServerVersion()); }, client); } catch { // This means there will be no version for the server } } }