mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 08:20:00 +09:00
Rename request type to be less verbose
This commit is contained in:
24
osu.Game/Online/API/ArchiveDownloadRequest.cs
Normal file
24
osu.Game/Online/API/ArchiveDownloadRequest.cs
Normal file
@ -0,0 +1,24 @@
|
||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using System;
|
||||
|
||||
namespace osu.Game.Online.API
|
||||
{
|
||||
public abstract class ArchiveDownloadRequest<TModel> : APIDownloadRequest
|
||||
where TModel : class
|
||||
{
|
||||
public readonly TModel Info;
|
||||
|
||||
public float Progress;
|
||||
|
||||
public event Action<float> DownloadProgressed;
|
||||
|
||||
protected ArchiveDownloadRequest(TModel model)
|
||||
{
|
||||
Info = model;
|
||||
|
||||
Progressed += (current, total) => DownloadProgressed?.Invoke(Progress = (float)current / total);
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user