Skip to content

Commit

Permalink
Merge pull request #116 from SyndARn/TestingSimpleActor
Browse files Browse the repository at this point in the history
DBService
  • Loading branch information
SyndARn committed May 1, 2020
2 parents cacbaa8 + f490693 commit 0cfb5ac
Show file tree
Hide file tree
Showing 36 changed files with 581 additions and 43 deletions.
42 changes: 42 additions & 0 deletions ARnActorSolution/ARnActorSolution.sln
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Actor.Base.NetStandard", "s
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Actor.Util.NetStandard", "src\NetStandard\Actor.Util.NetStandard\Actor.Util.NetStandard.csproj", "{D2B9E9B9-0918-41EB-9F4E-F6C663D05FB3}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Actor.DbService.Core", "Core\Actor.DbService.Core\Actor.DbService.Core.csproj", "{2C11B358-0FF1-4BE7-84F7-B849042A34C1}"
EndProject
Global
GlobalSection(SharedMSBuildProjectFiles) = preSolution
src\shared\Actor.Server.Shared\Actor.Server.Shared.projitems*{03a619af-9e9e-4e7d-a905-878f1452dc75}*SharedItemsImports = 4
Expand Down Expand Up @@ -1516,6 +1518,45 @@ Global
{D2B9E9B9-0918-41EB-9F4E-F6C663D05FB3}.x64|x64.Build.0 = Debug|Any CPU
{D2B9E9B9-0918-41EB-9F4E-F6C663D05FB3}.x64|x86.ActiveCfg = Debug|Any CPU
{D2B9E9B9-0918-41EB-9F4E-F6C663D05FB3}.x64|x86.Build.0 = Debug|Any CPU
{2C11B358-0FF1-4BE7-84F7-B849042A34C1}.AppVeyor|Any CPU.ActiveCfg = Debug|Any CPU
{2C11B358-0FF1-4BE7-84F7-B849042A34C1}.AppVeyor|ARM.ActiveCfg = Debug|Any CPU
{2C11B358-0FF1-4BE7-84F7-B849042A34C1}.AppVeyor|ARM.Build.0 = Debug|Any CPU
{2C11B358-0FF1-4BE7-84F7-B849042A34C1}.AppVeyor|Mixed Platforms.ActiveCfg = Debug|Any CPU
{2C11B358-0FF1-4BE7-84F7-B849042A34C1}.AppVeyor|Mixed Platforms.Build.0 = Debug|Any CPU
{2C11B358-0FF1-4BE7-84F7-B849042A34C1}.AppVeyor|x64.ActiveCfg = Debug|Any CPU
{2C11B358-0FF1-4BE7-84F7-B849042A34C1}.AppVeyor|x64.Build.0 = Debug|Any CPU
{2C11B358-0FF1-4BE7-84F7-B849042A34C1}.AppVeyor|x86.ActiveCfg = Debug|Any CPU
{2C11B358-0FF1-4BE7-84F7-B849042A34C1}.AppVeyor|x86.Build.0 = Debug|Any CPU
{2C11B358-0FF1-4BE7-84F7-B849042A34C1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2C11B358-0FF1-4BE7-84F7-B849042A34C1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2C11B358-0FF1-4BE7-84F7-B849042A34C1}.Debug|ARM.ActiveCfg = Debug|Any CPU
{2C11B358-0FF1-4BE7-84F7-B849042A34C1}.Debug|ARM.Build.0 = Debug|Any CPU
{2C11B358-0FF1-4BE7-84F7-B849042A34C1}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{2C11B358-0FF1-4BE7-84F7-B849042A34C1}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{2C11B358-0FF1-4BE7-84F7-B849042A34C1}.Debug|x64.ActiveCfg = Debug|Any CPU
{2C11B358-0FF1-4BE7-84F7-B849042A34C1}.Debug|x64.Build.0 = Debug|Any CPU
{2C11B358-0FF1-4BE7-84F7-B849042A34C1}.Debug|x86.ActiveCfg = Debug|Any CPU
{2C11B358-0FF1-4BE7-84F7-B849042A34C1}.Debug|x86.Build.0 = Debug|Any CPU
{2C11B358-0FF1-4BE7-84F7-B849042A34C1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2C11B358-0FF1-4BE7-84F7-B849042A34C1}.Release|Any CPU.Build.0 = Release|Any CPU
{2C11B358-0FF1-4BE7-84F7-B849042A34C1}.Release|ARM.ActiveCfg = Release|Any CPU
{2C11B358-0FF1-4BE7-84F7-B849042A34C1}.Release|ARM.Build.0 = Release|Any CPU
{2C11B358-0FF1-4BE7-84F7-B849042A34C1}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{2C11B358-0FF1-4BE7-84F7-B849042A34C1}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{2C11B358-0FF1-4BE7-84F7-B849042A34C1}.Release|x64.ActiveCfg = Release|Any CPU
{2C11B358-0FF1-4BE7-84F7-B849042A34C1}.Release|x64.Build.0 = Release|Any CPU
{2C11B358-0FF1-4BE7-84F7-B849042A34C1}.Release|x86.ActiveCfg = Release|Any CPU
{2C11B358-0FF1-4BE7-84F7-B849042A34C1}.Release|x86.Build.0 = Release|Any CPU
{2C11B358-0FF1-4BE7-84F7-B849042A34C1}.x64|Any CPU.ActiveCfg = Debug|Any CPU
{2C11B358-0FF1-4BE7-84F7-B849042A34C1}.x64|Any CPU.Build.0 = Debug|Any CPU
{2C11B358-0FF1-4BE7-84F7-B849042A34C1}.x64|ARM.ActiveCfg = Debug|Any CPU
{2C11B358-0FF1-4BE7-84F7-B849042A34C1}.x64|ARM.Build.0 = Debug|Any CPU
{2C11B358-0FF1-4BE7-84F7-B849042A34C1}.x64|Mixed Platforms.ActiveCfg = Debug|Any CPU
{2C11B358-0FF1-4BE7-84F7-B849042A34C1}.x64|Mixed Platforms.Build.0 = Debug|Any CPU
{2C11B358-0FF1-4BE7-84F7-B849042A34C1}.x64|x64.ActiveCfg = Debug|Any CPU
{2C11B358-0FF1-4BE7-84F7-B849042A34C1}.x64|x64.Build.0 = Debug|Any CPU
{2C11B358-0FF1-4BE7-84F7-B849042A34C1}.x64|x86.ActiveCfg = Debug|Any CPU
{2C11B358-0FF1-4BE7-84F7-B849042A34C1}.x64|x86.Build.0 = Debug|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down Expand Up @@ -1558,6 +1599,7 @@ Global
{03A619AF-9E9E-4E7D-A905-878F1452DC75} = {A93D581F-CEB2-4804-A38D-F8E6CDC8C9A1}
{FADBC51F-89BF-48FC-A5AB-710F22BB362E} = {56A5BC9C-D8DC-4E44-B64E-1C04AEDAE9FE}
{D2B9E9B9-0918-41EB-9F4E-F6C663D05FB3} = {56A5BC9C-D8DC-4E44-B64E-1C04AEDAE9FE}
{2C11B358-0FF1-4BE7-84F7-B849042A34C1} = {32E81CE6-D994-43C8-AC00-E1B80C79112E}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {C2E4FB2F-E57F-46F5-95CE-129B8F1ED980}
Expand Down
2 changes: 1 addition & 1 deletion ARnActorSolution/Actor.Service/RingActor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ public RingActor(int aTest,int aNode, IActor answer = null)
protected void Test(bool msg)
{
TestResult.start = DateTimeOffset.UtcNow ;
Console.WriteLine("Start at " + TestResult.start.ToString());
Console.WriteLine($"Start at {TestResult.start}");
for (int i = 0; i < RingTest.fTest; i++)
{
firstNode.SendMessage(new ActorTag(/*i*/));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ public ActorMain() : base()
private List<IActor> _clientList;

[System.Diagnostics.CodeAnalysis.SuppressMessage("Globalization", "CA1303:Ne pas passer de littéraux en paramètres localisés", Justification = "<En attente>")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Usage", "CA1806:Ne pas ignorer les résultats des méthodes", Justification = "<En attente>")]
private void DoBehavior(string msg)
{
Console.WriteLine(ServerStart);
Expand Down
18 changes: 12 additions & 6 deletions ARnActorSolution/Application/Actor.TestApplication/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,15 @@ class Program
{
static actMillion fMillion;

[System.Diagnostics.CodeAnalysis.SuppressMessage("Usage", "CA1806:Ne pas ignorer les résultats des méthodes", Justification = "<En attente>")]
static void Main(string[] args)
{
string lName = "";
string lPort = "";
if (args.Length > 0)
{
lName = Array.Find(args, t => t.StartsWith("-n:"));
lPort = Array.Find(args, t => t.StartsWith("-p:"));
lName = Array.Find(args, t => t.StartsWith("-n:", StringComparison.InvariantCulture));
lPort = Array.Find(args, t => t.StartsWith("-p:",StringComparison.InvariantCulture));
}
if (!string.IsNullOrEmpty(lName))
{
Expand Down Expand Up @@ -67,9 +68,14 @@ static void Main(string[] args)
{
var collect = new CollectionActor<string>();
for (int i = 0; i < 100; i++)
collect.Add(string.Format("Test {0}", i));
{
collect.Add($"Test {i}");
}
if (collect.Count() != 100)
{
throw new Exception("failed");
}
// try to enum
var enumerable = collect.ToList();
if (enumerable.Count != 100)
Expand Down Expand Up @@ -110,7 +116,7 @@ where col.Contains('1')
EchoClientActor aClient = new EchoClientActor();// new actEchoClient(aServer);
// DirectoryRequest.SendRegister("client + " + i.ToString(), aClient);
aClient.Connect("EchoServer");
aClient.SendMessage("client-" + i.ToString());
aClient.SendMessage($"client-{i}");
// aClient.Disconnect();
}
var end = DateTime.UtcNow.Ticks;
Expand Down Expand Up @@ -149,12 +155,12 @@ where col.Contains('1')
}
case "ParserTest":
{
new EchoActor(new ParserTest(), "");
EchoActor.Echo(new ParserTest(), "");
break;
}
default:
{
new EchoActor(new ActorAdminServer(), s);
EchoActor.Echo(new ActorAdminServer(), s);
break;
}
}
Expand Down
3 changes: 1 addition & 2 deletions ARnActorSolution/Application/ActorRing/frmRing.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,8 @@ private void btStartStop_Click(object sender, EventArgs e)
private void button1_Click(object sender, EventArgs e)
{
DateTimeOffset start = DateTimeOffset.UtcNow;
int qttMess = 0;
int rcvmess = 0;
int.TryParse(tbQtt.Text, out qttMess);
int.TryParse(tbQtt.Text, out int qttMess);
if (qttMess > 0)
{
catcher.SetEvent(lblDuration, new EventHandler<string>(this.EvHandler));
Expand Down
6 changes: 3 additions & 3 deletions ARnActorSolution/Application/ActorWeather/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ public MainWindow()
InitializeComponent();
}

private StateFullStringCatcher fCatcher = new StateFullStringCatcher();
private readonly StateFullStringCatcher _catcher = new StateFullStringCatcher();

private readonly RestReaderActor fReader = new RestReaderActor();

private async void Button_Click(object sender, RoutedEventArgs e)
{
fReader.SendRest(new Uri("http://api.sunrise-sunset.org/json?lat=36.7201600&lng=-4.4203400"), fCatcher); // 5 day weather forecast for Paris
var future = fCatcher.GetState();
fReader.SendRest(new Uri("http://api.sunrise-sunset.org/json?lat=36.7201600&lng=-4.4203400"), _catcher); // 5 day weather forecast for Paris
var future = _catcher.GetState();
tbText.DataContext = await future.GetResultAsync().ConfigureAwait(false);
}

Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Library</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>ARnActorKey.snk</AssemblyOriginatorKeyFile>
<RunAnalyzersDuringBuild>false</RunAnalyzersDuringBuild>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="2.9.6">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Actor.Base.Core\Actor.Base.Core.csproj" />
<ProjectReference Include="..\Actor.Util.Core\Actor.Util.Core.csproj" />
</ItemGroup>

</Project>

0 comments on commit 0cfb5ac

Please sign in to comment.