Microsoft.Protocols.TestSuites.MS_LISTSWS.MS_LISTSWSAdapter.GetListItems C# (CSharp) Method

GetListItems() public method

This operation is used to retrieve details about list items in a list that satisfy specified criteria.
public GetListItems ( string listName, string viewName, GetListItemsQuery query, CamlViewFields viewFields, string rowLimit, CamlQueryOptions queryOptions, string webID ) : GetListItemsResponseGetListItemsResult
listName string The name of the list from which item changes will be got
viewName string The GUID refers to a view of the list
query GetListItemsQuery The query to determine which records from the list are to be returned
viewFields Microsoft.Protocols.TestSuites.Common.CamlViewFields Specifies which fields of the list item should be returned
rowLimit string Specifies the maximum number of rows of data to return in the response
queryOptions Microsoft.Protocols.TestSuites.Common.CamlQueryOptions Specifies various options for modifying the query
webID string The GUID of the site that contains the list. If not specified, the default Web site based on the SOAP request is used
return GetListItemsResponseGetListItemsResult
        public GetListItemsResponseGetListItemsResult GetListItems(string listName, string viewName, GetListItemsQuery query, CamlViewFields viewFields, string rowLimit, CamlQueryOptions queryOptions, string webID)
        {
            this.Site.Assert.IsNotNull(this.listsProxy, "The Proxy instance should not be NULL. If assert failed, the adapter need to be initialized");

            GetListItemsResponseGetListItemsResult result = null;
            try
            {
                result = this.listsProxy.GetListItems(listName, viewName, query, viewFields, rowLimit, queryOptions, webID);

                // Verify the requirements of the GetListItems operation.
                this.VerifyGetListItemsOperation(result, queryOptions, viewFields);

                // Verify the requirements of the transport.
                this.VerifyTransportRequirements();
            }
            catch (XmlSchemaValidationException exp)
            {
                // Log the errors and warnings
                this.LogSchemaValidationErrors();

                this.Site.Assert.Fail(exp.Message);
            }
            catch (SoapException)
            {
                this.VerifySoapExceptionFault();
                throw;
            }

            return result;
        }
MS_LISTSWSAdapter