mirror of https://github.com/ogoun/Zero.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
682 B
26 lines
682 B
using System;
|
|
|
|
namespace ZeroLevel.Services.PartitionStorage
|
|
{
|
|
/// <summary>
|
|
/// File partition, contains the method of forming the path
|
|
/// </summary>
|
|
public class StoreFilePartition<TKey, TMeta>
|
|
{
|
|
/// <summary>
|
|
/// Name of partition, just for info
|
|
/// </summary>
|
|
public string Name { get; }
|
|
/// <summary>
|
|
/// File name generator
|
|
/// </summary>
|
|
public Func<TKey, TMeta, string> FileNameExtractor { get; }
|
|
|
|
public StoreFilePartition(string name, Func<TKey, TMeta, string> pathExtractor)
|
|
{
|
|
Name = name;
|
|
FileNameExtractor = pathExtractor;
|
|
}
|
|
}
|
|
}
|