02.05.2014 Views

CoreandServices.book - Ocean - Schlumberger

CoreandServices.book - Ocean - Schlumberger

CoreandServices.book - Ocean - Schlumberger

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

The <strong>Ocean</strong> Module<br />

ModuleManager also provides access to ModuleTrust objects. The ModuleManager<br />

class definition is:<br />

public class ModuleManager<br />

{<br />

public ReadOnlyModuleReferenceCollection Includes { get; }<br />

public Collection ModuleTrusts { get; }<br />

public void AddModuleTrust (ModuleTrust trust);<br />

public void AddModuleTrusts(IEnumerable trusts);<br />

public void Dispose ();<br />

public T GetModule where T : IModule;<br />

public IModule GetModule(Type moduleType);<br />

public ModuleTrust GetModuleTrust(Type moduleType);<br />

public ModuleTrust GetModuleTrust(string trustName);<br />

public ModuleTrust GetModuleTrustGroup(ModuleTrust trust);<br />

}<br />

You can find an individual module loaded into <strong>Ocean</strong> if you know its type by using the<br />

GetModule method. This will return the actual instance that has been loaded – <strong>Ocean</strong><br />

will only create a single instance of each IModule implementation. While this will give<br />

you access to the public IModule methods (Initialize, Integrate,<br />

IntegratePresentation, Disintegrate) of the module, you should never call<br />

these methods explicitly. The ModuleManager will call these methods as required.<br />

Product family developers may require access to information on modules that have been<br />

loaded into the system. This can be done through the ModuleManager.Includes<br />

property. The Includes property returns a read-only copy of the ModuleManager set of<br />

included module references. The references can be used to get information on modules<br />

<strong>Schlumberger</strong> Private<br />

<strong>Ocean</strong> Core 3-23

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!