示例#1
0
        /// <summary>
        /// Sends a PutObject message to a store.
        /// </summary>
        /// <param name="dataObject">The data object.</param>
        /// <returns>The sent message on success; <c>null</c> otherwise.</returns>
        public virtual EtpMessage <PutObject> PutObject(DataObject dataObject)
        {
            var body = new PutObject()
            {
                DataObject = dataObject,
            };

            return(SendNotification(body));
        }
示例#2
0
        /// <summary>
        /// Sends a PutObject message to a store.
        /// </summary>
        /// <param name="dataObject">The data object.</param>
        /// <returns>The message identifier.</returns>
        public virtual long PutObject(DataObject dataObject)
        {
            var header = CreateMessageHeader(Protocols.Store, MessageTypes.Store.PutObject);

            var putObject = new PutObject()
            {
                DataObject = dataObject
            };

            return(Session.SendMessage(header, putObject));
        }
 /// <summary>
 /// Handles the PutObject message from a customer.
 /// </summary>
 /// <param name="header">The message header.</param>
 /// <param name="putObject">The PutObject message.</param>
 protected virtual void HandlePutObject(IMessageHeader header, PutObject putObject)
 {
     Notify(OnPutObject, header, putObject);
 }