Exemplo n.º 1
0
        internal GetAttributesResponse GetAttributes(GetAttributesRequest request)
        {
            var marshaller   = new GetAttributesRequestMarshaller();
            var unmarshaller = GetAttributesResponseUnmarshaller.Instance;

            return(Invoke <GetAttributesRequest, GetAttributesResponse>(request, marshaller, unmarshaller));
        }
        /// <summary>
        /// Initiates the asynchronous execution of the GetAttributes operation.
        /// <seealso cref="Amazon.SimpleDB.IAmazonSimpleDB.GetAttributes"/>
        /// </summary>
        ///
        /// <param name="request">Container for the necessary parameters to execute the GetAttributes 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>
        public Task <GetAttributesResponse> GetAttributesAsync(GetAttributesRequest request, CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller   = new GetAttributesRequestMarshaller();
            var unmarshaller = GetAttributesResponseUnmarshaller.GetInstance();

            return(Invoke <IRequest, GetAttributesRequest, GetAttributesResponse>(request, marshaller, unmarshaller, signer, cancellationToken));
        }
Exemplo n.º 3
0
        /// <summary>
        /// Initiates the asynchronous execution of the GetAttributes operation.
        /// <seealso cref="Amazon.SimpleDB.IAmazonSimpleDB"/>
        /// </summary>
        ///
        /// <param name="request">Container for the necessary parameters to execute the GetAttributes 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>
        public Task <GetAttributesResponse> GetAttributesAsync(GetAttributesRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller   = new GetAttributesRequestMarshaller();
            var unmarshaller = GetAttributesResponseUnmarshaller.Instance;

            return(InvokeAsync <GetAttributesRequest, GetAttributesResponse>(request, marshaller,
                                                                             unmarshaller, cancellationToken));
        }
        public void GetAttributesMarshallTest()
        {
            var operation = service_model.FindOperation("GetAttributes");

            var request         = InstantiateClassGenerator.Execute <GetAttributesRequest>();
            var marshaller      = new GetAttributesRequestMarshaller();
            var internalRequest = marshaller.Marshall(request);
            var validator       = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation);

            validator.Validate();


            var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute();
            var context         = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, null);
            var response        = GetAttributesResponseUnmarshaller.Instance.Unmarshall(context)
                                  as GetAttributesResponse;

            InstantiateClassGenerator.ValidateObjectFullyInstantiated(response);
        }
        /// <summary>
        /// <para> Returns all of the attributes associated with the specified item. Optionally, the attributes returned can be limited to one or more
        /// attributes by specifying an attribute name parameter. </para> <para> If the item does not exist on the replica that was accessed for this
        /// operation, an empty set is returned. The system does not return an error as it cannot guarantee the item does not exist on other replicas.
        /// </para> <para><b>NOTE:</b> If GetAttributes is called without being passed any attribute names, all the attributes for the item are
        /// returned. </para>
        /// </summary>
        /// 
        /// <param name="getAttributesRequest">Container for the necessary parameters to execute the GetAttributes service method on
        /// AmazonSimpleDB.</param>
        /// 
        /// <returns>The response from the GetAttributes service method, as returned by AmazonSimpleDB.</returns>
        /// 
        /// <exception cref="T:Amazon.SimpleDB.Model.InvalidParameterValueException" />
        /// <exception cref="T:Amazon.SimpleDB.Model.NoSuchDomainException" />
        /// <exception cref="T:Amazon.SimpleDB.Model.MissingParameterException" />
        /// <param name="cancellationToken">
        ///     A cancellation token that can be used by other objects or threads to receive notice of cancellation.
        /// </param>
		public async Task<GetAttributesResponse> GetAttributesAsync(GetAttributesRequest getAttributesRequest, CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller = new GetAttributesRequestMarshaller();
            var unmarshaller = GetAttributesResponseUnmarshaller.GetInstance();
            var response = await Invoke<IRequest, GetAttributesRequest, GetAttributesResponse>(getAttributesRequest, marshaller, unmarshaller, signer, cancellationToken)
                .ConfigureAwait(continueOnCapturedContext: false);
            return response;
        }
        /// <summary>
        /// Initiates the asynchronous execution of the GetAttributes operation.
        /// <seealso cref="Amazon.SimpleDB.IAmazonSimpleDB"/>
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the GetAttributes 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>
        public Task<GetAttributesResponse> GetAttributesAsync(GetAttributesRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller = new GetAttributesRequestMarshaller();
            var unmarshaller = GetAttributesResponseUnmarshaller.Instance;

            return InvokeAsync<GetAttributesRequest,GetAttributesResponse>(request, marshaller, 
                unmarshaller, cancellationToken);
        }
        /// <summary>
        /// Returns all of the attributes associated with the specified item. Optionally, the
        /// attributes returned can be limited to one or more attributes by specifying an attribute
        /// name parameter. 
        /// 
        ///  
        /// <para>
        ///  If the item does not exist on the replica that was accessed for this operation, an
        /// empty set is returned. The system does not return an error as it cannot guarantee
        /// the item does not exist on other replicas. 
        /// </para>
        /// </summary>
        /// <param name="request">Container for the necessary parameters to execute the GetAttributes service method.</param>
        /// 
        /// <returns>The response from the GetAttributes service method, as returned by SimpleDB.</returns>
        /// <exception cref="InvalidParameterValueException">
        /// The value for a parameter is invalid.
        /// </exception>
        /// <exception cref="MissingParameterException">
        /// The request must contain the specified missing parameter.
        /// </exception>
        /// <exception cref="NoSuchDomainException">
        /// The specified domain does not exist.
        /// </exception>
        public GetAttributesResponse GetAttributes(GetAttributesRequest request)
        {
            var marshaller = new GetAttributesRequestMarshaller();
            var unmarshaller = GetAttributesResponseUnmarshaller.Instance;

            return Invoke<GetAttributesRequest,GetAttributesResponse>(request, marshaller, unmarshaller);
        }
 IAsyncResult invokeGetAttributes(GetAttributesRequest getAttributesRequest, AsyncCallback callback, object state, bool synchronized)
 {
     IRequest irequest = new GetAttributesRequestMarshaller().Marshall(getAttributesRequest);
     var unmarshaller = GetAttributesResponseUnmarshaller.GetInstance();
     AsyncResult result = new AsyncResult(irequest, callback, state, synchronized, signer, unmarshaller);
     Invoke(result);
     return result;
 }
