string[] ToStringArray(Models.IdPlane idPlane, Models.TypePlane typePlane, int nbFailures, Models.IdFailureX idFailureX, Models.IdComponentFailureX idComponentFailure) { Random rnd = new Random(); int level = rnd.Next(1, 5); String comm = commment[rnd.Next(commment.Count)]; string[] str = new string[] { idPlane.ToString(), typePlane.Id, nbFailures.ToString(), idFailureX.Id, DateTime.Now.Ticks.ToString(), level.ToString(), comm.Length.ToString(), comm }; return(str); }
void _simulator_ErrorOccured(Models.IdPlane arg1, Models.IdFailureX arg2, Models.TypePlane arg3, Models.IdComponentFailureX arg4) { var stringArr = ToStringArray(arg1, arg3, 0, arg2, arg4); error_report(stringArr); string message = $"Error : {arg2} \n On Component : {arg4} \n On Plane {arg1} \n Of Type {arg3}"; AddError(message); }