Get Azure functions operation (#1228)

* add GetAzureFunctions

* add tests

* cleanup

* check for quotes

* address other comments

* add logging and let error result get sent

* rename file
This commit is contained in:
Kim Santiago
2021-08-18 17:05:27 -07:00
committed by GitHub
parent ccd2ec446d
commit c20af4f777
10 changed files with 201 additions and 16 deletions

View File

@@ -0,0 +1,39 @@
//
// 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.SchemaCompare.Contracts;
using Microsoft.SqlTools.ServiceLayer.Utility;
namespace Microsoft.SqlTools.ServiceLayer.AzureFunctions.Contracts
{
/// <summary>
/// Parameters for getting the Azure functions in a file
/// </summary>
public class GetAzureFunctionsParams
{
/// <summary>
/// Gets or sets the filePath
/// </summary>
public string filePath { get; set; }
}
/// <summary>
/// Parameters returned from a get Azure functions request
/// </summary>
public class GetAzureFunctionsResult : ResultStatus
{
public string[] azureFunctions { get; set; }
}
/// <summary>
/// Defines the get Azure functions request
/// </summary>
class GetAzureFunctionsRequest
{
public static readonly RequestType<GetAzureFunctionsParams, GetAzureFunctionsResult> Type =
RequestType<GetAzureFunctionsParams, GetAzureFunctionsResult>.Create("azureFunctions/getAzureFunctions");
}
}