/// <summary> /// Adds or updates a list item in a growing object. /// </summary> /// <param name="uri">The URI of the parent object.</param> /// <param name="contentType">The content type string for the parent object.</param> /// <param name="data">The data (list items) to be added to the growing object.</param> /// <param name="contentEncoding">The content encoding the data.</param> /// <returns>The sent message on success; <c>null</c> otherwise.</returns> public virtual EtpMessage <GrowingObjectPut> GrowingObjectPut(string uri, string contentType, byte[] data, string contentEncoding = ContentEncodings.TextXml) { var body = new GrowingObjectPut { Uri = uri ?? string.Empty, ContentType = contentType ?? string.Empty, ContentEncoding = contentEncoding ?? ContentEncodings.TextXml, Data = data ?? new byte[0], }; return(SendRequest(body)); }
/// <summary> /// Adds or updates a list item in a growing object. /// </summary> /// <param name="uri">The URI of the parent object.</param> /// <param name="contentType">The content type string for the parent object.</param> /// <param name="data">The data (list items) to be added to the growing object.</param> /// <returns>The message identifier.</returns> public long GrowingObjectPut(string uri, string contentType, byte[] data) { var header = CreateMessageHeader(Protocols.GrowingObject, MessageTypes.GrowingObject.GrowingObjectPut); var message = new GrowingObjectPut { Uri = uri, ContentType = contentType, ContentEncoding = "text/xml", Data = data }; return(Session.SendMessage(header, message)); }
/// <summary> /// Handles the GrowingObjectPut message from a store. /// </summary> /// <param name="header">The message header.</param> /// <param name="message">The GrowingObjectPut message.</param> protected virtual void HandleGrowingObjectPut(IMessageHeader header, GrowingObjectPut message) { Notify(OnGrowingObjectPut, header, message); }