GenerateParagraphs Web Method
Method Name
GenerateParagraphs
Summary
Web method that generates a set of random paragraphs.
See Resources for examples of applications that access this web method.
Parameters
minNumParagraphs
Type: Integer
Minimum number of paragraphs to generate.
Valid Values:
Integer greater than zero (0).
maxNumParagraphs
Type: Integer
Minimum number of paragraphs to generate.
Valid Values:
Integer greater than or equal to minNumParagraphs.
minNumSentencesPerParagraph
Type: Integer
Minimum number of sentences to generate for each paragraph.
Valid Values:
Integer greater than zero (0).
maxNumSentencesPerParagraph
Type: Integer
Maximum number of sentences to generate for each paragraph.
Valid Values:
Integer greater than or equal to minNumSentencesPerParagraph.
insertBlankLineBetweenParagraphs
Type: Boolean
If true, a blank line will be inserted after each paragraph. If false, generated paragraphs are not separated by a blank line. Blank line improves readability of output..
Valid Values:
True or False.
Return Value
Type: String
String containing the list of generated paragraphs.
Example
URL
C#
//Test endpoint address for ServiceReference1:
// http://pfrandomtextwebservice.azurewebsites.net/textgenerator.asmx
TestWebServiceApp.ServiceReference1.TextGeneratorSoapClient serviceClient = new ServiceReference1.TextGeneratorSoapClient();
public string GenerateParagraphs(int minNumParagraphs, int maxNumParagraphs,
int minNumSentencesPerParagraph, int maxNumSentencesPerParagraph,
bool insertBlankLineBetweenParagraphs)
{
string result = string.Empty;
result = serviceClient.GenerateParagraphs(minNumParagraphs, maxNumParagraphs,
minNumSentencesPerParagraph, maxNumSentencesPerParagraph,
insertBlankLineBetweenParagraphs);
return result;
}