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.

Coordinate Systems<br />

Return Status<br />

The ReturnStatus class is used throughout the coordinate services API (both as<br />

method return values and output parameters) to report the error status of coordinate<br />

system method calls. The ReturnStatus class is defined as:<br />

public class ReturnStatus<br />

{<br />

public ReturnStatus(CODES code, System.String message,<br />

System.String detailedMessage);<br />

public virtual CODES Code;<br />

public virtual string DetailedMessage;<br />

public virtual string Message;<br />

public static readonly ReturnStatus STATUS_OK =<br />

new ReturnStatus(ReturnStatus.CODES.SUCCESS,” “, “ “);<br />

public virtual string GetFullMessage();<br />

public bool IsError();<br />

public bool IsOk();<br />

public bool IsWarning();<br />

}<br />

public enum CODES<br />

{<br />

ERROR = -1,<br />

SUCCESS,<br />

WARNING = 1<br />

}<br />

In addition to public properties like Message and Code, there are also three useful<br />

boolean methods for quickly checking the error status:<br />

public bool IsOk();<br />

public bool IsError();<br />

public bool IsWarning();<br />

4-220 <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!