private void onOperationCompleted(object sender, EventArgs e) { CurrentOperation.Succeed -= onOperationCompleted; CurrentOperation.Failed -= onOperationCompleted; CurrentOperation.Dispose(); CurrentOperation = null; if (mMainThread != Thread.CurrentThread || !mQueue.Any()) { return; } dequeueAndExecute(); }
public static void Shutdown() { if (IsInit) { GameLobbyJoinRequested?.Dispose(); GameLobbyJoinRequested = null; CurrentOperation?.Dispose(); CurrentOperation = null; SteamAPI.Shutdown(); IsInit = false; } }
public static void Service() { SteamAPI.RunCallbacks(); if (CurrentOperation?.Done ?? false) { if (CurrentOperation.Failed) { CurrentOperation.OnFailed(); } else { CurrentOperation.OnSuccess(); } CurrentOperation.Dispose(); CurrentOperation = null; } }