topic liszter!

This commit is contained in:
Adam R Grey 2022-11-30 18:29:44 -05:00
parent 4132d46f88
commit 3fe8da9b12
2 changed files with 42 additions and 0 deletions

30
topiclister/Program.cs Normal file
View File

@ -0,0 +1,30 @@
using franz;
using System;
using System.Linq;
namespace topiclister
{
class Program
{
static void Main(string[] args)
{
Telefranz.Configure("shut up", "localhost:9092");
var listOfBs = AppDomain.CurrentDomain.GetAssemblies()
.SelectMany(domainAssembly => domainAssembly.GetTypes())
.Where(type => type.IsSubclassOf(typeof(gray_messages.message)) && !type.IsAbstract)
.ToList();
if (listOfBs != null && listOfBs.Any())
{
foreach (var b in listOfBs)
{
Console.WriteLine(b);
}
}
else
{
Console.WriteLine(":(");
}
}
}
}

View File

@ -0,0 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk">
<ItemGroup>
<ProjectReference Include="..\franz\franz.csproj" />
</ItemGroup>
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
</PropertyGroup>
</Project>