Пример #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);
        }
Пример #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);
        }
Пример #3
0
 protected override bool ReleaseHandle()
 {
     SessionNative.Destroy(this.handle);
     return(true);
 }
Пример #4
0
 public Future RegisterServiceAsync <T>(string serviceName, T service) where T : QiObject
 {
     return(new Future(SessionNative.Register_service(this._handle, serviceName, service.Handle)));
 }
Пример #5
0
 public Future GetServiceAsync(string serviceName)
 {
     return(new Future(SessionNative.GetService(this._handle, serviceName)));
 }
Пример #6
0
 public Session()
 {
     this._handle = SessionNative.Create();
 }
Пример #7
0
 public void Close()
 {
     SessionNative.Close(this._handle);
 }