public override void Validate()

in code/KustoCopyConsole/Entity/RowItems/BlockRowItem.cs [42:109]


        public override void Validate()
        {
            if (string.IsNullOrWhiteSpace(ActivityName))
            {
                throw new InvalidDataException($"{nameof(ActivityName)} must have a value");
            }
            if (IterationId < 1)
            {
                throw new InvalidDataException(
                    $"{nameof(IterationId)} should be positive but is {IterationId}");
            }
            if (BlockId < 1)
            {
                throw new InvalidDataException(
                    $"{nameof(BlockId)} should be positive but is {BlockId}");
            }
            if (IngestionTimeStart == DateTime.MinValue)
            {
                throw new InvalidDataException(
                    $"{nameof(IngestionTimeStart)} hasn't been populated");
            }
            if (IngestionTimeEnd == DateTime.MinValue)
            {
                throw new InvalidDataException(
                    $"{nameof(IngestionTimeEnd)} hasn't been populated");
            }
            if (MinCreationTime == DateTime.MinValue)
            {
                throw new InvalidDataException(
                    $"{nameof(MinCreationTime)} hasn't been populated");
            }
            if (MaxCreationTime == DateTime.MinValue)
            {
                throw new InvalidDataException(
                    $"{nameof(MinCreationTime)} hasn't been populated");
            }
            if (PlannedRowCount < 0)
            {
                throw new InvalidDataException(
                    $"{nameof(PlannedRowCount)} should be superior to zero");
            }
            if (State == BlockState.Exporting && string.IsNullOrWhiteSpace(ExportOperationId))
            {
                throw new InvalidDataException(
                    $"{nameof(ExportOperationId)} hasn't been populated");
            }
            if (State != BlockState.Exporting && !string.IsNullOrWhiteSpace(ExportOperationId))
            {
                throw new InvalidDataException(
                    $"{nameof(ExportOperationId)} should be empty but is '{ExportOperationId}'");
            }
            if (State != BlockState.Queued
                && State != BlockState.Ingested
                && !string.IsNullOrWhiteSpace(BlockTag))
            {
                throw new InvalidDataException($"{nameof(BlockTag)} should be empty");
            }
            if ((State == BlockState.Queued || State == BlockState.Ingested)
                && string.IsNullOrWhiteSpace(BlockTag))
            {
                throw new InvalidDataException($"{nameof(BlockTag)} should not be empty");
            }
            if (State != BlockState.Exporting && ReplannedBlockIds.Any())
            {
                throw new InvalidDataException(
                    $"{nameof(ReplannedBlockIds)} should be empty with state '{State}'");
            }
        }