Skip to content

Commit

Permalink
bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
GeeksSpan committed May 17, 2023
1 parent 240d8f3 commit 217a09d
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Olive.Aws.Rekognition/Olive.Aws.Rekognition.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<Version>1.0.3</Version>
<Version>1.0.4</Version>
</PropertyGroup>

<ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions Olive.Aws.Rekognition/TextDetector.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ namespace Olive.Aws.Rekognition
public static class TextDetector
{
private static IAmazonRekognition _client;
static string BucketName => Config.Get<string>("AWS:Rekognition:S3Bucket");
private static string _region = Config.Get<string>("AWS:Rekognition:Region");
static string BucketName => Config.Get<string>("AWS:Rekognition:S3Bucket").Or(Config.Get<string>("Blob:S3:Bucket"));
private static string _region = Config.Get<string>("AWS:Rekognition:Region").Or(Config.Get<string>("Aws:Region"));

public static IAmazonRekognition Client =>
_client ?? Context.Current.GetOptionalService<IAmazonRekognition>() ?? new AmazonRekognitionClient(_region == null ? RegionEndpoint.EUWest1 : RegionEndpoint.GetBySystemName(_region));
Expand Down
6 changes: 3 additions & 3 deletions Olive.Aws.Textract/AmazonTextract.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
using Amazon.Textract;
using Amazon.Textract.Model;

namespace Olive.Aws.Rekognition
namespace Olive.Aws.Textract
{
public static class AmazonTextract
{
private static IAmazonTextract _client;
static string BucketName => Config.Get<string>("AWS:Textract:S3Bucket");
private static string _region = Config.Get<string>("AWS:Textract:Region");
static string BucketName => Config.Get<string>("AWS:Rekognition:S3Bucket").Or(Config.Get<string>("Blob:S3:Bucket"));
private static string _region = Config.Get<string>("AWS:Rekognition:Region").Or(Config.Get<string>("Aws:Region"));


public static IAmazonTextract Client => _client ?? Context.Current.GetOptionalService<IAmazonTextract>() ?? new AmazonTextractClient(_region == null ? RegionEndpoint.EUWest1 : RegionEndpoint.GetBySystemName(_region));
Expand Down
2 changes: 1 addition & 1 deletion Olive.Aws.Textract/Olive.Aws.Textract.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<Version>1.0.2</Version>
<Version>1.0.3</Version>
</PropertyGroup>

<ItemGroup>
Expand Down

0 comments on commit 217a09d

Please sign in to comment.