/// <summary> /// Sends a PutDataObjects message to a store. /// </summary> /// <param name="dataObjects">The data objects.</param> /// <param name="pruneContainedObjects">Whether or not to prune contained data objects.</param> /// <param name="isFinalPart">Whether or not this is the final part of a multi-part message.</param> /// <param name="extension">The message header extension.</param> /// <returns>The sent message on success; <c>null</c> otherwise.</returns> public virtual EtpMessage <PutDataObjects> PutDataObjects(IDictionary <string, DataObject> dataObjects, bool pruneContainedObjects = false, bool isFinalPart = true, IMessageHeaderExtension extension = null) { var body = new PutDataObjects { DataObjects = dataObjects ?? new Dictionary <string, DataObject>(), PruneContainedObjects = pruneContainedObjects, }; return(SendRequest(body, extension: extension, isMultiPart: true, isFinalPart: isFinalPart)); }
/// <summary> /// Sends a PutDataObjects message to a store. /// </summary> /// <param name="dataObjects">The data objects.</param> /// <returns>The message identifier.</returns> public virtual long PutDataObjects(IList <DataObject> dataObjects) { var header = CreateMessageHeader(Protocols.Store, MessageTypes.Store.PutDataObjects); var putObject = new PutDataObjects { DataObjects = dataObjects }; return(Session.SendMessage(header, putObject)); }
/// <summary> /// Handles the PutDataObjects message from a customer. /// </summary> /// <param name="header">The message header.</param> /// <param name="putDataObjects">The PutDataObjects message.</param> protected virtual void HandlePutDataObjects(IMessageHeader header, PutDataObjects putDataObjects) { Notify(OnPutDataObjects, header, putDataObjects); }