Skip to content

Commit

Permalink
Update version
Browse files Browse the repository at this point in the history
  • Loading branch information
Cecilia Nistal committed May 9, 2024
2 parents 5136216 + 0739353 commit 02e054a
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Apps.GoogleSheets/Apps.GoogleSheets.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<AssemblyName>Apps.GoogleSheets</AssemblyName>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Blackbird.Applications.Sdk.Common" Version="2.3.2-alpha1" />
<PackageReference Include="Blackbird.Applications.Sdk.Common" Version="2.6.0" />
<PackageReference Include="Blackbird.Applications.SDK.Extensions.FileManagement" Version="1.0.1" />
<PackageReference Include="Blackbird.Applications.Sdk.Glossaries.Utils" Version="1.0.0-alpha11" />
<PackageReference Include="Google.Apis.Drive.v3" Version="1.61.0.3155" />
Expand Down
17 changes: 14 additions & 3 deletions Apps.GoogleSheets/GoogleSheetsApplication.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,24 @@
using Blackbird.Applications.Sdk.Common.Authentication.OAuth2;
using Apps.GoogleSheets.Auth.OAuth2;
using Blackbird.Applications.Sdk.Common.Invocation;
using Blackbird.Applications.Sdk.Common.Metadata;

namespace Apps.GoogleSheets
{
public class GoogleSheetsApplication : BaseInvocable, IApplication
public class GoogleSheetsApplication : BaseInvocable, IApplication, ICategoryProvider
{
private readonly Dictionary<Type, object> _typesInstances;

public IEnumerable<ApplicationCategory> Categories
{
get =>
[
ApplicationCategory.DatabaseAndSpreadsheet, ApplicationCategory.GoogleApps,
ApplicationCategory.ProjectManagementAndProductivity
];
set { }
}

public GoogleSheetsApplication(InvocationContext invocationContext) : base(invocationContext)
{
_typesInstances = CreateTypesInstances();
Expand All @@ -24,7 +35,7 @@ public T GetInstance<T>()
{
if (!_typesInstances.TryGetValue(typeof(T), out var value))
throw new InvalidOperationException($"Instance of type '{typeof(T)}' not found");

return (T)value;
}

Expand All @@ -37,4 +48,4 @@ private Dictionary<Type, object> CreateTypesInstances()
};
}
}
}
}

0 comments on commit 02e054a

Please sign in to comment.