Beispiel #1
0
        private IEnumerable <string> GetArgs(WordSearchRequest wordSearchRequest)
        {
            foreach (var arg in WordnikUrlHelper.GetCaseSensitiveArguments(wordSearchRequest.CaseSensitive))
            {
                yield return(arg);
            }
            yield return(WordnikUrlHelper.GetMinimumDictionaryCountArgument(wordSearchRequest.MinimumDictionaryCount));

            yield return(WordnikUrlHelper.GetMaximumDictionaryCountArgument(wordSearchRequest.MaximumDictionaryCount));

            yield return(WordnikUrlHelper.GetMaximumLengthArgument(wordSearchRequest.MaximumLength));

            yield return(WordnikUrlHelper.GetMinimumLengthArgument(wordSearchRequest.MinimumLength));

            foreach (var arg in WordnikUrlHelper.GetExpludePartsOfSpeechArguments(wordSearchRequest.ExcludePartsOfSpeech))
            {
                yield return(arg);
            }
            foreach (var arg in WordnikUrlHelper.GetIncludePartsOfSpeechArguments(wordSearchRequest.IncludePartsOfSpeech))
            {
                yield return(arg);
            }
            yield return(WordnikUrlHelper.GetLimitArgument(wordSearchRequest.Limit));

            yield return(WordnikUrlHelper.GetSkipArgument(wordSearchRequest.Skip));

            yield return(WordnikUrlHelper.GetApiKeyArgument(wordSearchRequest.ApiKey));
        }
        private IEnumerable <string> GetArgs(GetRandomWordRequest getRandomWordRequest)
        {
            yield return(WordnikUrlHelper.GetMinCorpusCountArgument(getRandomWordRequest.MinCorpusCount));

            yield return(WordnikUrlHelper.GetMaxCorpusCountArgument(getRandomWordRequest.MaxCorpusCount));

            foreach (var arg in WordnikUrlHelper.GetWithDictionaryDefinitionArguments(getRandomWordRequest.WithDictionaryDefinitions))
            {
                yield return(arg);
            }
            yield return(WordnikUrlHelper.GetMinimumDictionaryCountArgument(getRandomWordRequest.MinimumDictionaryCount));

            yield return(WordnikUrlHelper.GetMaximumDictionaryCountArgument(getRandomWordRequest.MaximumDictionaryCount));

            yield return(WordnikUrlHelper.GetMaximumLengthArgument(getRandomWordRequest.MaximumLength));

            yield return(WordnikUrlHelper.GetMinimumLengthArgument(getRandomWordRequest.MinimumLength));

            foreach (var arg in WordnikUrlHelper.GetExpludePartsOfSpeechArguments(getRandomWordRequest.ExcludePartsOfSpeech))
            {
                yield return(arg);
            }
            foreach (var arg in WordnikUrlHelper.GetIncludePartsOfSpeechArguments(getRandomWordRequest.IncludePartsOfSpeech))
            {
                yield return(arg);
            }
            yield return(WordnikUrlHelper.GetApiKeyArgument(getRandomWordRequest.ApiKey));
        }