コード例 #1
0
        /// <summary>
        /// Creates or updates an object using provided parameters.
        /// </summary>
        /// <param name="request">Container for the necessary parameters to execute the PutObject service method.</param>
        /// <returns>The response from the PutObject service method, as returned by ECS.</returns>
        public PutObjectResponseECS PutObject(PutObjectRequestECS request)
        {
            var marshaller   = new PutObjectRequestMarshallerECS();
            var unmarshaller = PutObjectResponseUnmarshallerECS.Instance;

            return(Invoke <PutObjectRequestECS, PutObjectResponseECS>(request, marshaller, unmarshaller));
        }
コード例 #2
0
        /// <summary>
        /// Creates or updates an object using provided parameters.
        /// </summary>
        /// <param name="request">Container for the necessary parameters to execute the PutObject service method.</param>
        /// <returns>The response from the PutObject service method, as returned by ECS.</returns>
        public PutObjectResponseECS PutObject(PutObjectRequestECS request)
        {
            var marshaller   = new PutObjectRequestMarshallerECS();
            var unmarshaller = PutObjectResponseUnmarshallerECS.Instance;

            InvokeOptions invokeOptions = new InvokeOptions();

            invokeOptions.RequestMarshaller    = marshaller;
            invokeOptions.ResponseUnmarshaller = unmarshaller;

            return(Invoke <PutObjectResponseECS>(request, invokeOptions));
        }
コード例 #3
0
        /// <summary>
        /// Appends the provided data to the end of the object.
        /// </summary>
        /// <param name="bucketName">Container for the necessary parameters to execute the PutObject service method.</param>
        /// <returns>The response from the PutObject service method, as returned by ECS.</returns>
        public long AppendObject(string bucketName, string keyName, string contentBody)
        {
            var marshaller   = new PutObjectRequestMarshallerECS();
            var unmarshaller = PutObjectResponseUnmarshallerECS.Instance;

            PutObjectRequestECS request = new PutObjectRequestECS()
            {
                BucketName  = bucketName,
                Key         = keyName,
                ContentBody = contentBody,
                Range       = Range.fromOffset(-1)
            };

            PutObjectResponseECS response = Invoke <PutObjectRequestECS, PutObjectResponseECS>(request, marshaller, unmarshaller);

            return(response.AppendOffset);
        }