Bloomberg API for .NET
OpenService Method (uri)
NamespacesBloomberglp.BlpapiAbstractSessionOpenService(String)
Opens the service having the specified uri.
Declaration Syntax
C#Visual BasicVisual C++
public bool OpenService(
	string uri
)
Public Function OpenService ( 
	uri As String
) As Boolean
public:
bool OpenService(
	String^ uri
)
Parameters
uri (String)
URI of the service that is to be opened.
Return Value
Boolean
true if service was successfully opened false otherwise.
Remarks

The specified uri must must contain a fully qualified service name. That is it must be of the form "//[namespace]/[service-name]". Note that this operation is a blocking operation which may require communication to server-side services. Execution may be be blocked for an undetermined amount of time. If blocking is not desired, then use OpenServiceAsync() instead. Also note that if the service is already opened by this session, the request will succeed immediately.

This method returns true is the service was open successfully false otherwise. Once the request has completed, a SERVICE_STATUS event will be generated indicating the result of the request. If this is an asynchronous Session then this Event may be processed by the registered EventHandler before OpenService() has returned.

Exceptions
ExceptionCondition
InvalidOperationException The session is not started.
ThreadInterruptedException The current thread is interrupted while it is waiting for service.
See Also
OpenService(String)

Assembly: Bloomberglp.Blpapi (Module: Bloomberglp.Blpapi.dll) Version: 3.9.6.1