Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

initial thinking about background tasks: #65

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/dflow.drawio
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<mxfile host="Electron" modified="2020-07-23T01:48:21.835Z" agent="5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) draw.io/13.4.5 Chrome/83.0.4103.122 Electron/9.1.0 Safari/537.36" etag="qJ2GeuD9mYHNcMzvxtn8" version="13.4.5" type="device"><diagram id="V8f9L8YYHBLShP1pbl8O" name="Page-1">1VhNc5swEP01HJPhw7juMf5I05l0phMf0vQmwxrUEYgRIsb59ZXsBaxQM7hxYnIy+7QS0u57u0aWN0vKb4Jk8Q8eArNcOywtb265ruPYrvrRyHaP+D4CkaAhOjXAkr4AgjaiBQ0hNxwl50zSzAQDnqYQSAMjQvCN6bbmzHxrRiJoAcuAsDb6SEMZ1+eym4E7oFGMr574OJCQyhmBPCYh3xxA3sLyZoJzuX9KyhkwHbwqLvt5t0dG640JSGWfCRFbrZ9mNrV56Fz99srUnT9eOaP9Ms+EFXhiyx2TJLO8KVPLTk0rA5HTXNZgZLigtTus3FYRhFAFFE0uZMwjnhK2aNCp4EUagt6mrazG555ztezcUeAfkHKL7CCF5AqKZcJwFEoqf+np1z5aT7iYfp6Xh8YWjVwSIW80QxQQMJLnNKjgW8rqpdOwckp5CnsEx+36uPqMR9OCUM4LEUBXLpDeREQgO/zcmjxKdcATkGKr5glgRNJncx8E6R/Vfg1D1AOS5BTCtPiylFxAK+tmTjcxlbDMyO78G1UpzPzhmiAklN1hbB8bJ/hjlBnWGW+C9uZAtZUU4wPBVvPOHqnxScoiWaaINThhpSoSB8rSZi0tbTTa2lnb86vC7akKv5Me9rUzcr8aDKk6TG/d4OI/OVVnaFz4ep2rnb2mS72H/2eQ22LQTRQJiIhUerMfdOcYmuxc+9Kyq9LaU3cpl3S9HZ7uurtOz+Z1Rhl6PWV4hC6fRnNeiz2LZ9i9e1rkF5ebNxpal5ucpDYoISh09RqW3M6ok9Hb/sR9Gp20vxvuSBoyEIPTyOVbkn+0piylAJIoAezUsVLBG0dt1ZiWFCTNSSApT0/S0Ufn4YvzKg8Xr1WOe4niMsAPzb5fmt6/E/xBX5pt2XReTRQrRvP45NZyT1bAzIwRRqNUJ0tFVhU0b6p1QAPCbnAgoWG4Jwfk9IWsduvpJGW6/u4C4U8tf94lJLywwslWfU10mNAOFh+V3ZV97Zq6e1srqXZtirnq++/faJz2jcMDEPWlbONl44XLXF3CBvOXzGnfPHzHhnPpljAxY+WM3i9WymzuVvdkbG6ovcVf</diagram></mxfile>
<mxfile host="Electron" modified="2021-05-17T00:26:14.059Z" agent="5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) draw.io/14.5.1 Chrome/89.0.4389.82 Electron/12.0.1 Safari/537.36" etag="-nqNAtc4U_zQEWmDcQsL" version="14.5.1" type="device" pages="2"><diagram id="V8f9L8YYHBLShP1pbl8O" name="DFlow Core">1VjbbqMwEP0aHltxSbLpY3Npu1JXWjUP3e6bAxPwytjImIb069eE4eLSRqQ3UikPzPFgm5lzZmJb3jzOryVJol8iAGa5dpBb3sJyXWfkulbxs4NdiUy9ixIIJQ3QqQFW9AkQtBHNaACp4aiEYIomJugLzsFXBkakFFvTbSOYuWpCQugAK5+wLnpPAxUh6th2M3ADNIxw6ekYB2JSOSOQRiQQ2xbkLS1vLoVQ5VOcz4EVwaviUr539cpovTEJXPV5IWTrzcPcprYInLO/Xs7dxf2ZMyqneSQswy+23AmJE8ubMT3tzLQSkClNVQ2Ghgta+49Vuy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fnJHt86118ur349vNyflEO9u45XXZLYJDw0w5tyqXxvNovCMT2SZMyHtGQJpjMau8lo+skgGJUTVh1zAdKU+HUhfMXcJ7Ls4DXnApXxJdEti5iQqaUULa9IwI9sMAR/hVn9Dc0WjzbQdguetCEV5MqRoAs5reN67tiMm8MS5pXmZzc1silUS61WF/nZDyxrTJuRdfMhwNxkigcsxAOjYd2Z0eQDugSOMtFPwYE8/ihPTksT3+4i6sRFhcS5OecJVsF4vvxcg7jJVBh+W3TKLtZlVl321pjw9lTibOc5AMma3mnqwWhmzmwh1isrnsG2ghvopjDPMXbbdiIvHBa/pYzA8YhewFC/R2Vo5iVUMtMZSJpbxq6X8VEDcm3tYFAQD0Qbq7pikNwzjBYbhsGw1UNgxrJ26mX1LlKwPQn5Ot02VFrqa3a5GgdKZqGStG0enydr9OCqo/AhqDsYgG27+/DNnC8e01TRVnLVE1Z3VHM2WdRdmjyOP8CeZweeWYZ+GKPz5o63aLDVl506EhlhV/nmbtmmlGSc7wjaaMr5Y3X481UHFzI+DkXiY7XqdVNSzVt+k9MNwMCsXB92K9f965lWq+mX10g1FfrhpJ3UkNrke4eK0ZqXxtY40ke+sHkMda3Q0cDrTTpVLPc/6jDGeYQ5mdZsO2ESwoeskzVmadfAdwMDcZIso/ZAWNf8jFfNfmoee78K/2T3z12Eqj69bh2bKZzlWY6rce6L7ASk+YDc28sJXjnwVXfxz3nVbmn9NPUC7nnjIt71Rf2kXOvOtSN6oPT9H8hnn0E89zTME+Y9R8Utm2Nv3mg2R8=</diagram></mxfile>
26 changes: 26 additions & 0 deletions src/DFlow.Services/BaseDFlowService.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// Copyright (C) 2020 Road to Agility
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

