/// <summary>
 /// Provides a new internal shapes specified at the given file location.
 /// This shape will be refined before it gets added into the library.
 /// </summary>
 /// <param name="file">The path on the current device to the file containing
 /// the shape which needs to be present in the library.</param>
 public void AddAndRefine(FileInfo file)
 {
     if (file == null)
     {
         throw new ArgumentNullException(nameof(file));
     }
     if (ProcessedMeshes.Contains(file.Name))
     {
         return;
     }
     AddDirect(Refine(file, Settings.ShapeFinalDir, Settings.ShapeFailedDir));
 }
 /// <summary>
 /// Provides a new internal shapes specified at the given file location.
 /// This shape will not be refined and gets added directly into the library.
 /// </summary>
 /// <param name="file">The path on the current device to the file containing
 /// the shape which needs to be present in the library.</param>
 public void AddDirect(FileInfo file)
 {
     if (file == null)
     {
         throw new ArgumentNullException(nameof(file));
     }
     if (ProcessedMeshes.Contains(file.Name))
     {
         return;
     }
     Add(file, ProcessedMeshes);
 }
        /// <summary>
        /// Checks how many shapes there are with the specified class name.
        /// This will only check internal shapes and not query items.
        /// </summary>
        /// <param name="className">The name of the class whose shapes to retrieve.
        /// </param>
        /// <returns>The amount of shapes which are present in the specified class.
        /// If the class is not in the database then this will return 0.</returns>
        public int ShapesInClass(string className)
        {
            if (string.IsNullOrEmpty(className))
            {
                throw new ArgumentNullException(nameof(className));
            }

            return(ProcessedMeshes.Count(
                       mesh => className.Equals(
                           mesh.Class,
                           StringComparison.InvariantCultureIgnoreCase
                           )
                       ));
        }