/
dev-npgsql
/
npgsql
Обзор
Документация
Войти
/
dev-npgsql
/
npgsql
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
v4.1.15
src/Npgsql/NpgsqlOperationInProgressException.cs
28 строк
1 KB
Shay Rojansky
Convert codebase to use C# 8 nullability
05 май 2019, 21:55
05 май 2019, 21:55
f2dd3f7
Код
Авторство
О чём код?
using System; namespace Npgsql { /// <summary> /// Thrown when trying to use a connection that is already busy performing some other operation. /// Provides information on the already-executing operation to help with debugging. /// </summary> public sealed class NpgsqlOperationInProgressException : InvalidOperationException { internal NpgsqlOperationInProgressException(NpgsqlCommand command) : base("A command is already in progress: " + command.CommandText) { CommandInProgress = command; } internal NpgsqlOperationInProgressException(ConnectorState state) : base($"The connection is already in state '{state}'") { } /// <summary> /// If the connection is busy with another command, this will contain a reference to that command. /// Otherwise, if the connection if busy with another type of operation (e.g. COPY), contains null. /// </summary> public NpgsqlCommand? CommandInProgress { get; } } }