public static void StartServer(bool UseExamples, string ProfileNameSetting, string LicenseKeySetting) { if (server == null) { server = new Server.Server(); server.OnStarted += Server_OnStarted; server.OnStopped += Server_OnStopped; server.Start(UseExamples, ProfileNameSetting, LicenseKeySetting); } }
public static async System.Threading.Tasks.Task StopServer() { if (server != null) { await server.Stop(); server.OnStarted -= Server_OnStarted; server.OnStopped -= Server_OnStopped; server = null; } }