-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProgram.cs
More file actions
56 lines (50 loc) · 2.61 KB
/
Copy pathProgram.cs
File metadata and controls
56 lines (50 loc) · 2.61 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
using CSharpMastery.FraudEngine.Labs;
Console.WriteLine("==================================================");
Console.WriteLine(" .NET 10 HIGH-PERFORMANCE FRAUD ENGINE LABS ");
Console.WriteLine("==================================================\n");
while (true)
{
Console.WriteLine("Select a lab to execute:");
Console.WriteLine(" 1. Zero-Allocation UTF-8 Parsing (Span<byte> / Utf8JsonReader)");
Console.WriteLine(" 2. SIMD Vectorized Batch Duplicate Scan (Vector128<T>)");
Console.WriteLine(" 3. High-Throughput Concurrent Pipeline (Channels / ValueTask)");
Console.WriteLine(" 4. Memory Allocation Profiling (Utf8Parser vs JsonSerializer)");
Console.WriteLine(" 5. Compile-Time Fast Validation (Generated Validator)");
Console.WriteLine(" 6. Live Fraud Alert Streaming (Server-Sent Events / IAsyncEnumerable)");
Console.WriteLine(" 7. Resilient External Risk API Calls (Retry & Backoff)");
Console.WriteLine(" 8. Unsafe Zero-Copy Binary Field Parsing (MemoryMarshal)");
Console.WriteLine(" 9. Lock-Free Bloom Filter Deduplication (XxHash3)");
Console.WriteLine(" 10. Native AOT & Zero-JIT Inspection");
Console.WriteLine(" 11. Distributed gRPC Network Stream Processing");
Console.WriteLine(" 12. Transactional Outbox Pattern for Distributed Messaging");
Console.WriteLine(" 13. Post-Quantum Tokenized Settlement (Stack-Allocated PQC HMAC)");
Console.WriteLine(" 0. Exit\n");
Console.Write("Enter choice [0-12]: ");
var choice = Console.ReadLine()?.Trim();
Console.WriteLine();
switch (choice)
{
case "1": ZeroAllocationParsingLab.Run(); break;
case "2": VectorizedSimdLab.Run(); break;
case "3": await ConcurrencyPipelineLab.RunAsync(); break;
case "4": MemoryProfilingLab.Run(); break;
case "5": CompileTimeValidationLab.Run(); break;
case "6": await StreamAlertsSseLab.RunAsync(); break;
case "7": await ResilientApiLab.RunAsync(); break;
case "8": UnsafeZeroCopyLab.Run(); break;
case "9": BloomFilterDeduplicationLab.Run(); break;
case "10": NativeAotVerificationLab.Run(); break;
case "11": await GrpcStreamingLab.RunAsync(); break;
case "12": await DistributedOutboxLab.RunAsync(); break;
case "13": PqcPaymentSettlementLab.Run(); break;
case "0":
Console.WriteLine("Exiting engine. Goodbye!");
return;
default:
Console.WriteLine("Invalid option. Try again.");
break;
}
Console.WriteLine("\nPress Enter to return to menu...");
Console.ReadLine();
Console.Clear();
}