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:
Anthony Dresser
2017-06-08 16:57:52 -07:00
committed by GitHub
parent b60a865706
commit 84edef6374
5 changed files with 96 additions and 0 deletions

View File

@@ -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");
}
}