Class SampleData
- Namespace
- Rustaveli.Pdf
- Assembly
- Rustaveli.Pdf.dll
Stand-in content for laying a document out before the real content exists: dummy text as typesetters set it, names, addresses, numbers, dates, inks and images.
public sealed class SampleData
- Inheritance
-
SampleData
- Inherited Members
Remarks
What it gives depends only on its seed, so a prototype looks the same every time it is made. It is not safe to share between threads; give each its own.
Constructors
SampleData(int)
Sample data that is the same for the same seed.
public SampleData(int seed = 0)
Parameters
seedint
Methods
Amount()
A price in euros, from 1 to 999.99.
public string Amount()
Returns
Date()
A date between 2000 and 2029, as yyyy-MM-dd.
public string Date()
Returns
DecimalNumber()
A number with two decimals, from 0 to 9999.99.
public string DecimalNumber()
Returns
EmailAddress()
An email address at one of the domains reserved for examples.
public string EmailAddress()
Returns
Heading()
A short heading of two to four words, each capitalised.
public string Heading()
Returns
Image(int, int)
An image of width by height pixels, a soft blend between two pale inks,
to hold the place of a photograph.
public RasterImage Image(int width = 320, int height = 200)
Parameters
Returns
Ink()
A strong ink, for text or rules.
public Ink Ink()
Returns
Number()
A whole number from 0 to 9999.
public string Number()
Returns
PaleInk()
A pale ink, for backgrounds.
public Ink PaleInk()
Returns
Paragraph()
A paragraph of three to seven sentences.
public string Paragraph()
Returns
Paragraphs(int)
count paragraphs, separated by line feeds.
public string Paragraphs(int count)
Parameters
countint
Returns
Percentage()
A percentage with one decimal.
public string Percentage()
Returns
PersonName()
A given name and a family name.
public string PersonName()
Returns
Query()
A question of five to twelve words.
public string Query()
Returns
Sentence()
A sentence of six to fifteen words, capitalised and ending with a full stop.
public string Sentence()
Returns
TelephoneNumber()
A telephone number in the international format.
public string TelephoneNumber()
Returns
TimeOfDay()
A time of day on the twenty-four hour clock.
public string TimeOfDay()
Returns
Timestamp()
A date and time between 2000 and 2029, as yyyy-MM-dd HH:mm.
public string Timestamp()
Returns
WebAddress()
A web address on one of the domains reserved for examples.
public string WebAddress()
Returns
Words(int)
count dummy words, lower case, separated by spaces.
public string Words(int count)
Parameters
countint
Returns
WrittenDate()
A date between 2000 and 2029, written out: 7 March 2021.
public string WrittenDate()