I have class the --- core of the class skeleton is give below:-
class Pingdom
{
public static string Pingdom(List<Config> configtypes)
{
StringBuilder response = new StringBuilder();
bool status = false;
foreach(var c in configtypes)
{
switch(c.Type)
{
case ConfigTypes.Database:
{
status = PingdomDB(c.ConnectionType);
}
break;
case ConfigTypes.API:
{
status = PingdomAPI(c.Endpoint);
}
break;
}
}
if (status)
return "Ping";
else
return "No Ping";
}
-------------------------------------------------------
.......................................................
}
Now, instead of the class being static I would like for it to be in such way that I can take more of an asynchronous approach in a more robust manner.
Essentially, obtain the list of configurations but process them asynchronously.
How to go about this approach?