-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
231 additions
and
154 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 |
---|---|---|
|
@@ -338,4 +338,5 @@ ASALocalRun/ | |
.localhistory/ | ||
|
||
# BeatPulse healthcheck temp database | ||
healthchecksdb | ||
healthchecksdb | ||
/PaxHeader |
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,52 +1,13 @@ | ||
namespace ActorSrcGen.Abstractions.Playground; | ||
using Gridsum.DataflowEx; | ||
using Microsoft.Extensions.Logging; | ||
|
||
[Actor] | ||
public partial class MyActor | ||
{ | ||
public List<int> Results { get; set; } = []; | ||
public int Counter { get; set; } | ||
namespace ActorSrcGen.Abstractions.Playground; | ||
|
||
[FirstStep("blah")] | ||
[Receiver] | ||
[NextStep(nameof(DoTask2))] | ||
[NextStep(nameof(LogMessage))] | ||
public Task<string> DoTask1(int x) | ||
{ | ||
Console.WriteLine("DoTask1"); | ||
public record Context<TRequestType, TPayloadType>(TRequestType OriginalRequest, | ||
TPayloadType Data, | ||
Stack<IDisposable> Activities); | ||
|
||
return Task.FromResult(x.ToString()); | ||
} | ||
public record PollRequest(string Id, string Name); | ||
|
||
protected async partial Task<int> ReceiveDoTask1(CancellationToken ct) | ||
{ | ||
await Task.Delay(1000, ct); | ||
|
||
return Counter++; | ||
} | ||
|
||
|
||
[Step] | ||
[NextStep(nameof(DoTask3))] | ||
public Task<string> DoTask2(string x) | ||
{ | ||
Console.WriteLine("DoTask2"); | ||
|
||
return Task.FromResult($"100{x}"); | ||
} | ||
|
||
[LastStep] | ||
public async Task<int> DoTask3(string input) | ||
{ | ||
await Console.Out.WriteLineAsync("DoTask3"); | ||
var result = int.Parse(input); | ||
Results.Add(result); | ||
|
||
return result; | ||
} | ||
|
||
[LastStep] | ||
public void LogMessage(string x) | ||
{ | ||
Console.WriteLine("Incoming Message: " + x); | ||
} | ||
} | ||
public record DataPoint(DateTimeOffset Timestamp, double Value); | ||
public record TelemetryResponse(string Id, string Name, DataPoint[] Result); |
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,74 @@ | ||
namespace ActorSrcGen.Abstractions.Playground; | ||
|
||
using TResponse = Context<PollRequest, TelemetryResponse>; | ||
using TRequest = Context<PollRequest, PollRequest>; | ||
|
||
[Actor] | ||
public partial class MyPipeline | ||
{ | ||
// decode | ||
[FirstStep("decode poll request")] | ||
[Receiver] | ||
[NextStep(nameof(SetupGapTracking))] | ||
[NextStep(nameof(LogIncomingPollRequest))] | ||
public TRequest DecodePollRequest(string x) | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
|
||
protected partial Task<string> ReceiveDecodePollRequest(CancellationToken ct) | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
|
||
[Step] | ||
[NextStep(nameof(SplitRequestBySignal))] | ||
public TRequest SetupGapTracking(TRequest x) | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
|
||
[NextStep(nameof(PollForMetrics))] | ||
public List<TRequest> SplitRequestBySignal(TRequest input) | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
|
||
[Step] | ||
[NextStep(nameof(EncodeResult))] | ||
public TResponse PollForMetrics(TRequest x) | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
|
||
// encode results | ||
|
||
[Step] | ||
[NextStep(nameof(DeliverResults))] | ||
public TResponse EncodeResult(TResponse x) | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
// deliver results | ||
|
||
[Step] | ||
[NextStep(nameof(TrackTelemetryGaps))] | ||
public TResponse DeliverResults(TResponse x) | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
// track gaps | ||
|
||
[LastStep] | ||
public List<bool> TrackTelemetryGaps(TResponse x) | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
|
||
[LastStep] | ||
public void LogIncomingPollRequest(TRequest x) | ||
{ | ||
Console.WriteLine("Incoming Poll Request: " + x.OriginalRequest.Name); | ||
} | ||
|
||
} |
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
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
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,2 @@ | ||
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation"> | ||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Gridsum/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary> |
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
Oops, something went wrong.