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.

Description Interfaces and Classes<br />

Here is an example of a class that implements IDescription. Note that attempting to<br />

set the Name to a null will throw an exception.<br />

class MyObj : IDescription<br />

{<br />

string _Name;<br />

string _ShortDescription;<br />

string _Description;<br />

...<br />

// Get/Set the name of the object<br />

public string Name<br />

{<br />

get { return _Name; }<br />

set<br />

{<br />

if (value == null)<br />

throw new DescriptionNullException;<br />

else<br />

_Name = value;<br />

}<br />

}<br />

// Get/Set the short description of the object<br />

public string ShortDescription<br />

{<br />

get { return _ShortDescription; }<br />

set { _ShortDescription = value; }<br />

}<br />

//Get/Set the detailed description of WellFromPoints<br />

public string Description<br />

{<br />

get { return _Description; }<br />

set { _Description = value; }<br />

}<br />

...<br />

}<br />

3-76 <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!