mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-02-06 17:24:59 -05:00
Get Database Info (#370)
* added get database info to admin service * refactored code to be inline with standard * added comments to utils functions * added comments to public classes * removed camelcase from request type * removed the wrapper for the generic dictionary * removed unnecessary imports
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
//
|
||||
// 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.Protocol.Contracts;
|
||||
|
||||
namespace Microsoft.SqlTools.ServiceLayer.Admin.Contracts
|
||||
{
|
||||
/// <summary>
|
||||
/// Params for a get database info request
|
||||
/// </summar>
|
||||
public class GetDatabaseInfoParams
|
||||
{
|
||||
/// <summary>
|
||||
/// Uri identifier for the connection to get the database info for
|
||||
/// </summary>
|
||||
public string OwnerUri { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Response object for get database info
|
||||
/// </summary>
|
||||
public class GetDatabaseInfoResponse
|
||||
{
|
||||
/// <summary>
|
||||
/// The object containing the database info
|
||||
/// </summary>
|
||||
public DatabaseInfo Result { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get database info request mapping
|
||||
/// </summary>
|
||||
public class GetDatabaseInfoRequest
|
||||
{
|
||||
public static readonly
|
||||
RequestType<GetDatabaseInfoParams, GetDatabaseInfoResponse> Type =
|
||||
RequestType<GetDatabaseInfoParams, GetDatabaseInfoResponse>.Create("admin/getdatabaseinfo");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user