OpenSim/Region/Framework/Scenes/SceneBase.cs
/// <summary>
/// Register an interface to a region module.  This allows module methods to be called directly as
/// well as via events.  If there is already a module registered for this interface, it is not replaced
/// (is this the best behaviour?)
/// </summary>
/// <param name="mod"></param>
Register an interface to a region module.  This allows module methods to be called directly as
well as via events.  If there is already a module registered for this interface, it is not replaced
(is this the best behaviour?)
Register an interface to a region module . This allows module methods to be called directly as well as via events . If there is already a module registered for this interface it is not replaced ( is this the best behaviour? )
public void RegisterModuleInterface<M>(M mod)
        {
            List<Object> l = null;
            if (!ModuleInterfaces.TryGetValue(typeof(M), out l))
            {
                l = new List<Object>();
                ModuleInterfaces.Add(typeof(M), l);
            }
            if (l.Count > 0)
                return;
            l.Add(mod);
            if (mod is IEntityCreator)
            {
                IEntityCreator entityCreator = (IEntityCreator)mod;
                foreach (PCode pcode in entityCreator.CreationCapabilities)
                {
                    m_entityCreators[pcode] = entityCreator;
                }
            }
        }
public void RegisterModuleInterface < M > ( M mod ) { List < Object > l = null ; if ( ! ModuleInterfaces . TryGetValue ( typeof ( M ) , out l ) ) { l = new List < Object > ( ) ; ModuleInterfaces . Add ( typeof ( M ) , l ) ; } if ( l . Count > 0 ) return ; l . Add ( mod ) ; if ( mod is IEntityCreator ) { IEntityCreator entityCreator = ( IEntityCreator ) mod ; foreach ( PCode pcode in entityCreator . CreationCapabilities ) { m_entityCreators [ pcode ] = entityCreator ; } } }
Register an interface to a region module.
Register an interface to a region module .
//            m_log.DebugFormat("[SCENE BASE]: Registering interface {0}", typeof(M));
mod
M
None