mirror of
https://github.com/opensim/opensim.git
synced 2026-08-08 18:25:33 +08:00
Added IRegionCreator interface that all ApplicationPlugins that are creators of Scenes should implement and register with the ApplicationRegistry.StackModuleInterface<>(); So that other plugins can attach to their OnNewRegionCreated event.
Made some changes to IRegistryCore and RegistryCore so they support "Stacked" interfaces.
This commit is contained in:
12
OpenSim/Framework/IRegionCreator.cs
Normal file
12
OpenSim/Framework/IRegionCreator.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace OpenSim.Framework
|
||||
{
|
||||
public delegate void NewRegionCreated(IScene scene);
|
||||
public interface IRegionCreator
|
||||
{
|
||||
event NewRegionCreated OnNewRegionCreated;
|
||||
}
|
||||
}
|
||||
@@ -4,10 +4,13 @@ using System.Text;
|
||||
|
||||
namespace OpenSim.Framework
|
||||
{
|
||||
public interface IRegistryCore
|
||||
public interface IRegistryCore
|
||||
{
|
||||
T Get<T>();
|
||||
void RegisterInterface<T>(T iface);
|
||||
bool TryGet<T>(out T iface);
|
||||
|
||||
void StackModuleInterface<M>(M mod);
|
||||
T[] RequestModuleInterfaces<T>();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -40,5 +40,15 @@ namespace OpenSim.Framework
|
||||
return (T)m_moduleInterfaces[typeof(T)];
|
||||
}
|
||||
|
||||
public void StackModuleInterface<M>(M mod)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public T[] RequestModuleInterfaces<T>()
|
||||
{
|
||||
return new T[] { default(T) };
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user