Add route to GetAzureFunctions request + cleanup (#1521)

* Add route to GetAzureFunctions request + cleanup

* update comments

* comments

* Add comment
This commit is contained in:
Charles Gagnon
2022-05-31 10:22:20 -07:00
committed by GitHub
parent 5fdad0edc8
commit 076ed9644b
7 changed files with 265 additions and 53 deletions

View File

@@ -3,7 +3,6 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//
using Microsoft.SqlTools.Hosting.Protocol.Contracts;
using Microsoft.SqlTools.ServiceLayer.Utility;
namespace Microsoft.SqlTools.ServiceLayer.AzureFunctions.Contracts
{
@@ -15,15 +14,39 @@ namespace Microsoft.SqlTools.ServiceLayer.AzureFunctions.Contracts
/// <summary>
/// Gets or sets the filePath
/// </summary>
public string filePath { get; set; }
public string FilePath { get; set; }
}
public class AzureFunction
{
/// <summary>
/// The name of the function
/// </summary>
public string Name { get; set; }
/// <summary>
/// The route of the HttpTrigger binding if one exists on this function
/// </summary>
public string? Route { get; set; }
public AzureFunction(string name, string? route)
{
this.Name = name;
this.Route = route;
}
}
/// <summary>
/// Parameters returned from a get Azure functions request
/// </summary>
public class GetAzureFunctionsResult : ResultStatus
public class GetAzureFunctionsResult
{
public string[] azureFunctions { get; set; }
public AzureFunction[] AzureFunctions { get; set; }
public GetAzureFunctionsResult(AzureFunction[] azureFunctions)
{
this.AzureFunctions = azureFunctions;
}
}
/// <summary>