Microsoft.Protocols.TestSuites.MS_ASCMD.S14_Search.GetItemFromSearchResult C# (CSharp) Method

GetItemFromSearchResult() private static method

Get item value from single Result element of Search command.
private static GetItemFromSearchResult ( Response searchResult, Response itemType ) : object
searchResult Microsoft.Protocols.TestSuites.Common.Response The single Result element of Search command.
itemType Microsoft.Protocols.TestSuites.Common.Response The item type.
return object
        private static object GetItemFromSearchResult(Response.SearchResponseStoreResult searchResult, Response.ItemsChoiceType6 itemType)
        {
            for (int index = 0; index < searchResult.Properties.ItemsElementName.Length; index++)
            {
                if (searchResult.Properties.ItemsElementName[index] == itemType)
                {
                    return searchResult.Properties.Items[index];
                }
            }

            return null;
        }
S14_Search