//
// 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.Hosting.Contracts;
namespace Microsoft.SqlTools.DataProtocol.Contracts
{
///
/// Parameters provided with an initialize request with extra options provided by the client
///
///
/// Type of the initialization options expected from the client, can be any reference type
///
public class InitializeParametersWithOptions : InitializeParameters where TInitializationOptions : class
{
///
/// Initialization options provided by the client, can be null
///
public TInitializationOptions InitializationOptions { get; set; }
}
///
/// Request definition for initialization of the server. This version provides optional extra
/// parameters that can be used to pass extra information between client and server during
/// initialization. If these extra options aren't needed, use .
///
///
/// Type to use for extra parameters in the initialize request. These appear as
/// .
/// If these extra options are not expected, but extra response options are, simply use
/// object as the type.
///
///
/// Type to use for the initialize response. Due to VSCode's protocol definition, any extra
/// params that should be sent back to the client are defined as dictionary of key/value pairs.
/// This can be emulated by defining a class that extends with
/// whatever extra params are expected. If no extra options are needed, but extra request
/// options are, simply use as the type.
///
public class InitializeRequestWithOptions
where TInitializeOptions : class
where TInitializeResponse : InitializeResponse
{
public static readonly RequestType, TInitializeResponse> Type =
RequestType, TInitializeResponse>.Create("initialize");
}
}