public PluginLoader(PluginInitialiserBase init, string dir)
 {
     Initialiser = init;
     initialise_plugin_dir_(dir);
 }
 public PluginLoader()
 {
     Initialiser = new PluginInitialiserBase();
     initialise_plugin_dir_(".");
 }
 public PluginLoader(PluginInitialiserBase init)
 {
     Initialiser = init;
     initialise_plugin_dir_(".");
 }
Exemple #4
0
        // This method loads the identified asset server, passing an approrpiately
        // initialized Initialise wrapper. There should to be exactly one match,
        // if not, then the first match is used.
        private IAssetServer loadAssetServer(string id, PluginInitialiserBase pi)
        {
            if (id != null && id != String.Empty)
            {
                m_log.DebugFormat("[OPENSIMBASE] Attempting to load asset server id={0}", id);

                try
                {
                    PluginLoader<IAssetServer> loader = new PluginLoader<IAssetServer>(pi);
                    loader.AddFilter(PLUGIN_ASSET_SERVER_CLIENT, new PluginProviderFilter(id));
                    loader.Load(PLUGIN_ASSET_SERVER_CLIENT);

                    if (loader.Plugins.Count > 0)
                    {
                        m_log.DebugFormat("[OPENSIMBASE] Asset server {0} loaded", id);
                        return (IAssetServer) loader.Plugins[0];
                    }
                }
                catch (Exception e)
                {
                    m_log.DebugFormat("[OPENSIMBASE] Asset server {0} not loaded ({1})", id, e.Message);
                }
            }
            return null;
        }