Rename Dagger to Voile.
This commit is contained in:
30
Voile/Source/Resources/Resource.cs
Normal file
30
Voile/Source/Resources/Resource.cs
Normal file
@@ -0,0 +1,30 @@
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace Voile
|
||||
{
|
||||
public abstract class Resource : IDisposable
|
||||
{
|
||||
public string? Path { get => _path; set => _path = value; }
|
||||
|
||||
[JsonIgnore]
|
||||
public byte[]? Buffer { get => _buffer; set => _buffer = value; }
|
||||
|
||||
[JsonIgnore]
|
||||
public long BufferSize { get; set; }
|
||||
|
||||
public Resource(string path, byte[] buffer)
|
||||
{
|
||||
_path = path;
|
||||
_buffer = buffer;
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
Buffer = null;
|
||||
Path = null;
|
||||
}
|
||||
|
||||
private string? _path;
|
||||
private byte[]? _buffer;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user