running linux powershell azure function with classes and it will not find types.
here's an example func script from the template with me adding a couple fields on a class
these fields show up as unknown types on my local dev environment and in the portal on azure
# POST method: $req
using namespace Microsoft.Azure.Commands.Profile.Models.Core
using namespace Microsoft.Azure.Commands.Common.Authentication.Abstractions
class Test{
hidden [PSAzureContext] $azureContext
hidden [IStorageContext] $storageContext
Test([PSAzureContext] $ctx, [IStorageContext] $storectx){
$this.azureContext = $ctx
$this.storageContext = $storectx
}
}
$requestBody = Get-Content $req -Raw | ConvertFrom-Json
$name = $requestBody.name
# GET method: each querystring parameter is its own variable
if ($req_query_name)
{
$name = $req_query_name
}
Out-File -Encoding Ascii -FilePath $res -inputObject "Hello $name"