public void Dispose() { if (disposed) { return; } disposed = true; if (Metadata != null) { if (Metadata.GameInfo != null) { Metadata.GameInfo.EndTimeUtc = DateTime.UtcNow; } Metadata.Write(writer); } preStartBuffer?.Dispose(); writer.Close(); }
protected void Dispose(bool disposing) { if (disposed) { return; } if (disposing) { if (Metadata != null) { if (Metadata.GameInfo != null) { Metadata.GameInfo.EndTimeUtc = DateTime.UtcNow; } Metadata.Write(writer); } writer.Close(); inner.Dispose(); } disposed = true; }