Skip to content

Commit b22e85f

Browse files
committed
include referenced project dependecie
1 parent f9604aa commit b22e85f

File tree

5 files changed

+49
-12
lines changed

5 files changed

+49
-12
lines changed

.github/workflows/publish.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ jobs:
4747
run: |
4848
dotnet pack FSharp.MinimalApi/ --configuration Release --include-symbols -p:Version='${{ steps.gitversion.outputs.SemVer }}' --output ./Package
4949
dotnet pack FSharp.MinimalApi.Swagger/ --configuration Release --include-symbols -p:Version='${{ steps.gitversion.outputs.SemVer }}' --output ./Package
50+
dotnet pack FSharp.MinimalApi.Interop/ --configuration Release --include-symbols -p:Version='${{ steps.gitversion.outputs.SemVer }}' --output ./Package
5051
5152
- name: Upload lib NuGet package artifact to GitHub
5253
uses: actions/upload-artifact@v2

FSharp.MinimalApi.Interop/AsParameter.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,14 @@ namespace FSharp.MinimalApi;
55
using Microsoft.FSharp.Core;
66
using Microsoft.AspNetCore.Http;
77

8+
/// <summary>
9+
/// Creates a delegate with AsParametersAttribute
10+
/// </summary>
811
public static class AsParameters
912
{
13+
/// <summary>
14+
/// Creates delegates with AsParametersAttribute
15+
/// </summary>
1016
public static Delegate Of<TParam, TResult>(FSharpFunc<TParam, TResult> requestDelegate) =>
1117
typeof(TResult).IsGenericType &&
1218
typeof(TResult).GetGenericTypeDefinition() == typeof(Task<>)
@@ -19,6 +25,9 @@ public static Delegate Of<TParam, TResult>(FSharpFunc<TParam, TResult> requestDe
1925
? void ([AsParameters] TParam parameters) => requestDelegate.Invoke(parameters)
2026
: ([AsParameters] TParam parameters) => requestDelegate.Invoke(parameters);
2127

28+
/// <summary>
29+
/// Creates async delegates with AsParametersAttribute
30+
/// </summary>
2231
public static Delegate OfTask<TParam, TResult>(
2332
FSharpFunc<TParam, Task<TResult>> requestDelegate) =>
2433
typeof(TParam) == typeof(Unit)
Lines changed: 31 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,40 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
1+
<Project Sdk="Microsoft.NET.Sdk.Web">
22

33
<PropertyGroup>
44
<TargetFramework>net7.0</TargetFramework>
5+
<OutputType>Library</OutputType>
6+
<IsPackable>true</IsPackable>
57
<ImplicitUsings>enable</ImplicitUsings>
68
<Nullable>enable</Nullable>
79
<RootNamespace>FSharp.MinimalApi</RootNamespace>
10+
11+
<Authors>Lucas Teles - [email protected]</Authors>
12+
<Company/>
13+
<RepositoryType>GitHub</RepositoryType>
14+
<PackageProjectUrl>https://github.com/lucasteles/FSharp.MinimalApi</PackageProjectUrl>
15+
<RepositoryUrl>https://github.com/lucasteles/FSharp.MinimalApi</RepositoryUrl>
16+
<PackageLicenseExpression>MIT</PackageLicenseExpression>
17+
18+
<IncludeSymbols>true</IncludeSymbols>
19+
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
20+
<DocumentationFile>bin\$(Configuration)\$(AssemblyName).xml</DocumentationFile>
21+
<PublishRepositoryUrl>true</PublishRepositoryUrl>
22+
<EmbedUntrackedSources>true</EmbedUntrackedSources>
23+
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
24+
</PropertyGroup>
25+
26+
<PropertyGroup Condition="'$(GITHUB_ACTIONS)' == 'true'">
27+
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
28+
</PropertyGroup>
29+
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
30+
<DebugSymbols>true</DebugSymbols>
831
</PropertyGroup>
32+
933
<ItemGroup>
10-
<FrameworkReference Include="Microsoft.AspNetCore.App"/>
11-
<PackageReference Include="FSharp.Core" Version="7.0.0" />
34+
<PackageReference Include="FSharp.Core" Version="7.0"/>
35+
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1">
36+
<PrivateAssets>all</PrivateAssets>
37+
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
38+
</PackageReference>
1239
</ItemGroup>
13-
</Project>
40+
</Project>

FSharp.MinimalApi.Swagger/FSharp.MinimalApi.Swagger.fsproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
</PropertyGroup>
3636

3737
<ItemGroup>
38-
<PackageReference Update="FSharp.Core" Version="7.0.0"/>
38+
<PackageReference Update="FSharp.Core" Version="7.0"/>
3939
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0"/>
4040
<PackageReference Include="FSharp.SystemTextJson" Version="1.2.42"/>
4141
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1">
@@ -45,9 +45,9 @@
4545
</ItemGroup>
4646

4747
<ItemGroup>
48-
<Compile Include="Utils.fs" />
49-
<Compile Include="Filters.fs" />
50-
<Compile Include="Extensions.fs" />
48+
<Compile Include="Utils.fs"/>
49+
<Compile Include="Filters.fs"/>
50+
<Compile Include="Extensions.fs"/>
5151
</ItemGroup>
5252

5353
</Project>

FSharp.MinimalApi/FSharp.MinimalApi.fsproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,8 @@
2020
<EmbedUntrackedSources>true</EmbedUntrackedSources>
2121
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
2222
<PackageReadmeFile>README.md</PackageReadmeFile>
23-
<IncludeReferencedProjects>true</IncludeReferencedProjects>
2423
</PropertyGroup>
25-
24+
2625
<PropertyGroup Condition="'$(GITHUB_ACTIONS)' == 'true'">
2726
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
2827
</PropertyGroup>
@@ -31,7 +30,7 @@
3130
</PropertyGroup>
3231

3332
<ItemGroup>
34-
<PackageReference Update="FSharp.Core" Version="7.0.0"/>
33+
<PackageReference Update="FSharp.Core" Version="7.0"/>
3534
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1">
3635
<PrivateAssets>all</PrivateAssets>
3736
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
@@ -51,6 +50,7 @@
5150
</ItemGroup>
5251

5352
<ItemGroup>
54-
<ProjectReference Include="..\FSharp.MinimalApi.Interop\FSharp.MinimalApi.Interop.csproj" />
53+
<ProjectReference Include="..\FSharp.MinimalApi.Interop\FSharp.MinimalApi.Interop.csproj" />
5554
</ItemGroup>
55+
5656
</Project>

0 commit comments

Comments
 (0)