using System.Threading;
using System.Threading.Tasks;

namespace DFlow.Services
{
public abstract class BaseDFlowService:IDFlowService
{
public string Name { get; private set; }
public DFlowServiceStatus Status { get; private set; }
public DFlowServiceRestartingStrategy RestartingStrategy { get; private set; }

protected BaseDFlowService(string name, DFlowServiceStatus status,
DFlowServiceRestartingStrategy restartingStrategy)
{
Name = name;
Status = status;
RestartingStrategy = restartingStrategy;
}
}
}
17 changes: 17 additions & 0 deletions src/DFlow.Services/DFlow.Services.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<Configurations>Debug;Release;Release Profilling</Configurations>
<Platforms>AnyCPU</Platforms>
</PropertyGroup>

<PropertyGroup Condition=" '$(Configuration)' == 'Release Profilling' ">
<Optimize Condition=" '$(Optimize)' == '' ">true</Optimize>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="FluentMediator" Version="0.4.7" />
</ItemGroup>

</Project>
17 changes: 17 additions & 0 deletions src/DFlow.Services/IContextService.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// Copyright (C) 2020 Road to Agility
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

using System.Threading;
using System.Threading.Tasks;

namespace DFlow.Services
{
public interface IContextService
{
void AddService(IDFlowService service);
void UpdateService(IDFlowService service);
}
}
28 changes: 28 additions & 0 deletions src/DFlow.Services/IDFlowService.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// Copyright (C) 2020 Road to Agility
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

using System.Threading;
using System.Threading.Tasks;

namespace DFlow.Services
{
public enum DFlowServiceStatus
{

}

public enum DFlowServiceRestartingStrategy
{

}

public interface IDFlowService
{
string Name {get; }
DFlowServiceStatus Status { get; }
DFlowServiceRestartingStrategy RestartingStrategy { get; }
}
}
16 changes: 16 additions & 0 deletions src/DFlow.Services/ISupervizerStrategy.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// Copyright (C) 2020 Road to Agility
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

using System.Threading;
using System.Threading.Tasks;

namespace DFlow.Services
{
public interface ISupervizerStrategy
{

}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<Configurations>Debug;Release;Release Profilling</Configurations>
<Platforms>AnyCPU</Platforms>
</PropertyGroup>

<PropertyGroup Condition=" '$(Configuration)' == 'Release Profilling' ">
<Optimize Condition=" '$(Optimize)' == '' ">true</Optimize>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="FluentMediator" Version="0.4.7" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\DFlow.Domain.Events\DFlow.Domain.Events.csproj" />
</ItemGroup>

</Project>