mirror of
https://github.com/Facepunch/sbox-public.git
synced 2026-01-17 02:39:41 -05:00
This commit imports the C# engine code and game files, excluding C++ source code. [Source-Commit: ceb3d758046e50faa6258bc3b658a30c97743268]
34 lines
583 B
C#
34 lines
583 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Runtime.CompilerServices;
|
|
using Sandbox.Diagnostics;
|
|
|
|
namespace Sandbox;
|
|
|
|
internal class FileSend : System.IDisposable
|
|
{
|
|
private static readonly Logger log = new Logger( "FileSend" );
|
|
List<int> FileQueue = new List<int>();
|
|
|
|
System.IO.Stream Stream;
|
|
|
|
/// <summary>
|
|
/// Add a file to download
|
|
/// </summary>
|
|
internal void Queue( int fileId )
|
|
{
|
|
// TODO - validity check
|
|
|
|
FileQueue.Add( fileId );
|
|
}
|
|
|
|
public void Dispose()
|
|
{
|
|
Stream?.Dispose();
|
|
Stream = null;
|
|
|
|
FileQueue.Clear();
|
|
}
|
|
}
|