/// <summary> /// This is called before the start method as a way to pre-check that all of the parameters that are selected /// are in fact valid for this module. /// </summary> /// <param name="error">A string that should be assigned a detailed error</param> /// <returns>If the validation was successful or if there was a problem</returns> public bool RuntimeValidation(ref string error) { var networks = TashaRuntime.NetworkData; if (networks == null) { error = "There was no Auto Network loaded for the Passenger Mode!"; return(false); } bool found = false; foreach (var network in networks) { if (network.NetworkType == NetworkType) { AutoData = network; found = true; break; } } if (!found) { error = "We were unable to find the network data with the name \"Auto\" in this Model System!"; return(false); } FastAutoData = AutoData as INetworkCompleteData; return(true); }
/// <summary> /// This is called before the start method as a way to pre-check that all of the parameters that are selected /// are in fact valid for this module. /// </summary> /// <param name="error">A string that should be assigned a detailed error</param> /// <returns>If the validation was successful or if there was a problem</returns> public bool RuntimeValidation(ref string error) { var networks = TashaRuntime.NetworkData; if(networks == null) { error = "There was no Auto Network loaded for the Passenger Mode!"; return false; } bool found = false; foreach(var network in networks) { if(network.NetworkType == NetworkType) { AutoData = network; found = true; break; } } if(!found) { error = "We were unable to find the network data with the name \"Auto\" in this Model System!"; return false; } FastAutoData = AutoData as INetworkCompleteData; return true; }