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 />

the modules already known by <strong>Ocean</strong>. The module trust is added to the module trusts<br />

already known by <strong>Ocean</strong>.<br />

private void CoreSystemStateChanged(object sender,<br />

SystemStateEventArgs e)<br />

{<br />

// Make sure we’re beyond IntegratePresentation.<br />

if (e.State.Equals(SystemState.Running))<br />

{<br />

// define the ModuleTrust name from<br />

// “Namespace.TypeName, AssemblyName”<br />

string moduleTrustName = "Slb.<strong>Ocean</strong>.Demo.MyModule, MyModule";<br />

// create a collection to hold the module<br />

ModuleReferenceCollection col = new ModuleReferenceCollection();<br />

// add the module to the collection using the module trust name<br />

// which happens to be created from the namespace,<br />

// type, and assembly<br />

col.AddModule(moduleTrustName);<br />

3-36 <strong>Ocean</strong> Application Development Framework 2008.1<br />

<strong>Schlumberger</strong> Private

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

Saved successfully!

Ooh no, something went wrong!