/[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

revision 714 by william, Tue Jun 18 10:44:55 2013 UTC revision 715 by william, Tue Jun 18 10:51:47 2013 UTC
# Line 458  namespace RomCheater.PluginFramework.Cor Line 458  namespace RomCheater.PluginFramework.Cor
458          #endregion          #endregion
459    
460          #region Name/Guid Collection          #region Name/Guid Collection
461          public static List<IBasePluginDefinition> GetPluginByName(PluginNames plugin_name)          public static IBasePluginDefinition GetPluginByName(PluginNames plugin_name)
462            {
463                return GetPluginsByName(plugin_name).FirstOrDefault();
464            }
465            public static List<IBasePluginDefinition> GetPluginsByName(PluginNames plugin_name)
466          {          {
467              Type t = typeof(PluginCollection);              Type t = typeof(PluginCollection);
468              List<Type> types = new List<Type>(t.GetNestedTypes(BindingFlags.Static | BindingFlags.NonPublic | BindingFlags.Public));              List<Type> types = new List<Type>(t.GetNestedTypes(BindingFlags.Static | BindingFlags.NonPublic | BindingFlags.Public));
# Line 535  namespace RomCheater.PluginFramework.Cor Line 539  namespace RomCheater.PluginFramework.Cor
539                  {                  {
540                      var sub_field = sub_type.GetField("PluginName", BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic);                      var sub_field = sub_type.GetField("PluginName", BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic);
541                      PluginNames o = (PluginNames)sub_field.GetValue(null);                      PluginNames o = (PluginNames)sub_field.GetValue(null);
542                      var bpds = GetPluginByName(o);                      var bpds = GetPluginsByName(o);
543                      if (bpds != null)                      if (bpds != null)
544                      {                      {
545                          if (bpds.Count == 0)                          if (bpds.Count == 0)

Legend:
Removed from v.714  
changed lines
  Added in v.715

  ViewVC Help
Powered by ViewVC 1.1.22