Files
sqltoolsservice/src/Microsoft.SqlTools.ServiceLayer/QueryExecution/Contracts/QueryExecuteBatchNotifications.cs
Benjamin Russell 54f30887cc Batch Start Notification (#169)
This change is part of the progressive results code. It will submit a notification from the service layer to indicate when execution of a batch has completed. This notification will contain the selection for batch, execution start time, and its ID. This will enable the extension to produce a header for the batch before the batch completes, in order to make it more clear to the user that execution is going on.

* Adding new event for batch start

* Unit tests

* Fixing comments as per @kevcunnane
2016-12-08 11:23:08 -08:00

40 lines
1.3 KiB
C#

//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Contracts;
namespace Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts
{
/// <summary>
/// Parameters to be sent back as part of a QueryExecuteBatchCompleteEvent to indicate that a
/// batch of a query completed.
/// </summary>
public class QueryExecuteBatchNotificationParams
{
/// <summary>
/// Summary of the batch that just completed
/// </summary>
public BatchSummary BatchSummary { get; set; }
/// <summary>
/// URI for the editor that owns the query
/// </summary>
public string OwnerUri { get; set; }
}
public class QueryExecuteBatchCompleteEvent
{
public static readonly
EventType<QueryExecuteBatchNotificationParams> Type =
EventType<QueryExecuteBatchNotificationParams>.Create("query/batchComplete");
}
public class QueryExecuteBatchStartEvent
{
public static readonly
EventType<QueryExecuteBatchNotificationParams> Type =
EventType<QueryExecuteBatchNotificationParams>.Create("query/batchStart");
}
}