/// <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; }
/// <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); }
/// <summary> /// Adds an oBIX XML batch item to the current batch request. /// </summary> /// <param name="Op">The oBIX Operation type, being one of obix:Read, obix:Write, or obix:Invoke</param> /// <param name="uri">The URI of the read, write or Invoke</param> /// <param name="ObixParameters">An optional XML parameter to be supplied to an oBIX:Write, or obix:Invoke</param> /// <returns>An instance of the newly created ObixXmlBatchItem, or null if an error occured.</returns> public ObixXmlBatchItem AddXmlBatchItem(ObixBatchOperation Op, string uri, XElement ObixParameters = null) { ObixXmlBatchItem item = new ObixXmlBatchItem(Op, uri, ObixParameters); if (item == null) { return null; } try { lock (__batchItemListMutex) { XmlBatchItemList.Add(item); } } catch (Exception) { return null; } return item; }
/// <summary> /// Adds an oBIX XML batch item to the current batch request. /// </summary> /// <param name="Op">The oBIX Operation type, being one of obix:Read, obix:Write, or obix:Invoke</param> /// <param name="uri">The URI of the read, write or Invoke</param> /// <param name="ObixParameters">An optional XML parameter to be supplied to an oBIX:Write, or obix:Invoke</param> /// <returns>An instance of the newly created ObixXmlBatchItem, or null if an error occured.</returns> public ObixXmlBatchItem AddXmlBatchItem(ObixBatchOperation Op, string uri, XElement ObixParameters = null) { ObixXmlBatchItem item = new ObixXmlBatchItem(Op, uri, ObixParameters); if (item == null) { return(null); } try { lock (__batchItemListMutex) { XmlBatchItemList.Add(item); } } catch (Exception) { return(null); } return(item); }
public ObixXmlBatchItem(ObixBatchOperation Op, string uri, XElement xmlData) : base(Op, uri, null) { this.XmlRequestData = xmlData; }
public ObixBatchItem(ObixBatchOperation Op, string uri, byte[] RequestData) { this.Operation = Op; this.UriString = uri; this.RequestData = RequestData; }
public ObixXmlBatchItem(ObixBatchOperation Op, string uri, XElement xmlData) : base(Op, uri, null) { this.XmlRequestData = xmlData; }
public ObixBatchItem(ObixBatchOperation Op, string uri, byte[] RequestData) { this.Operation = Op; this.UriString = uri; this.RequestData = RequestData; }