33 lines
805 B
C#
33 lines
805 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Serwer.Core.Domain
|
|
{
|
|
public class File
|
|
{
|
|
public string Name { get; protected set; }
|
|
public string ContentType { get; protected set; }
|
|
public byte[] Bytes { get; protected set; }
|
|
public long SizeBytes => Bytes.Length;
|
|
|
|
protected File()
|
|
{
|
|
}
|
|
|
|
protected File(string name, string contentType, byte[] bytes)
|
|
{
|
|
Name = name;
|
|
ContentType = contentType;
|
|
Bytes = bytes;
|
|
}
|
|
|
|
public static File Empty => new File();
|
|
|
|
public static File Create(string name, string contentType, byte[] bytes)
|
|
=> new File(name, contentType, bytes);
|
|
}
|
|
}
|