Files
sqltoolsservice/src/Microsoft.SqlTools.ServiceLayer/Connection/Contracts/ServerInfo.cs
Aasim Khan f8664641cf Fixing GetServerSystemInfo for Azure DBs (#1231)
* Not throwing errors when we try to fetch SQL server properties like server count and physical mem.

* Fixed comment

* Renaming get server cpu count

* Adding more detailed comment over here

* Making properties cpu count and physical memory to nullable<int> so they are defaulted to null.

* Fixing rest of the properties to nullable.
2021-08-09 17:24:04 -07:00

86 lines
2.6 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 System;
using System.Collections.Generic;
namespace Microsoft.SqlTools.ServiceLayer.Connection.Contracts
{
/// <summary>
/// Contract for information on the connected SQL Server instance.
/// </summary>
public class ServerInfo
{
/// <summary>
/// The major version of the SQL Server instance.
/// </summary>
public int ServerMajorVersion { get; set; }
/// <summary>
/// The minor version of the SQL Server instance.
/// </summary>
public int ServerMinorVersion { get; set; }
/// <summary>
/// The build of the SQL Server instance.
/// </summary>
public int ServerReleaseVersion { get; set; }
/// <summary>
/// The ID of the engine edition of the SQL Server instance.
/// </summary>
public int EngineEditionId { get; set; }
/// <summary>
/// String containing the full server version text.
/// </summary>
public string ServerVersion { get; set; }
/// <summary>
/// String describing the product level of the server.
/// </summary>
public string ServerLevel { get; set; }
/// <summary>
/// The edition of the SQL Server instance.
/// </summary>
public string ServerEdition { get; set; }
/// <summary>
/// Whether the SQL Server instance is running in the cloud (Azure) or not.
/// </summary>
public bool IsCloud { get; set; }
/// <summary>
/// The version of Azure that the SQL Server instance is running on, if applicable.
/// </summary>
public int AzureVersion { get; set; }
/// <summary>
/// The Operating System version string of the machine running the SQL Server instance.
/// </summary>
public string OsVersion { get; set; }
/// <summary>
/// The Operating System version string of the machine running the SQL Server instance.
/// </summary>
public string MachineName { get; set; }
/// <summary>
/// The CPU count of the host running the server.
/// </summary>
public Nullable<int> CpuCount;
/// <summary>
/// The physical memory of the host running the server in MBs.
/// </summary>
public Nullable<int> PhysicalMemoryInMB;
/// <summary>
/// Server options
/// </summary>
public Dictionary<string, object> Options { get; set; }
}
}