ARCed.Plugins.Plugin.GetEntries C# (CSharp) Method

GetEntries() public method

Generates and returns a list of entries to be added to the ARCed Registry
public GetEntries ( ) : List
return List
        public List<RegistryEntry> GetEntries()
        {
            var entries = new List<RegistryEntry>(this._data.Count);
            entries.AddRange(from kvp in this._data
                             let type = this._assembly.GetType(kvp.Value)
                             select new RegistryEntry(this, type, kvp.Key, kvp.Value));
            return entries;
        }

Usage Example

Example #1
0
 /// <summary>
 /// Loads a a plugin from file. The assembly is searched for useable content and 
 /// registered with the Editor
 /// </summary>
 /// <param name="filename"></param>
 public static void Load(string filename)
 {
     if (Host == null)
         return;
     var ext = Path.GetExtension(filename);
     if (File.Exists(filename) && (ext == ".exe" || ext == ".dll"))
     {
         var plugin = new Plugin(filename, Host);
         if (plugin.IsLoaded)
         {
             Plugins.Add(plugin);
             Entries.AddRange(plugin.GetEntries());
             return;
         }
     }
     MessageBox.Show(String.Format("Plugin \"{0}\" failed to load.", filename),
         "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
 }
All Usage Examples Of ARCed.Plugins.Plugin::GetEntries