diff --git a/src/Azure.Functions.PowerShell.Worker.Messaging/Azure.Functions.PowerShell.Worker.Messaging.csproj b/src/Azure.Functions.PowerShell.Worker.Messaging/Azure.Functions.PowerShell.Worker.Messaging.csproj
deleted file mode 100644
index 28b5a7ad..00000000
--- a/src/Azure.Functions.PowerShell.Worker.Messaging/Azure.Functions.PowerShell.Worker.Messaging.csproj
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
-
- netstandard2.0
-
-
-
-
-
-
-
-
diff --git a/src/Azure.Functions.PowerShell.Worker/Azure.Functions.PowerShell.Worker.csproj b/src/Azure.Functions.PowerShell.Worker/Azure.Functions.PowerShell.Worker.csproj
index d27e5a4c..841e1989 100644
--- a/src/Azure.Functions.PowerShell.Worker/Azure.Functions.PowerShell.Worker.csproj
+++ b/src/Azure.Functions.PowerShell.Worker/Azure.Functions.PowerShell.Worker.csproj
@@ -3,17 +3,26 @@
Exe
netcoreapp2.1
-
-
-
-
+ Azure Function PowerShell Language Worker
+ Microsoft Corporation
+ (c) Microsoft Corporation. All rights reserved.
+
+ Latest
+ true
+ false
+ true
+ true
+ en-US
+
+
+
@@ -22,8 +31,4 @@
-
- latest
-
-
diff --git a/src/Azure.Functions.PowerShell.Worker/Function/FunctionInfo.cs b/src/Azure.Functions.PowerShell.Worker/Function/FunctionInfo.cs
index 14a872d4..e5e21808 100644
--- a/src/Azure.Functions.PowerShell.Worker/Function/FunctionInfo.cs
+++ b/src/Azure.Functions.PowerShell.Worker/Function/FunctionInfo.cs
@@ -8,7 +8,7 @@
namespace Microsoft.Azure.Functions.PowerShellWorker
{
- public class FunctionInfo
+ internal class FunctionInfo
{
public string Directory {get; set;}
public string HttpOutputName {get; set;}
diff --git a/src/Azure.Functions.PowerShell.Worker/Function/FunctionLoader.cs b/src/Azure.Functions.PowerShell.Worker/Function/FunctionLoader.cs
index f45bbf50..64dc6a5b 100644
--- a/src/Azure.Functions.PowerShell.Worker/Function/FunctionLoader.cs
+++ b/src/Azure.Functions.PowerShell.Worker/Function/FunctionLoader.cs
@@ -8,7 +8,7 @@
namespace Microsoft.Azure.Functions.PowerShellWorker
{
- public class FunctionLoader
+ internal class FunctionLoader
{
readonly MapField _LoadedFunctions = new MapField();
@@ -30,7 +30,7 @@ public void Load(string functionId, RpcFunctionMetadata metadata)
}
}
- public class Function
+ internal class Function
{
public string EntryPoint {get; internal set;}
public FunctionInfo Info {get; internal set;}
diff --git a/src/Azure.Functions.PowerShell.Worker/Http/HttpRequestContext.cs b/src/Azure.Functions.PowerShell.Worker/Http/HttpRequestContext.cs
index 0a1a7e02..2d6e7c4a 100644
--- a/src/Azure.Functions.PowerShell.Worker/Http/HttpRequestContext.cs
+++ b/src/Azure.Functions.PowerShell.Worker/Http/HttpRequestContext.cs
@@ -8,16 +8,49 @@
namespace Microsoft.Azure.Functions.PowerShellWorker
{
+ ///
+ /// Custom type represent the context of the in-coming Http request.
+ ///
public class HttpRequestContext : IEquatable
{
- public object Body {get; set;}
- public MapField Headers {get; set;}
- public string Method {get; set;}
- public string Url {get; set;}
- public MapField Params {get; set;}
- public MapField Query {get; set;}
- public object RawBody {get; set;}
+ ///
+ /// Gets the Body of the Http request.
+ ///
+ public object Body { get; internal set; }
+ ///
+ /// Gets the Headers of the Http request.
+ ///
+ public MapField Headers { get; internal set; }
+
+ ///
+ /// Gets the Method of the Http request.
+ ///
+ public string Method { get; internal set; }
+
+ ///
+ /// Gets the Url of the Http request.
+ ///
+ public string Url { get; internal set; }
+
+ ///
+ /// Gets the Params of the Http request.
+ ///
+ public MapField Params { get; internal set; }
+
+ ///
+ /// Gets the Query of the Http request.
+ ///
+ public MapField Query { get; internal set; }
+
+ ///
+ /// Gets the RawBody of the Http request.
+ ///
+ public object RawBody { get; internal set; }
+
+ ///
+ /// Compare with another HttpRequestContext object.
+ ///
public bool Equals(HttpRequestContext other)
{
return Method == other.Method
diff --git a/src/Azure.Functions.PowerShell.Worker/Http/HttpResponseContext.cs b/src/Azure.Functions.PowerShell.Worker/Http/HttpResponseContext.cs
index b76ba180..c95fe263 100644
--- a/src/Azure.Functions.PowerShell.Worker/Http/HttpResponseContext.cs
+++ b/src/Azure.Functions.PowerShell.Worker/Http/HttpResponseContext.cs
@@ -8,14 +8,39 @@
namespace Microsoft.Azure.Functions.PowerShellWorker
{
+ ///
+ /// Custom type represent the context of the Http response.
+ ///
public class HttpResponseContext : IEquatable
{
- public object Body {get; set;}
- public string ContentType {get; set;} = "text/plain";
- public bool EnableContentNegotiation {get; set;} = false;
- public Hashtable Headers {get; set;} = new Hashtable();
- public string StatusCode {get; set;} = "200";
+ ///
+ /// Gets or sets the Body of the Http response.
+ ///
+ public object Body { get; set; }
+ ///
+ /// Gets or sets the ContentType of the Http response.
+ ///
+ public string ContentType { get; set; } = "text/plain";
+
+ ///
+ /// Gets or sets the EnableContentNegotiation of the Http response.
+ ///
+ public bool EnableContentNegotiation { get; set; } = false;
+
+ ///
+ /// Gets or sets the Headers of the Http response.
+ ///
+ public Hashtable Headers { get; set; } = new Hashtable();
+
+ ///
+ /// Gets or sets the StatusCode of the Http response.
+ ///
+ public string StatusCode { get; set; } = "200";
+
+ ///
+ /// Compare with another HttpResponseContext object.
+ ///
public bool Equals(HttpResponseContext other)
{
bool sameHeaders = true;
diff --git a/src/Azure.Functions.PowerShell.Worker.Messaging/FunctionMessagingClient.cs b/src/Azure.Functions.PowerShell.Worker/Messaging/FunctionMessagingClient.cs
similarity index 96%
rename from src/Azure.Functions.PowerShell.Worker.Messaging/FunctionMessagingClient.cs
rename to src/Azure.Functions.PowerShell.Worker/Messaging/FunctionMessagingClient.cs
index 7f91dc41..c99dfe7d 100644
--- a/src/Azure.Functions.PowerShell.Worker.Messaging/FunctionMessagingClient.cs
+++ b/src/Azure.Functions.PowerShell.Worker/Messaging/FunctionMessagingClient.cs
@@ -12,7 +12,7 @@
namespace Microsoft.Azure.Functions.PowerShellWorker.Messaging
{
- public class FunctionMessagingClient : IDisposable
+ internal class FunctionMessagingClient : IDisposable
{
SemaphoreSlim _writeStreamHandle = new SemaphoreSlim(1, 1);
AsyncDuplexStreamingCall _call;
diff --git a/src/Azure.Functions.PowerShell.Worker.Messaging/FunctionRpc.cs b/src/Azure.Functions.PowerShell.Worker/Messaging/FunctionRpc.cs
similarity index 100%
rename from src/Azure.Functions.PowerShell.Worker.Messaging/FunctionRpc.cs
rename to src/Azure.Functions.PowerShell.Worker/Messaging/FunctionRpc.cs
diff --git a/src/Azure.Functions.PowerShell.Worker.Messaging/FunctionRpcGrpc.cs b/src/Azure.Functions.PowerShell.Worker/Messaging/FunctionRpcGrpc.cs
similarity index 100%
rename from src/Azure.Functions.PowerShell.Worker.Messaging/FunctionRpcGrpc.cs
rename to src/Azure.Functions.PowerShell.Worker/Messaging/FunctionRpcGrpc.cs
diff --git a/src/Azure.Functions.PowerShell.Worker/Utility/RpcLogger.cs b/src/Azure.Functions.PowerShell.Worker/Messaging/RpcLogger.cs
similarity index 98%
rename from src/Azure.Functions.PowerShell.Worker/Utility/RpcLogger.cs
rename to src/Azure.Functions.PowerShell.Worker/Messaging/RpcLogger.cs
index aeaef298..3ebac8fb 100644
--- a/src/Azure.Functions.PowerShell.Worker/Utility/RpcLogger.cs
+++ b/src/Azure.Functions.PowerShell.Worker/Messaging/RpcLogger.cs
@@ -11,7 +11,7 @@
namespace Microsoft.Azure.Functions.PowerShellWorker.Utility
{
- public class RpcLogger : ILogger
+ internal class RpcLogger : ILogger
{
FunctionMessagingClient _client;
string _invocationId = "";
diff --git a/src/Azure.Functions.PowerShell.Worker/PowerShell/PowerShellWorkerExtensions.cs b/src/Azure.Functions.PowerShell.Worker/PowerShell/PowerShellWorkerExtensions.cs
index 294f8f78..a64c9e15 100644
--- a/src/Azure.Functions.PowerShell.Worker/PowerShell/PowerShellWorkerExtensions.cs
+++ b/src/Azure.Functions.PowerShell.Worker/PowerShell/PowerShellWorkerExtensions.cs
@@ -15,7 +15,7 @@ namespace Microsoft.Azure.Functions.PowerShellWorker.PowerShell
{
using System.Management.Automation;
- public static class PowerShellWorkerExtensions
+ internal static class PowerShellWorkerExtensions
{
// This script handles when the user adds something to the pipeline.
// It logs the item that comes and stores it as the $return out binding.
diff --git a/src/Azure.Functions.PowerShell.Worker/Requests/HandleFunctionLoadRequest.cs b/src/Azure.Functions.PowerShell.Worker/Requests/HandleFunctionLoadRequest.cs
index 8b388f16..daf96e88 100644
--- a/src/Azure.Functions.PowerShell.Worker/Requests/HandleFunctionLoadRequest.cs
+++ b/src/Azure.Functions.PowerShell.Worker/Requests/HandleFunctionLoadRequest.cs
@@ -12,7 +12,7 @@ namespace Microsoft.Azure.Functions.PowerShellWorker.Requests
{
using System.Management.Automation;
- public static class HandleFunctionLoadRequest
+ internal static class HandleFunctionLoadRequest
{
public static StreamingMessage Invoke(
PowerShell powershell,
diff --git a/src/Azure.Functions.PowerShell.Worker/Requests/HandleInvocationRequest.cs b/src/Azure.Functions.PowerShell.Worker/Requests/HandleInvocationRequest.cs
index 505f4969..4988e469 100644
--- a/src/Azure.Functions.PowerShell.Worker/Requests/HandleInvocationRequest.cs
+++ b/src/Azure.Functions.PowerShell.Worker/Requests/HandleInvocationRequest.cs
@@ -15,7 +15,7 @@ namespace Microsoft.Azure.Functions.PowerShellWorker.Requests
{
using System.Management.Automation;
- public static class HandleInvocationRequest
+ internal static class HandleInvocationRequest
{
public static StreamingMessage Invoke(
PowerShell powershell,
diff --git a/src/Azure.Functions.PowerShell.Worker/Requests/HandleWorkerInitRequest.cs b/src/Azure.Functions.PowerShell.Worker/Requests/HandleWorkerInitRequest.cs
index 1fef511d..0bca2f8a 100644
--- a/src/Azure.Functions.PowerShell.Worker/Requests/HandleWorkerInitRequest.cs
+++ b/src/Azure.Functions.PowerShell.Worker/Requests/HandleWorkerInitRequest.cs
@@ -10,7 +10,7 @@ namespace Microsoft.Azure.Functions.PowerShellWorker.Requests
{
using System.Management.Automation;
- public static class HandleWorkerInitRequest
+ internal static class HandleWorkerInitRequest
{
public static StreamingMessage Invoke(
PowerShell powershell,
diff --git a/src/Azure.Functions.PowerShell.Worker/Utility/TypeExtensions.cs b/src/Azure.Functions.PowerShell.Worker/Utility/TypeExtensions.cs
index 5fd0f565..01cdcbc3 100644
--- a/src/Azure.Functions.PowerShell.Worker/Utility/TypeExtensions.cs
+++ b/src/Azure.Functions.PowerShell.Worker/Utility/TypeExtensions.cs
@@ -13,7 +13,7 @@
namespace Microsoft.Azure.Functions.PowerShellWorker.Utility
{
- public static class TypeExtensions
+ internal static class TypeExtensions
{
static HttpRequestContext ToHttpRequestContext (this RpcHttp rpcHttp)
{
diff --git a/src/Azure.Functions.PowerShell.Worker/Worker.cs b/src/Azure.Functions.PowerShell.Worker/Worker.cs
index ea8e4429..65b7f087 100644
--- a/src/Azure.Functions.PowerShell.Worker/Worker.cs
+++ b/src/Azure.Functions.PowerShell.Worker/Worker.cs
@@ -17,6 +17,9 @@
namespace Microsoft.Azure.Functions.PowerShellWorker
{
+ ///
+ /// The PowerShell language worker for Azure Function
+ ///
public static class Worker
{
static readonly FunctionLoader s_functionLoader = new FunctionLoader();
@@ -49,6 +52,9 @@ static void InitPowerShell()
s_ps.Commands.Clear();
}
+ ///
+ /// Entry point of the language worker.
+ ///
public async static Task Main(string[] args)
{
WorkerArguments arguments = null;