public static IUniqueIdentificationSet ToUidSet(PartitionBlockInterval[] input) {
    return new UniqueIdentificationSet(false).With(x => {
       x.__Assign(new LinkedList<UniqueIdentificationSet.Segment>(
          Util.Generate(input.Length, i => new UniqueIdentificationSet.Segment {
             low = input[i].StartBlockInclusive,
             high = input[i].EndBlockExclusive - 1
          })
       ));
    });
 }
 public CacheNeedDto(Guid cacheId, PartitionBlockInterval[] blocks) : base(cacheId) {
    Blocks = blocks;
 }
 public CacheHaveDto(Guid cacheId, PartitionBlockInterval[] blocks, int servicePort) : base(cacheId) {
    Blocks = blocks;
    ServicePort = servicePort;
 }