Amazon.S3.AmazonS3Client.GetACLAsync C# (CSharp) 메소드

GetACLAsync() 공개 메소드

Initiates the asynchronous execution of the GetACL operation.
public GetACLAsync ( Amazon.S3.Model.GetACLRequest request, System cancellationToken = default(CancellationToken) ) : Task
request Amazon.S3.Model.GetACLRequest Container for the necessary parameters to execute the GetACL operation.
cancellationToken System /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. ///
리턴 Task
        public Task<GetACLResponse> GetACLAsync(GetACLRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller = new GetACLRequestMarshaller();
            var unmarshaller = GetACLResponseUnmarshaller.Instance;

            return InvokeAsync<GetACLRequest,GetACLResponse>(request, marshaller, 
                unmarshaller, cancellationToken);
        }

Same methods

AmazonS3Client::GetACLAsync ( string bucketName, System cancellationToken = default(CancellationToken) ) : Task
AmazonS3Client::GetACLAsync ( Amazon.S3.Model.GetACLRequest request, GetACLResponse>.AmazonServiceCallback callback, AsyncOptions options = null ) : void
AmazonS3Client::GetACLAsync ( string bucketName, GetACLResponse>.AmazonServiceCallback callback, AsyncOptions options = null ) : void

Usage Example

예제 #1
0
        public static GetACLResponse GetACLHelper(AmazonS3Client client, string bucketName, string key)
        {
            GetACLResponse r = null;
            Exception responseException = null;
            AutoResetEvent ars = new AutoResetEvent(false);

            client.GetACLAsync(new GetACLRequest()
            {
                BucketName = bucketName,
                Key = key
            }, (response) =>
            {
                responseException = response.Exception;
                if (responseException == null)
                {
                    r = response.Response;
                }
                ars.Set();
            }, new AsyncOptions { ExecuteCallbackOnMainThread = false });
            ars.WaitOne();

            if (responseException != null)
            {
                throw responseException;
            }
            return r;
        }
AmazonS3Client