コード例 #1
0
ファイル: OssClient.cs プロジェクト: a526757124/gittfsdemo
        /// <inheritdoc/>
        public IAsyncResult BeginCopyObject(CopyObjectRequest copyObjectRequst, AsyncCallback callback, Object state)
        {
            var cmd = CopyObjectCommand.Create(GetServiceClient(), _endpoint,
                                               CreateContext(HttpMethod.Put, copyObjectRequst.DestinationBucketName, copyObjectRequst.DestinationKey),
                                               copyObjectRequst);

            return(OssUtils.BeginOperationHelper(cmd, callback, state));
        }
コード例 #2
0
ファイル: OssClient.cs プロジェクト: a526757124/gittfsdemo
        /// <inheritdoc/>
        public IAsyncResult BeginUploadPart(UploadPartRequest uploadPartRequest, AsyncCallback callback, object state)
        {
            var cmd = UploadPartCommand.Create(GetServiceClient(), _endpoint,
                                               CreateContext(HttpMethod.Put, uploadPartRequest.BucketName, uploadPartRequest.Key),
                                               uploadPartRequest);

            return(OssUtils.BeginOperationHelper(cmd, callback, state));
        }
コード例 #3
0
ファイル: OssClient.cs プロジェクト: a526757124/gittfsdemo
        public IAsyncResult BeginPutObject(string bucketName, string key, Stream content, ObjectMetadata metadata,
                                           AsyncCallback callback, object state)
        {
            var cmd = PutObjectCommand.Create(GetServiceClient(), _endpoint,
                                              CreateContext(HttpMethod.Put, bucketName, key),
                                              bucketName, key, content, metadata);

            return(OssUtils.BeginOperationHelper(cmd, callback, state));
        }
コード例 #4
0
ファイル: OssClient.cs プロジェクト: a526757124/gittfsdemo
        /// <inheritdoc/>
        public IAsyncResult BeginGetObject(GetObjectRequest getObjectRequest, AsyncCallback callback, Object state)
        {
            ThrowIfNullRequest(getObjectRequest);

            var cmd = GetObjectCommand.Create(GetServiceClient(),
                                              _endpoint,
                                              CreateContext(HttpMethod.Get, getObjectRequest.BucketName, getObjectRequest.Key),
                                              getObjectRequest);

            return(OssUtils.BeginOperationHelper(cmd, callback, state));
        }
コード例 #5
0
ファイル: OssClient.cs プロジェクト: a526757124/gittfsdemo
        public IAsyncResult BeginListObjects(ListObjectsRequest listObjectsRequest, AsyncCallback callback, object state)
        {
            if (listObjectsRequest == null)
            {
                throw new ArgumentNullException("listObjectsRequest");
            }

            var cmd = ListObjectsCommand.Create(GetServiceClient(), _endpoint,
                                                CreateContext(HttpMethod.Get, listObjectsRequest.BucketName, null),
                                                listObjectsRequest);

            return(OssUtils.BeginOperationHelper(cmd, callback, state));
        }