02.05.2014 Views

CoreandServices.book - Ocean - Schlumberger

CoreandServices.book - Ocean - Schlumberger

CoreandServices.book - Ocean - Schlumberger

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

measurements. IUnitCatalog can access units through the units’ symbol or any of its<br />

aliases. It is defined as:<br />

Units<br />

public interface IUnitCatalog<br />

{<br />

string Description { get; }<br />

string Name { get; }<br />

IEnumerable Systems { get; }<br />

}<br />

bool CanConvert (IUnit fromUnit, IUnit toUnit);<br />

IUnitSystem CreateSystem (string name, string description,<br />

IDictionary mapMeasurementUnit);<br />

IEnumerable GetBaseUnitMeasurements ();<br />

IUnitConverter<br />

GetConverter (IUnit from, IUnit to);<br />

IUnitSystem<br />

GetSystem (string name);<br />

IUnit<br />

GetUnit (string symbolOrNameOrAlias);<br />

IUnitMeasurement<br />

GetUnitMeasurement (string name);<br />

IEnumerable GetUnitMeasurements ();<br />

IEnumberable GetUnits ();<br />

Below is an example using IUnitCatalog:<br />

// Find the unit service settings.<br />

IUnitServiceSettings uss;<br />

uss = CoreSystem.GetService();<br />

// Get the catalog<br />

IUnitCatalog catalog = uss.CurrentCatalog;<br />

// Get information on catalog.<br />

string name = catalog.Name;<br />

string description = catalog.Description;<br />

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

<strong>Ocean</strong> Services 4-205

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

Saved successfully!

Ooh no, something went wrong!