示例#1
0
        public static async Task <FileDetailsResult_t?> GetResultAsync(SteamAPICall_t handle)
        {
            FileDetailsResult_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(FileDetailsResult_t.StructSize);
                try
                {
                    if (!(!SteamUtils.Internal.GetAPICallResult(handle, intPtr, FileDetailsResult_t.StructSize, 1023, ref flag) | flag))
                    {
                        nullable = new FileDetailsResult_t?(FileDetailsResult_t.Fill(intPtr));
                    }
                    else
                    {
                        nullable = null;
                    }
                }
                finally
                {
                    Marshal.FreeHGlobal(intPtr);
                }
            }
            else
            {
                nullable = null;
            }
            return(nullable);
        }