Ejemplo n.º 1
0
        Task IPremiseSubscription.UnsubscribeAsync()
        {
            var future = new UnsubscribeFuture(_objectId, _subscriptionId);

            _sysClient.Send(future, out Task task);
            if (!_sysClient.Subscriptions.TryRemove(clientSideSubscriptionId, out Subscription _))
            {
                Debug.WriteLine($"Subscription {clientSideSubscriptionId} Not Found");
            }
            return(task);
        }
Ejemplo n.º 2
0
        Task <IPremiseObject> IPremiseObject.CreateObjectAsync(IPremiseObject type, string name)
        {
            var future = new CreateObjectFuture(_objectId, (type as PremiseObject)?._objectId, name);

            _client.Send(future, out Task <IPremiseObject> task);
            return(task);
        }