-
Notifications
You must be signed in to change notification settings - Fork 296
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #504 from arvindd/fsharp_worker_style
Fsharp worker style
- Loading branch information
Showing
14 changed files
with
536 additions
and
277 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# http://EditorConfig.org | ||
|
||
# This file is the top-most EditorConfig file | ||
root = true | ||
|
||
# All Files | ||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
indent_style = space | ||
indent_size = 2 | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
|
||
# Solution Files | ||
[*.sln] | ||
indent_style = tab | ||
|
||
# XML Project Files | ||
[*.{csproj,vbproj,vcxproj,vcxproj.filters,proj,projitems,shproj}] | ||
indent_size = 2 | ||
|
||
# Configuration Files | ||
[*.{json,xml,yml,config,props,targets,nuspec,resx,ruleset,vsixmanifest,vsct}] | ||
indent_size = 2 | ||
|
||
[*.cs] | ||
# RCS1090: Call 'ConfigureAwait(false)'. | ||
dotnet_diagnostic.RCS1090.severity = none | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false | ||
indent_size = 2 |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// Extension functions needed to extract bot configuration | ||
// | ||
// Copyright (c) 2023 Arvind Devarajan | ||
// Licensed to you under the MIT License. | ||
// See the LICENSE file in the project root for more information. | ||
|
||
namespace Microsoft.Extensions.DependencyInjection | ||
|
||
open System | ||
open Microsoft.Extensions.Options | ||
open System.Runtime.CompilerServices | ||
|
||
[<Extension>] | ||
type PollingExtensions() = | ||
[<Extension>] | ||
static member GetConfiguration<'T when 'T: not struct>(sp: IServiceProvider) = | ||
let o = sp.GetService<IOptions<'T>>() | ||
|
||
if isNull o then | ||
raise <| ArgumentNullException nameof<'T> | ||
|
||
o.Value |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,25 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<OutputType>Exe</OutputType> | ||
<TargetFramework>net6.0</TargetFramework> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<WarnOn>3390;$(WarnOn)</WarnOn> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<None Include="Files\tux.png"> | ||
<CopyToOutputDirectory>Always</CopyToOutputDirectory> | ||
</None> | ||
<Compile Include="Configuration.fs" /> | ||
<Compile Include="Program.fs" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Telegram.Bot" Version="19.0.0" /> | ||
<PackageReference Update="FSharp.Core" Version="6.0.7" /> | ||
</ItemGroup> | ||
|
||
<Project Sdk="Microsoft.NET.Sdk.Worker"> | ||
<PropertyGroup> | ||
<TargetFramework>net6.0</TargetFramework> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<Compile Include="Util.fs" /> | ||
<Compile Include="Services\Internal\IReceiverService.fs" /> | ||
<Compile Include="Services\Internal\UpdateHandlerFuncs.fs" /> | ||
<Compile Include="Services\UpdateHandler.fs" /> | ||
<Compile Include="Services\ReceiverService.fs" /> | ||
<Compile Include="Services\PollingService.fs" /> | ||
<Compile Include="Extensions.fs" /> | ||
<Compile Include="Program.fs" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<None Include="Files\tux.png"> | ||
<CopyToOutputDirectory>Always</CopyToOutputDirectory> | ||
</None> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<PackageReference Include="Microsoft.Extensions.Hosting" Version="7.0.1" /> | ||
<PackageReference Include="Microsoft.Extensions.Http" Version="7.0.0" /> | ||
<PackageReference Include="Telegram.Bot" Version="19.0.0" /> | ||
</ItemGroup> | ||
</Project> |
Oops, something went wrong.