Home

Awesome

LSender

Ascetic aggregative repeater for loggers etc.

Build status NuGet package release Tests License

Build history

Copyright (c) 2016-2021 Denis Kuzmin <x-3F@outlook.com> github/3F

<sub>@</sub> ☕ 」

Features

Control vectors

LSender.Sent += (object sender, MsgArgs e) =>
{
    Assert.True(e.At("Module"));
    Assert.True(e.At("DepC", "Module"));
    Assert.True(e.At("DepC", "DepB", "Module"));
    Assert.True(e.At("DepC", "DepB", "DepA", "Module"));

    Assert.False(e.At("DepB", "DepC", "Module"));
    Assert.False(e.At("DepA", "DepB", "Module"));

    Assert.True(e.At("DepB", "DepA", "Module"));
};

Split within the domain

It can also be splitted within the domain,

<PropertyGroup>
  <LSenderExtIncSrc>..\LSender\src\</LSenderExtIncSrc>
</PropertyGroup>
<Import Project="$(LSenderExtIncSrc)src.targets" />
<ItemGroup>
  <ProjectReference Include="..\ModuleA\ClassA.csproj">
    <Aliases>ModuleA,%(Aliases)</Aliases>
  </ProjectReference>
  <ProjectReference Include="..\ModuleB\ClassB.csproj">
    <Aliases>ModuleB,%(Aliases)</Aliases>
  </ProjectReference>
</ItemGroup>
extern alias ModuleA;
extern alias ModuleB;
namespace UserCode
{
    class Program
    {
        static void Main()
        {
            // ModuleA.net.r_eg.Components.LSender
            // ModuleB.net.r_eg.Components.LSender
            // ...
        }
    }
}

Configure vectors

<PropertyGroup>
  <DefineConstants>LSR_FEATURE_S_VECTOR;$(DefineConstants)</DefineConstants>
  <LSenderExtIncSrc>..\LSender\src\</LSenderExtIncSrc>
</PropertyGroup>
<Import Project="$(LSenderExtIncSrc)src.targets" />