Beispiel #1
0
        private static void OnServer(IntPtr thisptr, IntPtr pvParam)
        {
            Action <ChangeNumOpenSlotsCallback_t> action = ChangeNumOpenSlotsCallback_t.actionServer;

            if (action != null)
            {
                action(ChangeNumOpenSlotsCallback_t.Fill(pvParam));
            }
            else
            {
            }
        }
Beispiel #2
0
        public static async Task <ChangeNumOpenSlotsCallback_t?> GetResultAsync(SteamAPICall_t handle)
        {
            ChangeNumOpenSlotsCallback_t?nullable;
            bool flag = false;

            while (!SteamUtils.IsCallComplete(handle, out flag))
            {
                await Task.Delay(1);

                if ((SteamClient.IsValid ? false : !SteamServer.IsValid))
                {
                    nullable = null;
                    return(nullable);
                }
            }
            if (!flag)
            {
                IntPtr intPtr = Marshal.AllocHGlobal(ChangeNumOpenSlotsCallback_t.StructSize);
                try
                {
                    if (!(!SteamUtils.Internal.GetAPICallResult(handle, intPtr, ChangeNumOpenSlotsCallback_t.StructSize, 5304, ref flag) | flag))
                    {
                        nullable = new ChangeNumOpenSlotsCallback_t?(ChangeNumOpenSlotsCallback_t.Fill(intPtr));
                    }
                    else
                    {
                        nullable = null;
                    }
                }
                finally
                {
                    Marshal.FreeHGlobal(intPtr);
                }
            }
            else
            {
                nullable = null;
            }
            return(nullable);
        }