Esempio n. 1
0
        /// <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);
            }
        }
Esempio n. 2
0
        /// <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;
        }
Esempio n. 3
0
        /// <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);
        }
Esempio n. 4
0
        /// <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);
            }
        }