mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
REFACTOR: Final cleanup of DiscImageChef.Filters.
This commit is contained in:
@@ -42,7 +42,7 @@ namespace DiscImageChef.Filters
|
||||
public SortedDictionary<string, Filter> Filters;
|
||||
|
||||
/// <summary>
|
||||
/// Fills the list of all known filters
|
||||
/// Fills the list of all known filters
|
||||
/// </summary>
|
||||
public FiltersList()
|
||||
{
|
||||
@@ -55,13 +55,14 @@ namespace DiscImageChef.Filters
|
||||
if(!type.IsSubclassOf(typeof(Filter))) continue;
|
||||
|
||||
Filter filter = (Filter)type.GetConstructor(Type.EmptyTypes)?.Invoke(new object[] { });
|
||||
if(filter != null && !Filters.ContainsKey(filter.Name.ToLower())) Filters.Add(filter.Name.ToLower(), filter);
|
||||
if(filter != null && !Filters.ContainsKey(filter.Name.ToLower()))
|
||||
Filters.Add(filter.Name.ToLower(), filter);
|
||||
}
|
||||
catch(Exception exception) { DicConsole.ErrorWriteLine("Exception {0}", exception); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the filter that allows to read the specified path
|
||||
/// Gets the filter that allows to read the specified path
|
||||
/// </summary>
|
||||
/// <param name="path">Path</param>
|
||||
/// <returns>The filter that allows reading the specified path</returns>
|
||||
@@ -91,7 +92,7 @@ namespace DiscImageChef.Filters
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets all known filters
|
||||
/// Gets all known filters
|
||||
/// </summary>
|
||||
/// <returns>Known filters</returns>
|
||||
public SortedDictionary<string, Filter> GetFiltersList()
|
||||
|
||||
Reference in New Issue
Block a user