diff --git a/Screen Shot 2020-01-05 at 11.20.17 PM.png b/Screen Shot 2020-01-05 at 11.20.17 PM.png new file mode 100644 index 0000000..4848d23 Binary files /dev/null and b/Screen Shot 2020-01-05 at 11.20.17 PM.png differ diff --git a/Screen Shot 2020-01-05 at 11.21.41 PM.png b/Screen Shot 2020-01-05 at 11.21.41 PM.png new file mode 100644 index 0000000..ec691b7 Binary files /dev/null and b/Screen Shot 2020-01-05 at 11.21.41 PM.png differ diff --git a/src/Functions/SantaTalk.Functions/ApiKeyServiceClientCredentials.cs b/src/Functions/SantaTalk.Functions/ApiKeyServiceClientCredentials.cs index 51ff2ea..4e521d4 100644 --- a/src/Functions/SantaTalk.Functions/ApiKeyServiceClientCredentials.cs +++ b/src/Functions/SantaTalk.Functions/ApiKeyServiceClientCredentials.cs @@ -19,7 +19,7 @@ public override Task ProcessHttpRequestAsync(HttpRequestMessage request, Cancell { if (request == null) { - throw new ArgumentNullException("request"); + throw new ArgumentNullException(nameof(request)); } request.Headers.Add("Ocp-Apim-Subscription-Key", this.apiKey); return base.ProcessHttpRequestAsync(request, cancellationToken); diff --git a/src/Functions/SantaTalk.Functions/SantaTalk.Functions.csproj b/src/Functions/SantaTalk.Functions/SantaTalk.Functions.csproj index 6548534..c3333d9 100644 --- a/src/Functions/SantaTalk.Functions/SantaTalk.Functions.csproj +++ b/src/Functions/SantaTalk.Functions/SantaTalk.Functions.csproj @@ -15,8 +15,7 @@ PreserveNewest - PreserveNewest - Never + Always \ No newline at end of file diff --git a/src/Functions/SantaTalk.Functions/SantaTalk.Functions.sln b/src/Functions/SantaTalk.Functions/SantaTalk.Functions.sln new file mode 100644 index 0000000..cca0ce8 --- /dev/null +++ b/src/Functions/SantaTalk.Functions/SantaTalk.Functions.sln @@ -0,0 +1,23 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SantaTalk.Functions", "SantaTalk.Functions.csproj", "{8B1596A8-6091-4F56-8CC1-181879196AF1}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SantaTalk.Models", "..\SantaTalk.Models\SantaTalk.Models.csproj", "{4F60AC05-3995-43B7-827F-A47DC2764D6A}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {8B1596A8-6091-4F56-8CC1-181879196AF1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8B1596A8-6091-4F56-8CC1-181879196AF1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8B1596A8-6091-4F56-8CC1-181879196AF1}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8B1596A8-6091-4F56-8CC1-181879196AF1}.Release|Any CPU.Build.0 = Release|Any CPU + {4F60AC05-3995-43B7-827F-A47DC2764D6A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4F60AC05-3995-43B7-827F-A47DC2764D6A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4F60AC05-3995-43B7-827F-A47DC2764D6A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4F60AC05-3995-43B7-827F-A47DC2764D6A}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/src/Functions/SantaTalk.Functions/WriteSanta.cs b/src/Functions/SantaTalk.Functions/WriteSanta.cs index 1b402a6..56c7d40 100644 --- a/src/Functions/SantaTalk.Functions/WriteSanta.cs +++ b/src/Functions/SantaTalk.Functions/WriteSanta.cs @@ -17,13 +17,11 @@ namespace SantaTalk.Functions { public static class WriteSanta { - static TextAnalyticsClient textClient; - + static readonly TextAnalyticsClient textClient; static WriteSanta() { - var keys = new ApiKeyServiceClientCredentials(Environment.GetEnvironmentVariable("APIKey")); - - textClient = new TextAnalyticsClient(keys) { Endpoint = Environment.GetEnvironmentVariable("APIEndpoint") }; + var credentials = new ApiKeyServiceClientCredentials(Environment.GetEnvironmentVariable("APIKey")); + textClient = new TextAnalyticsClient(credentials) { Endpoint = Environment.GetEnvironmentVariable("APIEndpoint") }; } [FunctionName("WriteSanta")] diff --git a/src/Functions/SantaTalk.Functions/local.settings.json b/src/Functions/SantaTalk.Functions/local.settings.json new file mode 100644 index 0000000..a44dc5c --- /dev/null +++ b/src/Functions/SantaTalk.Functions/local.settings.json @@ -0,0 +1,10 @@ +{ + "IsEncrypted": false, + "Values": { + "API_HOST": "https://configuredOnAzure.azurewebsites.net", + "END_POINT": "registers", + "APIKey": "6cf27ec5e0604d5b967fdb997f476443", + "APIEndpoint": "https://westcentralus.api.cognitive.microsoft.com/", + "FUNCTIONS_WORKER_RUNTIME": "dotnet" + } +} \ No newline at end of file diff --git a/src/SantaTalk.Android/SantaTalk.Android.csproj b/src/SantaTalk.Android/SantaTalk.Android.csproj index ffcd81d..214173e 100644 --- a/src/SantaTalk.Android/SantaTalk.Android.csproj +++ b/src/SantaTalk.Android/SantaTalk.Android.csproj @@ -52,7 +52,7 @@ - + 2.4.11.982 @@ -64,7 +64,7 @@ 1.1.3 - 1.3.6 + 1.3.7 12.0.3 diff --git a/src/SantaTalk.iOS/SantaTalk.iOS.csproj b/src/SantaTalk.iOS/SantaTalk.iOS.csproj index 19ef860..19647f8 100644 --- a/src/SantaTalk.iOS/SantaTalk.iOS.csproj +++ b/src/SantaTalk.iOS/SantaTalk.iOS.csproj @@ -122,7 +122,7 @@ - + 2.4.11.982 @@ -131,7 +131,7 @@ 1.3.0 - 1.3.6 + 1.3.7 1.1.3 diff --git a/src/SantaTalk/App.xaml b/src/SantaTalk/App.xaml index 1558f4a..2385341 100644 --- a/src/SantaTalk/App.xaml +++ b/src/SantaTalk/App.xaml @@ -27,7 +27,7 @@ #190336 #ffffff #ffffff - + #301536