/// <summary> /// Displays a list of the models in the system. /// </summary> private static void ListModels() { Console.WriteLine("Models:"); ModelReader reader = new ModelReader(); Collection <Identifier> models = reader.GetModels(); foreach (Identifier modelId in models) { Console.WriteLine(modelId.Name); } }
/// <summary> /// Get the Identifier object for the model with the given name. /// </summary> /// <param name="reader">The <see cref="ModelReader"/> to use to retrieve the model information.</param> /// <param name="modelName">Name of model to look for</param> /// <returns>The identifier if it exists, otherwise an empty Identifier</returns> public static Identifier GetModelIdentifier(ModelReader reader, string modelName) { Identifier modelId = new Identifier(); Collection<Identifier> modelIdentifiers; modelIdentifiers = reader.GetModels(); foreach (Identifier id in modelIdentifiers) { if (id.Name.Equals(modelName)) { modelId = id; break; } } return modelId; }
/// <summary> /// Get the Identifier object for the model with the given name. /// </summary> /// <param name="reader">The <see cref="ModelReader"/> to use to retrieve the model information.</param> /// <param name="modelName">Name of model to look for</param> /// <returns>The identifier if it exists, otherwise an empty Identifier</returns> public static Identifier GetModelIdentifier(ModelReader reader, string modelName) { Identifier modelId = new Identifier(); Collection <Identifier> modelIdentifiers; modelIdentifiers = reader.GetModels(); foreach (Identifier id in modelIdentifiers) { if (id.Name.Equals(modelName)) { modelId = id; break; } } return(modelId); }
/// <summary> /// Displays a list of the models in the system. /// </summary> private static void ListModels() { Console.WriteLine("Models:"); ModelReader reader = new ModelReader(); Collection<Identifier> models = reader.GetModels(); foreach (Identifier modelId in models) { Console.WriteLine(modelId.Name); } }