Esempio n. 1
0
        public IAsyncResult BeginGetService(string serviceName, AsyncCallback userCallback, object userStateObject)
        {
            var future = new Future(SessionNative.GetService(this._handle, serviceName), userCallback, userStateObject);

            future.ThrowIfError();
            return(future);
        }
Esempio n. 2
0
        public IAsyncResult BeginConnect(Uri addressUri, AsyncCallback userCallback, object userStateObject)
        {
            var future = new Future(SessionNative.Connect(this._handle, addressUri.ToString()), userCallback, userStateObject);

            if (future.HasError)
            {
                throw new Exception(future.Error);
            }
            return(future);
        }
Esempio n. 3
0
 protected override bool ReleaseHandle()
 {
     SessionNative.Destroy(this.handle);
     return(true);
 }
Esempio n. 4
0
 public Future RegisterServiceAsync <T>(string serviceName, T service) where T : QiObject
 {
     return(new Future(SessionNative.Register_service(this._handle, serviceName, service.Handle)));
 }
Esempio n. 5
0
 public Future GetServiceAsync(string serviceName)
 {
     return(new Future(SessionNative.GetService(this._handle, serviceName)));
 }
Esempio n. 6
0
 public Session()
 {
     this._handle = SessionNative.Create();
 }
Esempio n. 7
0
 public void Close()
 {
     SessionNative.Close(this._handle);
 }