Esempio n. 1
0
        public static async Task <ComputeNewPlayerCompatibilityResult_t?> GetResultAsync(SteamAPICall_t handle)
        {
            ComputeNewPlayerCompatibilityResult_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(ComputeNewPlayerCompatibilityResult_t.StructSize);
                try
                {
                    if (!(!SteamUtils.Internal.GetAPICallResult(handle, intPtr, ComputeNewPlayerCompatibilityResult_t.StructSize, 211, ref flag) | flag))
                    {
                        nullable = new ComputeNewPlayerCompatibilityResult_t?(ComputeNewPlayerCompatibilityResult_t.Fill(intPtr));
                    }
                    else
                    {
                        nullable = null;
                    }
                }
                finally
                {
                    Marshal.FreeHGlobal(intPtr);
                }
            }
            else
            {
                nullable = null;
            }
            return(nullable);
        }
        public static async Task <RemoteStorageFileWriteAsyncComplete_t?> GetResultAsync(SteamAPICall_t handle)
        {
            RemoteStorageFileWriteAsyncComplete_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(RemoteStorageFileWriteAsyncComplete_t.StructSize);
                try
                {
                    if (!(!SteamUtils.Internal.GetAPICallResult(handle, intPtr, RemoteStorageFileWriteAsyncComplete_t.StructSize, 1331, ref flag) | flag))
                    {
                        nullable = new RemoteStorageFileWriteAsyncComplete_t?(RemoteStorageFileWriteAsyncComplete_t.Fill(intPtr));
                    }
                    else
                    {
                        nullable = null;
                    }
                }
                finally
                {
                    Marshal.FreeHGlobal(intPtr);
                }
            }
            else
            {
                nullable = null;
            }
            return(nullable);
        }
Esempio n. 3
0
        public static async Task <SteamInventoryStartPurchaseResult_t?> GetResultAsync(SteamAPICall_t handle)
        {
            SteamInventoryStartPurchaseResult_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(SteamInventoryStartPurchaseResult_t.StructSize);
                try
                {
                    if (!(!SteamUtils.Internal.GetAPICallResult(handle, intPtr, SteamInventoryStartPurchaseResult_t.StructSize, 4704, ref flag) | flag))
                    {
                        nullable = new SteamInventoryStartPurchaseResult_t?(SteamInventoryStartPurchaseResult_t.Fill(intPtr));
                    }
                    else
                    {
                        nullable = null;
                    }
                }
                finally
                {
                    Marshal.FreeHGlobal(intPtr);
                }
            }
            else
            {
                nullable = null;
            }
            return(nullable);
        }