Skip to content

Commit

Permalink
Added options setup action to ServiceCollection extension.
Browse files Browse the repository at this point in the history
  • Loading branch information
erikhermansson79 committed Jan 29, 2024
1 parent bf3c164 commit e56aaac
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Files.Api/Files.Api.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
<VersionPrefix>1.0.4</VersionPrefix>
<VersionPrefix>1.0.5</VersionPrefix>
<!--<VersionSuffix>preview-$([System.DateTime]::UtcNow.Year.ToString()).$([System.DateTime]::UtcNow.DayOfYear.ToString()).$([System.DateTime]::UtcNow.Hour.ToString()).$([System.DateTime]::UtcNow.Minute.ToString())</VersionSuffix>-->
</PropertyGroup>

Expand Down
8 changes: 7 additions & 1 deletion Files.Api/FilesServiceCollectionExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,14 @@ namespace Microsoft.Extensions.DependencyInjection;
public static class FilesServiceCollectionExtensions
{
public static IServiceCollection AddFiles(
this IServiceCollection services)
this IServiceCollection services,
Action<FilesApiOptions>? configureOptions = null)
{
if (configureOptions != null)
{
services.Configure(configureOptions);
}

services.AddScoped<IFileService, FileService>();
services.AddSingleton<IDirectories, Directories>();

Expand Down

0 comments on commit e56aaac

Please sign in to comment.