/[RomCheater]/trunk/RomCheater.PluginFramework/Core/PluginCollectionTypes.cs
ViewVC logotype

Diff of /trunk/RomCheater.PluginFramework/Core/PluginCollectionTypes.cs

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

--- trunk/RomCheater.PluginFramework/Core/PluginCollectionTypes.cs	2013/06/18 10:44:55	714
+++ trunk/RomCheater.PluginFramework/Core/PluginCollectionTypes.cs	2013/06/18 10:51:47	715
@@ -458,7 +458,11 @@
         #endregion
 
         #region Name/Guid Collection
-        public static List<IBasePluginDefinition> GetPluginByName(PluginNames plugin_name)
+        public static IBasePluginDefinition GetPluginByName(PluginNames plugin_name)
+        {
+            return GetPluginsByName(plugin_name).FirstOrDefault();
+        }
+        public static List<IBasePluginDefinition> GetPluginsByName(PluginNames plugin_name)
         {
             Type t = typeof(PluginCollection);
             List<Type> types = new List<Type>(t.GetNestedTypes(BindingFlags.Static | BindingFlags.NonPublic | BindingFlags.Public));
@@ -535,7 +539,7 @@
                 {
                     var sub_field = sub_type.GetField("PluginName", BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic);
                     PluginNames o = (PluginNames)sub_field.GetValue(null);
-                    var bpds = GetPluginByName(o);
+                    var bpds = GetPluginsByName(o);
                     if (bpds != null)
                     {
                         if (bpds.Count == 0)

 

  ViewVC Help
Powered by ViewVC 1.1.22