leave network test messages in the network so we can retrieve them later.

This commit is contained in:
Tim Young 2017-08-16 19:35:51 -05:00
parent 2e77354c05
commit 765eee55d4
2 changed files with 15 additions and 5 deletions

View File

@ -1779,7 +1779,6 @@ namespace EduNetworkBuilder
{
Console.WriteLine(one);
}
myMessages.Clear();
}
/// <summary>
@ -1791,12 +1790,11 @@ namespace EduNetworkBuilder
bool HadIssues = false;
NB.RegisterInvisibleNetwork(this);
DoAllMarkAsLinked();
myMessages.Clear(); //Erase any old messages we might have
//do dhcp request on everything.
DoAllDHCP();
NonVisualProcessPacketsOnce(); //loop until we "timeout" or all packets are done.
DumpInvisibleNetMessages();
foreach (NetTest NT in NetTests)
{
@ -1834,15 +1832,19 @@ namespace EduNetworkBuilder
break;
}
NonVisualProcessPacketsOnce(); //loop until we "timeout" or all packets are done.
DumpInvisibleNetMessages();
}
foreach (NetTest NT in NetTests)
{
//Here we test it.
bool WasComplete = NT.TestComplete(this);
Console.WriteLine(NT.GetDescription(NetTestVerbosity.full) + " done: " + WasComplete.ToString());
string tMessage = NT.GetDescription(NetTestVerbosity.full) + " done: " + WasComplete.ToString();
//Console.WriteLine(NT.GetDescription(NetTestVerbosity.full) + " done: " + WasComplete.ToString());
AddMessage(new PacketMessage("NetTest", tMessage));
}
DumpInvisibleNetMessages();
NB.UnregisterInvisibleNetwork();
if(HadIssues)

View File

@ -40,6 +40,14 @@ namespace EduNetworkBuilder
set { if (!Finished) _Status = value; }
}
public PacketMessage() { }
public PacketMessage(string Host, string OneMessage)
{
DebugMessage DM = new DebugMessage(DebugLevel.info, Host, OneMessage);
Status = OneMessage;
Messages.Add(DM);
}
public static T Clone<T>(T source)
{
if (!typeof(T).IsSerializable)