mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Implemented CDRWin parser.
git-svn-id: svn://claunia.com/FileSystemIDandChk@26 17725271-3d32-4980-a8cb-9ff532f270ba
This commit is contained in:
@@ -3,6 +3,7 @@ using System.Reflection;
|
||||
using System.Collections.Generic;
|
||||
using FileSystemIDandChk.Plugins;
|
||||
using FileSystemIDandChk.PartPlugins;
|
||||
using FileSystemIDandChk.ImagePlugins;
|
||||
|
||||
namespace FileSystemIDandChk
|
||||
{
|
||||
@@ -10,11 +11,13 @@ namespace FileSystemIDandChk
|
||||
{
|
||||
public Dictionary<string, Plugin> PluginsList;
|
||||
public Dictionary<string, PartPlugin> PartPluginsList;
|
||||
public Dictionary<string, ImagePlugin> ImagePluginsList;
|
||||
|
||||
public PluginBase ()
|
||||
{
|
||||
this.PluginsList = new Dictionary<string, Plugin>();
|
||||
this.PartPluginsList = new Dictionary<string, PartPlugin>();
|
||||
this.ImagePluginsList = new Dictionary<string, ImagePlugin>();
|
||||
}
|
||||
|
||||
public void RegisterAllPlugins()
|
||||
@@ -25,6 +28,11 @@ namespace FileSystemIDandChk
|
||||
{
|
||||
try
|
||||
{
|
||||
if (type.IsSubclassOf(typeof(ImagePlugin)))
|
||||
{
|
||||
ImagePlugin plugin = (ImagePlugin)type.GetConstructor(new Type[] { typeof(PluginBase) }).Invoke(new object[] { this });
|
||||
this.RegisterImagePlugin(plugin);
|
||||
}
|
||||
if (type.IsSubclassOf(typeof(Plugin)))
|
||||
{
|
||||
Plugin plugin = (Plugin)type.GetConstructor(new Type[] { typeof(PluginBase) }).Invoke(new object[] { this });
|
||||
@@ -44,6 +52,14 @@ namespace FileSystemIDandChk
|
||||
}
|
||||
}
|
||||
|
||||
private void RegisterImagePlugin(ImagePlugin plugin)
|
||||
{
|
||||
if (!this.ImagePluginsList.ContainsKey(plugin.Name.ToLower()))
|
||||
{
|
||||
this.ImagePluginsList.Add(plugin.Name.ToLower(), plugin);
|
||||
}
|
||||
}
|
||||
|
||||
private void RegisterPlugin(Plugin plugin)
|
||||
{
|
||||
if (!this.PluginsList.ContainsKey(plugin.Name.ToLower()))
|
||||
|
||||
Reference in New Issue
Block a user