Exemplo n.º 9
0
        /// <summary>
        /// Initiates the asynchronous execution of the GetAttributes operation.
        /// <seealso cref="Amazon.SimpleDB.IAmazonSimpleDB.GetAttributes"/>
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the GetAttributes 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>
		public Task<GetAttributesResponse> GetAttributesAsync(GetAttributesRequest request, CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller = new GetAttributesRequestMarshaller();
            var unmarshaller = GetAttributesResponseUnmarshaller.GetInstance();
            return Invoke<IRequest, GetAttributesRequest, GetAttributesResponse>(request, marshaller, unmarshaller, signer, cancellationToken);
        }
Exemplo n.º 10
0
        /// <summary>
        /// Initiates the asynchronous execution of the GetAttributes operation.
        /// <seealso cref="Amazon.SimpleDB.IAmazonSimpleDB"/>
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the GetAttributes operation on AmazonSimpleDBClient.</param>
        /// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
        /// <param name="state">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>
        /// 
        /// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndGetAttributes
        ///         operation.</returns>
        public IAsyncResult BeginGetAttributes(GetAttributesRequest request, AsyncCallback callback, object state)
        {
            var marshaller = new GetAttributesRequestMarshaller();
            var unmarshaller = GetAttributesResponseUnmarshaller.Instance;

            return BeginInvoke<GetAttributesRequest>(request, marshaller, unmarshaller,
                callback, state);
        }
        public void GetAttributesMarshallTest()
        {
            var operation = service_model.FindOperation("GetAttributes");

            var request = InstantiateClassGenerator.Execute<GetAttributesRequest>();
            var marshaller = new GetAttributesRequestMarshaller();
            var internalRequest = marshaller.Marshall(request);
            var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation);
            validator.Validate();


            var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute();
            var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, null);
            var response = GetAttributesResponseUnmarshaller.Instance.Unmarshall(context)
                as GetAttributesResponse;   
            InstantiateClassGenerator.ValidateObjectFullyInstantiated(response);       
        }