Exemple #1
0
 internal void SetCheckpoint(IProjectionCheckpoint checkpoint)
 {
     Checkpoint = checkpoint;
     if (UndropRequested)
     {
         Checkpoint.DroppedAtUtc = null;
         UndropRequested         = false;
     }
 }
        public async Task Update(IProjectionCheckpoint checkpoint, bool undropRequested, CancellationToken cancellationToken = default(CancellationToken))
        {
            using (var cnn = new SqlConnection(_connectionString))
            {
                await cnn.OpenAsync(cancellationToken).NotOnCapturedContext();

                var cmd = cnn.CreateCommand();
                cmd.CommandType = CommandType.StoredProcedure;
                cmd.CommandText = spuUpdateProjectionCheckpoint;
                cmd.AddInputParam("@ProjectorName", SqlDbType.VarChar, checkpoint.ProjectorName, 128);
                cmd.AddInputParam("@ProjectionName", SqlDbType.VarChar, checkpoint.ProjectionName, 128);
                cmd.AddInputParam("@Position", SqlDbType.BigInt, checkpoint.Position);
                cmd.AddInputParam("@DroppedAtUtc", SqlDbType.DateTime2, checkpoint.DroppedAtUtc != null && !undropRequested ? checkpoint.DroppedAtUtc.Value : (object)DBNull.Value);
                await cmd.ExecuteNonQueryAsync(cancellationToken).NotOnCapturedContext();
            }
        }
Exemple #3
0
 protected internal async Task UpdateCheckpoint(IProjectionCheckpoint checkpoint, bool undropRequested, CancellationToken token)
 {
     await _checkpointRepository.Update(checkpoint, undropRequested, token).NotOnCapturedContext();
 }