RandomWord Class
Namespace: PTS.Text
Assembly: PTS.Text.dll
Conatins components of human readable random word.
Syntax
public class RandomWord
Inheritance
System.Object
RandomWord
Constructors
RandomWord(Int32, Int32, Int32)
Creates a new instance of RandomWord with configuration specified in parameters.
Declaration
public RandomWord(int syllableCount = 3, int digitCount = 1, int speacialCharCount = 1)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | syllableCount | How many syllables the new word is going to have. |
System.Int32 | digitCount | How many occurences digits the new word is going to have. |
System.Int32 | speacialCharCount | How many special characters the new word is going to contain. |
Properties
DigitCount
Gets the number of digits present in this instance.
Declaration
public int DigitCount { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
SpecialCharCount
Gets the number of special characters in this instance.
Declaration
public int SpecialCharCount { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
SyllableCount
Gets the number of syllables in this instance.
Declaration
public int SyllableCount { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Value
Contains the random word string.
Declaration
public string Value { get; }
Property Value
Type | Description |
---|---|
System.String |
Methods
Generate(Int32, Int32, Int32)
Generates a random, human-readable word.
Declaration
public static string Generate(int syllableCount, int digitCount, int specialCharacterCount)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | syllableCount | Number of syllables the word will contain |
System.Int32 | digitCount | Number of numbers the word will contain |
System.Int32 | specialCharacterCount | Number of symbols the word will contain |
Returns
Type | Description |
---|---|
System.String |
Operators
Implicit(RandomWord to String)
Implicityl converts the instance of RandomWord to a string.
Declaration
public static implicit operator string (RandomWord word)
Parameters
Type | Name | Description |
---|---|---|
RandomWord | word | Random workd to convert to string. |
Returns
Type | Description |
---|---|
System.String |
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()