Add support to save publish profile (#1844)

* Add support to save publish profile

* Address comments

* Update dacfx nuget package version

* Fix test

* Address comments

* Resolve package.props conflict

* Add content verification in test and use handler methods instead of try-catch

* Address comments
This commit is contained in:
Sakshi Sharma
2023-02-09 11:56:43 -08:00
committed by GitHub
parent b717ca9d6c
commit 497118ed82
4 changed files with 149 additions and 0 deletions

View File

@@ -0,0 +1,53 @@
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//
using System.Collections.Generic;
using Microsoft.SqlTools.Hosting.Protocol.Contracts;
using Microsoft.SqlTools.ServiceLayer.Utility;
namespace Microsoft.SqlTools.ServiceLayer.DacFx.Contracts
{
/// <summary>
/// Parameters for a DacFx save publish profile request.
/// </summary>
public class SavePublishProfileParams
{
/// <summary>
/// Gets or sets the profile path
/// </summary>
public string ProfilePath { get; set; }
/// <summary>
/// Gets or sets name for database
/// </summary>
public string? DatabaseName { get; set; }
/// <summary>
/// Gets or sets target connection string
/// </summary>
public string? ConnectionString { get; set; }
/// <summary>
/// Gets or sets SQLCMD variables for deployment
/// </summary>
public IDictionary<string, string>? SqlCommandVariableValues { get; set; }
/// <summary>
/// Gets or sets the options for deployment
/// </summary>
public DeploymentOptions? DeploymentOptions { get; set; }
}
/// <summary>
/// Defines the DacFx save publish profile request type
/// </summary>
class SavePublishProfileRequest
{
public static readonly RequestType<SavePublishProfileParams, ResultStatus> Type =
RequestType<SavePublishProfileParams, ResultStatus>.Create("dacfx/savePublishProfile");
}
}