Skip to content
Merged
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
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using LanguageExt;
using Trax.Effect.Attributes;
using Trax.Effect.Services.ServiceTrain;
using Trax.Samples.ChatService.Trains.CreateChatRoom.Junctions;
Expand All @@ -11,7 +10,6 @@ public class CreateChatRoomTrain
: ServiceTrain<CreateChatRoomInput, CreateChatRoomOutput>,
ICreateChatRoomTrain
{
protected override async Task<Either<Exception, CreateChatRoomOutput>> RunInternal(
CreateChatRoomInput input
) => Activate(input).Chain<ValidateInputJunction>().Chain<PersistRoomJunction>().Resolve();
protected override CreateChatRoomOutput Junctions() =>
Chain<ValidateInputJunction>().Chain<PersistRoomJunction>();
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using LanguageExt;
using Trax.Effect.Attributes;
using Trax.Effect.Services.ServiceTrain;
using Trax.Samples.ChatService.Trains.GetChatHistory.Junctions;
Expand All @@ -10,7 +9,5 @@ public class GetChatHistoryTrain
: ServiceTrain<GetChatHistoryInput, GetChatHistoryOutput>,
IGetChatHistoryTrain
{
protected override async Task<Either<Exception, GetChatHistoryOutput>> RunInternal(
GetChatHistoryInput input
) => Activate(input).Chain<FetchMessagesJunction>().Resolve();
protected override GetChatHistoryOutput Junctions() => Chain<FetchMessagesJunction>();
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using LanguageExt;
using Trax.Effect.Attributes;
using Trax.Effect.Services.ServiceTrain;
using Trax.Samples.ChatService.Trains.GetChatRooms.Junctions;
Expand All @@ -10,7 +9,5 @@ public class GetChatRoomsTrain
: ServiceTrain<GetChatRoomsInput, GetChatRoomsOutput>,
IGetChatRoomsTrain
{
protected override async Task<Either<Exception, GetChatRoomsOutput>> RunInternal(
GetChatRoomsInput input
) => Activate(input).Chain<FetchRoomsJunction>().Resolve();
protected override GetChatRoomsOutput Junctions() => Chain<FetchRoomsJunction>();
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using LanguageExt;
using Trax.Effect.Attributes;
using Trax.Effect.Services.ServiceTrain;
using Trax.Samples.ChatService.Trains.JoinChatRoom.Junctions;
Expand All @@ -11,7 +10,6 @@ public class JoinChatRoomTrain
: ServiceTrain<JoinChatRoomInput, JoinChatRoomOutput>,
IJoinChatRoomTrain
{
protected override async Task<Either<Exception, JoinChatRoomOutput>> RunInternal(
JoinChatRoomInput input
) => Activate(input).Chain<ValidateJoinJunction>().Chain<AddParticipantJunction>().Resolve();
protected override JoinChatRoomOutput Junctions() =>
Chain<ValidateJoinJunction>().Chain<AddParticipantJunction>();
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,5 @@ namespace Trax.Samples.ChatService.Trains.MarkChatAsRead;
[TraxMutation(Description = "Marks a chat room as read for a user")]
public class MarkChatAsReadTrain : ServiceTrain<MarkChatAsReadInput, Unit>, IMarkChatAsReadTrain
{
protected override async Task<Either<Exception, Unit>> RunInternal(MarkChatAsReadInput input) =>
Activate(input).Chain<UpdateLastReadJunction>().Resolve();
protected override Unit Junctions() => Chain<UpdateLastReadJunction>();
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using LanguageExt;
using Trax.Effect.Attributes;
using Trax.Effect.Services.ServiceTrain;
using Trax.Samples.ChatService.Trains.SendMessage.Junctions;
Expand All @@ -9,7 +8,6 @@ namespace Trax.Samples.ChatService.Trains.SendMessage;
[TraxBroadcast]
public class SendMessageTrain : ServiceTrain<SendMessageInput, SendMessageOutput>, ISendMessageTrain
{
protected override async Task<Either<Exception, SendMessageOutput>> RunInternal(
SendMessageInput input
) => Activate(input).Chain<ValidateSenderJunction>().Chain<PersistMessageJunction>().Resolve();
protected override SendMessageOutput Junctions() =>
Chain<ValidateSenderJunction>().Chain<PersistMessageJunction>();
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,5 @@ public class DataProcessingTrain
: ServiceTrain<DataProcessingPipelineInput, Unit>,
IDataProcessingTrain
{
protected override async Task<Either<Exception, Unit>> RunInternal(
DataProcessingPipelineInput input
) => Activate(input).Chain<ExecuteDataProcessingJunction>().Resolve();
protected override Unit Junctions() => Chain<ExecuteDataProcessingJunction>();
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,5 @@ namespace Trax.Samples.Flowthru.Spaceflights.Trains.DataScience;
/// </summary>
public class DataScienceTrain : ServiceTrain<DataSciencePipelineInput, Unit>, IDataScienceTrain
{
protected override async Task<Either<Exception, Unit>> RunInternal(
DataSciencePipelineInput input
) => Activate(input).Chain<ExecuteDataScienceJunction>().Resolve();
protected override Unit Junctions() => Chain<ExecuteDataScienceJunction>();
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,5 @@ namespace Trax.Samples.Flowthru.Spaceflights.Trains.Reporting;
/// </summary>
public class ReportingTrain : ServiceTrain<ReportingPipelineInput, Unit>, IReportingTrain
{
protected override async Task<Either<Exception, Unit>> RunInternal(
ReportingPipelineInput input
) => Activate(input).Chain<ExecuteReportingJunction>().Resolve();
protected override Unit Junctions() => Chain<ExecuteReportingJunction>();
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using LanguageExt;
using Trax.Effect.Attributes;
using Trax.Effect.Services.ServiceTrain;
using Trax.Samples.EnergyHub.Trains.BatteryStorage.ManageBatteryStorage.Junctions;
Expand All @@ -20,11 +19,6 @@ public class ManageBatteryStorageTrain
: ServiceTrain<ManageBatteryStorageInput, ManageBatteryStorageOutput>,
IManageBatteryStorageTrain
{
protected override async Task<Either<Exception, ManageBatteryStorageOutput>> RunInternal(
ManageBatteryStorageInput input
) =>
Activate(input)
.Chain<ReadBatteryStateJunction>()
.Chain<OptimizeChargeLevelJunction>()
.Resolve();
protected override ManageBatteryStorageOutput Junctions() =>
Chain<ReadBatteryStateJunction>().Chain<OptimizeChargeLevelJunction>();
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using LanguageExt;
using Trax.Effect.Attributes;
using Trax.Effect.Services.ServiceTrain;
using Trax.Samples.EnergyHub.Trains.ChargingSessions.ProcessChargingSession.Junctions;
Expand All @@ -16,11 +15,6 @@ public class ProcessChargingSessionTrain
: ServiceTrain<ProcessChargingSessionInput, ProcessChargingSessionOutput>,
IProcessChargingSessionTrain
{
protected override async Task<Either<Exception, ProcessChargingSessionOutput>> RunInternal(
ProcessChargingSessionInput input
) =>
Activate(input)
.Chain<CollectSessionDataJunction>()
.Chain<CalculateBillingJunction>()
.Resolve();
protected override ProcessChargingSessionOutput Junctions() =>
Chain<CollectSessionDataJunction>().Chain<CalculateBillingJunction>();
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using LanguageExt;
using Trax.Effect.Attributes;
using Trax.Effect.Services.ServiceTrain;
using Trax.Samples.EnergyHub.Trains.GridTrading.TradeGridEnergy.Junctions;
Expand All @@ -20,7 +19,6 @@ public class TradeGridEnergyTrain
: ServiceTrain<TradeGridEnergyInput, TradeGridEnergyOutput>,
ITradeGridEnergyTrain
{
protected override async Task<Either<Exception, TradeGridEnergyOutput>> RunInternal(
TradeGridEnergyInput input
) => Activate(input).Chain<CalculateExcessJunction>().Chain<SubmitToUbossJunction>().Resolve();
protected override TradeGridEnergyOutput Junctions() =>
Chain<CalculateExcessJunction>().Chain<SubmitToUbossJunction>();
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,6 @@ public class OptimizeMicrogridTrain
: ServiceTrain<OptimizeMicrogridInput, Unit>,
IOptimizeMicrogridTrain
{
protected override async Task<Either<Exception, Unit>> RunInternal(
OptimizeMicrogridInput input
) =>
Activate(input)
.Chain<GatherEnergyMetricsJunction>()
.Chain<ApplyDistributionJunction>()
.Resolve();
protected override Unit Junctions() =>
Chain<GatherEnergyMetricsJunction>().Chain<ApplyDistributionJunction>();
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using LanguageExt;
using Trax.Effect.Attributes;
using Trax.Effect.Services.ServiceTrain;
using Trax.Samples.EnergyHub.Trains.SolarProduction.MonitorSolarProduction.Junctions;
Expand All @@ -15,11 +14,6 @@ public class MonitorSolarProductionTrain
: ServiceTrain<MonitorSolarProductionInput, MonitorSolarProductionOutput>,
IMonitorSolarProductionTrain
{
protected override async Task<Either<Exception, MonitorSolarProductionOutput>> RunInternal(
MonitorSolarProductionInput input
) =>
Activate(input)
.Chain<ReadSolarSensorsJunction>()
.Chain<CalculateOutputJunction>()
.Resolve();
protected override MonitorSolarProductionOutput Junctions() =>
Chain<ReadSolarSensorsJunction>().Chain<CalculateOutputJunction>();
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using LanguageExt;
using Trax.Effect.Attributes;
using Trax.Effect.Services.ServiceTrain;
using Trax.Samples.EnergyHub.Trains.Sustainability.GenerateSustainabilityReport.Junctions;
Expand All @@ -19,8 +18,6 @@ public class GenerateSustainabilityReportTrain
: ServiceTrain<GenerateSustainabilityReportInput, GenerateSustainabilityReportOutput>,
IGenerateSustainabilityReportTrain
{
protected override async Task<
Either<Exception, GenerateSustainabilityReportOutput>
> RunInternal(GenerateSustainabilityReportInput input) =>
Activate(input).Chain<AggregateMetricsJunction>().Chain<PublishReportJunction>().Resolve();
protected override GenerateSustainabilityReportOutput Junctions() =>
Chain<AggregateMetricsJunction>().Chain<PublishReportJunction>();
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using LanguageExt;
using Trax.Effect.Attributes;
using Trax.Effect.Services.ServiceTrain;
using Trax.Samples.ContentShield.Trains.ContentReview.LookupModerationResult.Junctions;
Expand All @@ -15,7 +14,5 @@ public class LookupModerationResultTrain
: ServiceTrain<LookupModerationResultInput, ModerationResult>,
ILookupModerationResultTrain
{
protected override async Task<Either<Exception, ModerationResult>> RunInternal(
LookupModerationResultInput input
) => Activate(input).Chain<FetchModerationResultJunction>().Resolve();
protected override ModerationResult Junctions() => Chain<FetchModerationResultJunction>();
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using LanguageExt;
using Trax.Effect.Attributes;
using Trax.Effect.Services.ServiceTrain;
using Trax.Samples.ContentShield.Trains.ContentReview.ReviewContent.Junctions;
Expand All @@ -23,12 +22,6 @@ public class ReviewContentTrain
: ServiceTrain<ReviewContentInput, ReviewContentOutput>,
IReviewContentTrain
{
protected override async Task<Either<Exception, ReviewContentOutput>> RunInternal(
ReviewContentInput input
) =>
Activate(input)
.Chain<ClassifyContentJunction>()
.Chain<ScoreContentJunction>()
.Chain<FlagContentJunction>()
.Resolve();
protected override ReviewContentOutput Junctions() =>
Chain<ClassifyContentJunction>().Chain<ScoreContentJunction>().Chain<FlagContentJunction>();
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using LanguageExt;
using Trax.Effect.Attributes;
using Trax.Effect.Services.ServiceTrain;
using Trax.Samples.ContentShield.Trains.Notices.SendViolationNotice.Junctions;
Expand All @@ -22,7 +21,6 @@ public class SendViolationNoticeTrain
: ServiceTrain<SendViolationNoticeInput, SendViolationNoticeOutput>,
ISendViolationNoticeTrain
{
protected override async Task<Either<Exception, SendViolationNoticeOutput>> RunInternal(
SendViolationNoticeInput input
) => Activate(input).Chain<ComposeNoticeJunction>().Chain<DeliverNoticeJunction>().Resolve();
protected override SendViolationNoticeOutput Junctions() =>
Chain<ComposeNoticeJunction>().Chain<DeliverNoticeJunction>();
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using LanguageExt;
using Trax.Effect.Attributes;
using Trax.Effect.Services.ServiceTrain;
using Trax.Samples.ContentShield.Trains.Reports.GenerateModerationReport.Junctions;
Expand All @@ -16,7 +15,6 @@ public class GenerateModerationReportTrain
: ServiceTrain<GenerateModerationReportInput, GenerateModerationReportOutput>,
IGenerateModerationReportTrain
{
protected override async Task<Either<Exception, GenerateModerationReportOutput>> RunInternal(
GenerateModerationReportInput input
) => Activate(input).Chain<AggregateMetricsJunction>().Chain<FormatReportJunction>().Resolve();
protected override GenerateModerationReportOutput Junctions() =>
Chain<AggregateMetricsJunction>().Chain<FormatReportJunction>();
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using LanguageExt;
using Trax.Effect.Services.ServiceTrain;
using Trax.Samples.GameServer.Trains.Leaderboard.GenerateSeasonReport.Junctions;

Expand All @@ -12,7 +11,6 @@ public class GenerateSeasonReportTrain
: ServiceTrain<GenerateSeasonReportInput, SeasonReportOutput>,
IGenerateSeasonReportTrain
{
protected override async Task<Either<Exception, SeasonReportOutput>> RunInternal(
GenerateSeasonReportInput input
) => Activate(input).Chain<CompileStatsJunction>().Chain<FormatReportJunction>().Resolve();
protected override SeasonReportOutput Junctions() =>
Chain<CompileStatsJunction>().Chain<FormatReportJunction>();
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using LanguageExt;
using Trax.Effect.Attributes;
using Trax.Effect.Services.ServiceTrain;
using Trax.Samples.GameServer.Trains.Leaderboard.RecalculateLeaderboard.Junctions;
Expand All @@ -19,7 +18,6 @@ public class RecalculateLeaderboardTrain
: ServiceTrain<RecalculateLeaderboardInput, RecalculateLeaderboardOutput>,
IRecalculateLeaderboardTrain
{
protected override async Task<Either<Exception, RecalculateLeaderboardOutput>> RunInternal(
RecalculateLeaderboardInput input
) => Activate(input).Chain<AggregateScoresJunction>().Chain<RankPlayersJunction>().Resolve();
protected override RecalculateLeaderboardOutput Junctions() =>
Chain<AggregateScoresJunction>().Chain<RankPlayersJunction>();
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,5 @@ public class CorruptedDataRepairTrain
: ServiceTrain<CorruptedDataRepairInput, Unit>,
ICorruptedDataRepairTrain
{
protected override async Task<Either<Exception, Unit>> RunInternal(
CorruptedDataRepairInput input
) => Activate(input).Chain<AttemptRepairJunction>().Resolve();
protected override Unit Junctions() => Chain<AttemptRepairJunction>();
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ public class DetectCheatPatternTrain
: ServiceTrain<DetectCheatPatternInput, Unit>,
IDetectCheatPatternTrain
{
protected override async Task<Either<Exception, Unit>> RunInternal(
DetectCheatPatternInput input
) => Activate(input).Chain<AnalyzePatternJunction>().Chain<FlagPlayerJunction>().Resolve();
protected override Unit Junctions() =>
Chain<AnalyzePatternJunction>().Chain<FlagPlayerJunction>();
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using LanguageExt;
using Trax.Effect.Attributes;
using Trax.Effect.Services.ServiceTrain;
using Trax.Samples.GameServer.Trains.Matches.ProcessMatchResult.Junctions;
Expand All @@ -24,12 +23,8 @@ public class ProcessMatchResultTrain
: ServiceTrain<ProcessMatchResultInput, ProcessMatchResultOutput>,
IProcessMatchResultTrain
{
protected override async Task<Either<Exception, ProcessMatchResultOutput>> RunInternal(
ProcessMatchResultInput input
) =>
Activate(input)
.Chain<ValidateMatchJunction>()
protected override ProcessMatchResultOutput Junctions() =>
Chain<ValidateMatchJunction>()
.Chain<UpdatePlayerStatsJunction>()
.Chain<CheckForAnomaliesJunction>()
.Resolve();
.Chain<CheckForAnomaliesJunction>();
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ public class BanPlayerTrain(ILogger<BanPlayerTrain> logger)
: ServiceTrain<BanPlayerInput, Unit>,
IBanPlayerTrain
{
protected override async Task<Either<Exception, Unit>> RunInternal(BanPlayerInput input) =>
Activate(input).Chain<ApplyBanJunction>().Resolve();
protected override Unit Junctions() => Chain<ApplyBanJunction>();

protected override Task OnCompleted(Metadata metadata, CancellationToken ct)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ public class CleanupInactivePlayersTrain
: ServiceTrain<CleanupInactivePlayersInput, Unit>,
ICleanupInactivePlayersTrain
{
protected override async Task<Either<Exception, Unit>> RunInternal(
CleanupInactivePlayersInput input
) =>
Activate(input).Chain<IdentifyInactiveJunction>().Chain<ArchivePlayersJunction>().Resolve();
protected override Unit Junctions() =>
Chain<IdentifyInactiveJunction>().Chain<ArchivePlayersJunction>();
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using LanguageExt;
using Trax.Effect.Attributes;
using Trax.Effect.Services.ServiceTrain;
using Trax.Samples.GameServer.Trains.Players.LookupPlayer.Junctions;
Expand All @@ -13,7 +12,5 @@ namespace Trax.Samples.GameServer.Trains.Players.LookupPlayer;
[TraxBroadcast]
public class LookupPlayerTrain : ServiceTrain<LookupPlayerInput, PlayerProfile>, ILookupPlayerTrain
{
protected override async Task<Either<Exception, PlayerProfile>> RunInternal(
LookupPlayerInput input
) => Activate(input).Chain<FetchPlayerJunction>().Resolve();
protected override PlayerProfile Junctions() => Chain<FetchPlayerJunction>();
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ public class DistributeDailyRewardsTrain
: ServiceTrain<DistributeDailyRewardsInput, Unit>,
IDistributeDailyRewardsTrain
{
protected override async Task<Either<Exception, Unit>> RunInternal(
DistributeDailyRewardsInput input
) => Activate(input).Chain<CalculateRewardsJunction>().Chain<CreditPlayersJunction>().Resolve();
protected override Unit Junctions() =>
Chain<CalculateRewardsJunction>().Chain<CreditPlayersJunction>();
}
Loading
Loading