Rename Feedser to Concelier
This commit is contained in:
		
							
								
								
									
										37
									
								
								src/StellaOps.Concelier.Exporter.Json/JsonExportFile.cs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										37
									
								
								src/StellaOps.Concelier.Exporter.Json/JsonExportFile.cs
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,37 @@
 | 
			
		||||
using System;
 | 
			
		||||
 | 
			
		||||
namespace StellaOps.Concelier.Exporter.Json;
 | 
			
		||||
 | 
			
		||||
/// <summary>
 | 
			
		||||
/// Metadata describing a single file produced by the JSON exporter.
 | 
			
		||||
/// </summary>
 | 
			
		||||
public sealed class JsonExportFile
 | 
			
		||||
{
 | 
			
		||||
    public JsonExportFile(string relativePath, long length, string digest)
 | 
			
		||||
    {
 | 
			
		||||
        RelativePath = relativePath ?? throw new ArgumentNullException(nameof(relativePath));
 | 
			
		||||
        if (relativePath.Length == 0)
 | 
			
		||||
        {
 | 
			
		||||
            throw new ArgumentException("Relative path cannot be empty.", nameof(relativePath));
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        if (length < 0)
 | 
			
		||||
        {
 | 
			
		||||
            throw new ArgumentOutOfRangeException(nameof(length));
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        Digest = digest ?? throw new ArgumentNullException(nameof(digest));
 | 
			
		||||
        if (digest.Length == 0)
 | 
			
		||||
        {
 | 
			
		||||
            throw new ArgumentException("Digest cannot be empty.", nameof(digest));
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        Length = length;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public string RelativePath { get; }
 | 
			
		||||
 | 
			
		||||
    public long Length { get; }
 | 
			
		||||
 | 
			
		||||
    public string Digest { get; }
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user