Exemplo n.º 1
0
        /// <summary>
        /// Removes a batch item from the obix:Batch request.
        /// </summary>
        /// <param name="Item">The obix:BatchIn item to remove</param>
        protected void RemoveBatchItem(ObixBatchItem Item) {
            if (Item == null || this.itemList.Contains(Item) == false) {
                return;
            }

            lock (__itemListMutex) {
                this.itemList.Remove(Item);
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// Adds an obix:BatchIn item consisting of the oBIX <paramref name="Op"/>eration, the <paramref name="Uri"/> to send the request to, and optionally 
        /// a byte array of data to send as the parameter to the oBIX:BatchIn item.
        /// </summary>
        /// <param name="Op"></param>
        /// <param name="relativeUri"></param>
        /// <param name="data"></param>
        /// <returns>The oBIX BatchItem if the operation is to succeed, an exception otherwise.</returns>
        protected ObixBatchItem AddBatchItem(ObixBatchOperation Op, string relativeUri, byte[] data) {
            ObixBatchItem item = null;

            item = new ObixBatchItem(Op, relativeUri, data);
            lock (__itemListMutex) {    
                this.itemList.Add(item);
            }

            return item;
        }
Exemplo n.º 3
0
        /// <summary>
        /// Removes a batch item from the obix:Batch request.
        /// </summary>
        /// <param name="Item">The obix:BatchIn item to remove</param>
        protected void RemoveBatchItem(ObixBatchItem Item)
        {
            if (Item == null || this.itemList.Contains(Item) == false)
            {
                return;
            }

            lock (__itemListMutex) {
                this.itemList.Remove(Item);
            }
        }
Exemplo n.º 4
0
        /// <summary>
        /// Adds an obix:BatchIn item consisting of the oBIX <paramref name="Op"/>eration, the <paramref name="Uri"/> to send the request to, and optionally
        /// a byte array of data to send as the parameter to the oBIX:BatchIn item.
        /// </summary>
        /// <param name="Op"></param>
        /// <param name="relativeUri"></param>
        /// <param name="data"></param>
        /// <returns>The oBIX BatchItem if the operation is to succeed, an exception otherwise.</returns>
        protected ObixBatchItem AddBatchItem(ObixBatchOperation Op, string relativeUri, byte[] data)
        {
            ObixBatchItem item = null;

            item = new ObixBatchItem(Op, relativeUri, data);
            lock (__itemListMutex) {
                this.itemList.Add(item);
            }

            return(item);
        }
Exemplo n.º 5
0
 public ObixBatchResponse(ObixBatchItem Request, byte[] ResponseData) {
     this.Request = Request;
     this.ResponseData = ResponseData;
 }
Exemplo n.º 6
0
 public ObixBatchResponse(ObixBatchItem Request, byte[] ResponseData)
 {
     this.Request      = Request;
     this.ResponseData = ResponseData;
 }