From 2e134a159a1dafbb9599d2a7e5322153bf48dd7b Mon Sep 17 00:00:00 2001 From: Aaron Stannard Date: Fri, 22 Dec 2023 11:17:29 -0600 Subject: [PATCH] replacing projects --- akka.analyzers.sln | 10 +++---- src/Akka.Analyzers/Akka.Analyzers.csproj | 9 ++++++ src/Akka.Analyzers/Class1.cs | 6 ++++ src/akka.analyzers.App/HelloActor.cs | 15 ---------- src/akka.analyzers.App/Program.cs | 29 ------------------- src/akka.analyzers.App/TimerActor.cs | 24 --------------- src/akka.analyzers.App/Usings.cs | 2 -- .../akka.analyzers.App.csproj | 14 --------- 8 files changed, 20 insertions(+), 89 deletions(-) create mode 100644 src/Akka.Analyzers/Akka.Analyzers.csproj create mode 100644 src/Akka.Analyzers/Class1.cs delete mode 100644 src/akka.analyzers.App/HelloActor.cs delete mode 100644 src/akka.analyzers.App/Program.cs delete mode 100644 src/akka.analyzers.App/TimerActor.cs delete mode 100644 src/akka.analyzers.App/Usings.cs delete mode 100644 src/akka.analyzers.App/akka.analyzers.App.csproj diff --git a/akka.analyzers.sln b/akka.analyzers.sln index f09141b..ed05856 100644 --- a/akka.analyzers.sln +++ b/akka.analyzers.sln @@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 17 VisualStudioVersion = 17.0.31903.59 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "akka.analyzers.App", "src\akka.analyzers.App\akka.analyzers.App.csproj", "{EDFEA62C-AF53-4056-A2F2-E37CEA04B24A}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Akka.Analyzers", "src\Akka.Analyzers\Akka.Analyzers.csproj", "{C9D5BDA8-E4AF-4A83-948B-C1010A5592CE}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -14,9 +14,9 @@ Global HideSolutionNode = FALSE EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {EDFEA62C-AF53-4056-A2F2-E37CEA04B24A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {EDFEA62C-AF53-4056-A2F2-E37CEA04B24A}.Debug|Any CPU.Build.0 = Debug|Any CPU - {EDFEA62C-AF53-4056-A2F2-E37CEA04B24A}.Release|Any CPU.ActiveCfg = Release|Any CPU - {EDFEA62C-AF53-4056-A2F2-E37CEA04B24A}.Release|Any CPU.Build.0 = Release|Any CPU + {C9D5BDA8-E4AF-4A83-948B-C1010A5592CE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C9D5BDA8-E4AF-4A83-948B-C1010A5592CE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C9D5BDA8-E4AF-4A83-948B-C1010A5592CE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C9D5BDA8-E4AF-4A83-948B-C1010A5592CE}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection EndGlobal diff --git a/src/Akka.Analyzers/Akka.Analyzers.csproj b/src/Akka.Analyzers/Akka.Analyzers.csproj new file mode 100644 index 0000000..09d6cbb --- /dev/null +++ b/src/Akka.Analyzers/Akka.Analyzers.csproj @@ -0,0 +1,9 @@ + + + + netstandard2.0 + enable + enable + + + diff --git a/src/Akka.Analyzers/Class1.cs b/src/Akka.Analyzers/Class1.cs new file mode 100644 index 0000000..635f4e7 --- /dev/null +++ b/src/Akka.Analyzers/Class1.cs @@ -0,0 +1,6 @@ +namespace Akka.Analyzers; + +public class Class1 +{ + +} diff --git a/src/akka.analyzers.App/HelloActor.cs b/src/akka.analyzers.App/HelloActor.cs deleted file mode 100644 index 177b9da..0000000 --- a/src/akka.analyzers.App/HelloActor.cs +++ /dev/null @@ -1,15 +0,0 @@ -namespace akka.analyzers.App; - -public class HelloActor : ReceiveActor -{ - private readonly ILoggingAdapter _log = Context.GetLogger(); - private int _helloCounter = 0; - - public HelloActor() - { - Receive(message => - { - _log.Info("{0} {1}", message, _helloCounter++); - }); - } -} \ No newline at end of file diff --git a/src/akka.analyzers.App/Program.cs b/src/akka.analyzers.App/Program.cs deleted file mode 100644 index 7066392..0000000 --- a/src/akka.analyzers.App/Program.cs +++ /dev/null @@ -1,29 +0,0 @@ -using Akka.Hosting; -using akka.analyzers.App; -using Microsoft.Extensions.Hosting; - -var hostBuilder = new HostBuilder(); - -hostBuilder.ConfigureServices((context, services) => -{ - services.AddAkka("MyActorSystem", (builder, sp) => - { - builder - .WithActors((system, registry, resolver) => - { - var helloActor = system.ActorOf(Props.Create(() => new HelloActor()), "hello-actor"); - registry.Register(helloActor); - }) - .WithActors((system, registry, resolver) => - { - var timerActorProps = - resolver.Props(); // uses Msft.Ext.DI to inject reference to helloActor - var timerActor = system.ActorOf(timerActorProps, "timer-actor"); - registry.Register(timerActor); - }); - }); -}); - -var host = hostBuilder.Build(); - -await host.RunAsync(); \ No newline at end of file diff --git a/src/akka.analyzers.App/TimerActor.cs b/src/akka.analyzers.App/TimerActor.cs deleted file mode 100644 index 97917ca..0000000 --- a/src/akka.analyzers.App/TimerActor.cs +++ /dev/null @@ -1,24 +0,0 @@ -using Akka.Hosting; - -namespace akka.analyzers.App; - -public class TimerActor : ReceiveActor, IWithTimers -{ - private readonly IActorRef _helloActor; - - public TimerActor(IRequiredActor helloActor) - { - _helloActor = helloActor.ActorRef; - Receive(message => - { - _helloActor.Tell(message); - }); - } - - protected override void PreStart() - { - Timers.StartPeriodicTimer("hello-key", "hello", TimeSpan.FromSeconds(1)); - } - - public ITimerScheduler Timers { get; set; } = null!; // gets set by Akka.NET -} \ No newline at end of file diff --git a/src/akka.analyzers.App/Usings.cs b/src/akka.analyzers.App/Usings.cs deleted file mode 100644 index 15066e8..0000000 --- a/src/akka.analyzers.App/Usings.cs +++ /dev/null @@ -1,2 +0,0 @@ -global using Akka.Actor; -global using Akka.Event; \ No newline at end of file diff --git a/src/akka.analyzers.App/akka.analyzers.App.csproj b/src/akka.analyzers.App/akka.analyzers.App.csproj deleted file mode 100644 index 5202d93..0000000 --- a/src/akka.analyzers.App/akka.analyzers.App.csproj +++ /dev/null @@ -1,14 +0,0 @@ - - - - Exe - net7.0 - enable - enable - - - - - - -