internal virtual SubscribeToDatasetResponse SubscribeToDataset(SubscribeToDatasetRequest request) { var marshaller = SubscribeToDatasetRequestMarshaller.Instance; var unmarshaller = SubscribeToDatasetResponseUnmarshaller.Instance; return(Invoke <SubscribeToDatasetRequest, SubscribeToDatasetResponse>(request, marshaller, unmarshaller)); }
/// <summary> /// Initiates the asynchronous execution of the SubscribeToDataset operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the SubscribeToDataset operation.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// <returns>The task object representing the asynchronous operation.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/SubscribeToDataset">REST API Reference for SubscribeToDataset Operation</seealso> public virtual Task <SubscribeToDatasetResponse> SubscribeToDatasetAsync(SubscribeToDatasetRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = SubscribeToDatasetRequestMarshaller.Instance; var unmarshaller = SubscribeToDatasetResponseUnmarshaller.Instance; return(InvokeAsync <SubscribeToDatasetRequest, SubscribeToDatasetResponse>(request, marshaller, unmarshaller, cancellationToken)); }
internal virtual SubscribeToDatasetResponse SubscribeToDataset(SubscribeToDatasetRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = SubscribeToDatasetRequestMarshaller.Instance; options.ResponseUnmarshaller = SubscribeToDatasetResponseUnmarshaller.Instance; return(Invoke <SubscribeToDatasetResponse>(request, options)); }
/// <summary> /// Initiates the asynchronous execution of the SubscribeToDataset operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the SubscribeToDataset operation on AmazonCognitoSyncClient.</param> /// <param name="callback">An Action delegate that is invoked when the operation completes.</param> /// <param name="options">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback /// procedure using the AsyncState property.</param> public void SubscribeToDatasetAsync(SubscribeToDatasetRequest request, AmazonServiceCallback <SubscribeToDatasetRequest, SubscribeToDatasetResponse> callback, AsyncOptions options = null) { options = options == null?new AsyncOptions():options; var marshaller = new SubscribeToDatasetRequestMarshaller(); var unmarshaller = SubscribeToDatasetResponseUnmarshaller.Instance; Action <AmazonWebServiceRequest, AmazonWebServiceResponse, Exception, AsyncOptions> callbackHelper = null; if (callback != null) { callbackHelper = (AmazonWebServiceRequest req, AmazonWebServiceResponse res, Exception ex, AsyncOptions ao) => { AmazonServiceResult <SubscribeToDatasetRequest, SubscribeToDatasetResponse> responseObject = new AmazonServiceResult <SubscribeToDatasetRequest, SubscribeToDatasetResponse>((SubscribeToDatasetRequest)req, (SubscribeToDatasetResponse)res, ex, ao.State); callback(responseObject); } } ; BeginInvoke <SubscribeToDatasetRequest>(request, marshaller, unmarshaller, options, callbackHelper); }