-
Notifications
You must be signed in to change notification settings - Fork 11
Predefined Formatter
Morestachio brings (298) predefined formatter, (5) constants and (7) services to build your template with most efficiency
See https://github.com/JPVenson/morestachio/wiki/Formatter#formatter-framework for custom formatters.
Please note that this section of the wiki is autogenerated via the WorkInProgress Morestachio.Runner
All PRs updating this Wiki page alone will be rejected
Note: The Dynamic Linq Formatter are only avaiable if you included the Morestachio.Linq Nuget package
To Regenerate this Documentation if you added an build-in formatter invoke "Morestachio.Runner.exe --source-type NetFunction --source-data "Morestachio.Runner.dll" --source-data-net-type "Morestachio.Runner.Program" --source-data-net-function "GetMorestachioFormatterDocumentation" --target-path "documentation-out.md" --template-data "documentation.md""
Template: https://github.com/JPVenson/morestachio/blob/master/Morestachio.Runner/documentation.md
Go to:
Constants are objects that are available like variables without you specificing them directly. For the most part, they expose some properties you can access and/or some instance formatters.
Example:
{{CurrencyHandler}}
Structure:
type CurrencyHandler {
/**
* The Default handler that contains all system wide known currencies
*/
DefaultHandler: CurrencyHandler,
/**
* The list of all known currencies
*/
Currencies: IDictionary<string, Currency>,
/**
* A list of known conversions for Currencies
*/
ConversionFactors: IEnumerable<CurrencyConversion>,
/**
* Converts a money object using an currency and the current known conversion factors
*/
function Convert(one: Money, toCurrency: Currency): Money,
}
type Money {
/**
* The monetary value
*/
Value: Number,
/**
* The values currency
*/
Currency: Currency,
}
type Number {
/**
* Contains the numeric value
*/
Value: IConvertible,
}
type Currency {
/**
* The Symbol that represents the current currency
*/
DisplayValue: string,
/**
* The ISO4217 currency name
*/
IsoName: string,
}
type CurrencyConversion {
/**
* One part of currency
*/
FromCurrency: Currency,
/**
* One part of currency
*/
ToCurrency: Currency,
/**
* The factor of the conversion. Can be inverted to use in ToCurrency -> FromCurrency
*/
Factor: double,
}Example:
{{Currencies}}
Currencies is a WellKnownCurrencies
Structure:
type WellKnownCurrencies {
/**
* Gets the US-Doller Currency type denoted in $
*/
USD: Currency,
/**
* Gets the European Currency type denoted in €
*/
EUR: Currency,
/**
* Gets the Russian Federations Currency type denoted in RUB
*/
RUB: Currency,
/**
* Gets the Indian Currency type denoted in ₹
*/
INR: Currency,
/**
* Gets the People's Republic of China Currency type denoted in ¥
*/
CNY: Currency,
/**
* Gets the Great British Currency type denoted in £
*/
GBP: Currency,
/**
* Gets the Japanese Currency type denoted in ¥
*/
JPY: Currency,
}
type Currency {
/**
* The Symbol that represents the current currency
*/
DisplayValue: string,
/**
* The ISO4217 currency name
*/
IsoName: string,
}Example:
{{DateTime}}
DateTime is a DateTimeConstant
Structure:
type DateTimeConstant {
/**
* Gets a DateTime object that is set to the current date and time on this computer, expressed as the local time.
*/
Now: DateTime,
/**
* Gets the current date.
*/
Today: DateTime,
/**
* Gets a DateTime object that is set to the current date and time on this computer, expressed as the Coordinated Universal Time (UTC).
*/
UtcNow: DateTime,
/**
* Gets a DateTime object that is set to the current date and time on this computer, expressed as the local time.
*/
OffsetNow: DateTimeOffset,
/**
* Gets a DateTime object that is set to the current date and time on this computer, expressed as the Coordinated Universal Time (UTC).
*/
OffsetUtcNow: DateTimeOffset,
}Example:
{{Encoding}}
Encoding is a EncodingConstant
Structure:
type EncodingConstant {
/**
* Gets an encoding for the ASCII (7-bit) character set.
*/
ASCII: Encoding,
/**
* Gets an encoding for the UTF-16 format that uses the big endian byte order.
*/
BigEndianUnicode: Encoding,
/**
* Gets an encoding for the operating system's current ANSI code page.
*/
Default: Encoding,
/**
* Gets an encoding for the UTF-16 format using the little endian byte order.
*/
Unicode: Encoding,
/**
* Gets an encoding for the UTF-32 format using the little endian byte order.
*/
UTF32: Encoding,
/**
* Gets an encoding for the UTF-7 format.
*/
UTF7: Encoding,
/**
* Gets an encoding for the UTF-8 format.
*/
UTF8: Encoding,
}
type Encoding {
Preamble: ReadOnlySpan<byte>,
BodyName: string,
EncodingName: string,
HeaderName: string,
WebName: string,
WindowsCodePage: int,
IsBrowserDisplay: bool,
IsBrowserSave: bool,
IsMailNewsDisplay: bool,
IsMailNewsSave: bool,
IsSingleByte: bool,
EncoderFallback: EncoderFallback,
DecoderFallback: DecoderFallback,
IsReadOnly: bool,
CodePage: int,
/**
* When overridden in a derived class, calculates the number of bytes produced by encoding the characters in the specified string.
*/
function GetByteCount(s: string): int,
/**
* When overridden in a derived class, encodes all the characters in the specified string into a sequence of bytes.
*/
function GetBytes(s: string): byte[],
/**
* When overridden in a derived class, decodes all the bytes in the specified byte array into a string.
*/
function GetString(bytes: byte[]): string,
}Example:
{{FileSystem}}
FileSystem is a FileSystemService
Must be enabled with FileSystemExtensions.RegisterFileSystem before available
Structure:
/**
* Must be enabled with FileSystemExtensions.RegisterFileSystem before available
*/
type FileSystemService {
File: FileSystemFileService,
}
type FileSystemFileService {
/**
* Opens a file, appends the specified string to the file, and then closes the file. If the file does not exist, this method creates a file, writes the specified string to the file, then closes the file.
*/
function AppendAllText(path: string, contents: string, encoding: Encoding): Void,
/**
* Copies an existing file to a new file. Overwriting a file of the same name is not allowed.
*/
function Copy(sourceFileName: string, destinationFileName: string, overwrite: bool): Void,
/**
* Creates or overwrites a file in the specified path.
*/
function Create(fileName: string): Void,
/**
* Deletes the specified file.
*/
function Delete(fileName: string): Void,
/**
* Determines whether the specified file exists.
*/
function Exists(fileName: string): bool,
/**
* Returns the creation date and time of the specified file or directory.
*/
function GetCreationTime(fileName: string): DateTime,
/**
* Returns the creation date and time, in coordinated universal time (UTC), of the specified file or directory.
*/
function GetCreationTimeUtc(fileName: string): DateTime,
/**
* Returns the date and time the specified file or directory was last accessed.
*/
function GetLastAccessTime(fileName: string): DateTime,
/**
* Returns the date and time, in coordinated universal time (UTC), that the specified file or directory was last accessed.
*/
function GetLastAccessTimeUtc(fileName: string): DateTime,
/**
* Returns the date and time the specified file or directory was last written to.
*/
function GetLastWriteTime(fileName: string): DateTime,
/**
* Returns the date and time, in coordinated universal time (UTC), that the specified file or directory was last written to.
*/
function GetLastWriteTimeUtc(fileName: string): DateTime,
/**
* Moves a specified file to a new location, providing the options to specify a new file name and to overwrite the destination file if it already exists.
*/
function Move(sourceFileName: string, destinationFileName: string): Void,
/**
* Opens a binary file, reads the contents of the file into a byte array, and then closes the file.
*/
function ReadAllBytes(fileName: string): byte[],
/**
* Opens a text file, reads all the text in the file, and then closes the file.
*/
function ReadAllText(fileName: string, encoding: Encoding): string,
/**
* Opens a file, reads all lines of the file with the specified encoding, and then closes the file.
*/
function ReadAllTextLines(fileName: string, encoding: Encoding): string[],
}Services are availble for your formatters to inject but can also directly invoked from your template via the $services variable.
Example:
{{$services.HashService}}
Structure:
type HashService {
Md5: HashAlgorithm,
Sha1: HashAlgorithm,
Sha256: HashAlgorithm,
Sha384: HashAlgorithm,
Sha512: HashAlgorithm,
/**
* Hashes the argument with the set HashAlgorithm
*/
function HashWith(hashAlgorithm: HashAlgorithm, data: byte[]): byte[],
/**
* Hashes the argument with the set HashAlgorithm and the set Encoding
*/
function HashWith(hashAlgorithm: HashAlgorithm, data: string, encoding: Encoding): byte[],
/**
* Hashes the argument with Md5
*/
function HashWithMd5(data: byte[]): byte[],
/**
* Hashes the argument with Sha1
*/
function HashWithSha1(data: byte[]): byte[],
/**
* Hashes the argument with Sha256
*/
function HashWithSha256(data: byte[]): byte[],
/**
* Hashes the argument with Sha384
*/
function HashWithSha384(data: byte[]): byte[],
/**
* Hashes the argument with Sha512
*/
function HashWithSha512(data: byte[]): byte[],
/**
* Hashes the argument as UTF8 with Md5
*/
function HashWithMd5Utf8(data: string): byte[],
/**
* Hashes the argument as UTF8 with Sha1
*/
function HashWithSha1Utf8(data: string): byte[],
/**
* Hashes the argument as UTF8 with Sha256
*/
function HashWithSha256Utf8(data: string): byte[],
/**
* Hashes the argument as UTF8 with Sha384
*/
function HashWithSha384Utf8(data: string): byte[],
/**
* Hashes the argument as UTF8 with Sha512
*/
function HashWithSha512Utf8(data: string): byte[],
}Example:
{{$services.CryptService}}
Structure:
type CryptService {
Aes: IMorestachioCryptographyService,
}
type IMorestachioCryptographyService {
Name: string,
/**
* Encrypts the byte[] using the password byte[]. Hint: use the {{Encoding}} constant to convert a string to a byte[]
*/
function Encrypt(value: byte[], password: byte[]): byte[],
/**
* Decrypts the byte[] using the password byte[]. Hint: use the {{Encoding}} constant to convert a string to a byte[]
*/
function Decrypt(value: byte[], password: byte[]): byte[],
}Example:
{{$services.Localization}}
Localization is a IMorestachioLocalizationService
Structure:
type IMorestachioLocalizationService {
}Example:
{{$services.FileSystem}}
FileSystem is a FileSystemService
Must be enabled with FileSystemExtensions.RegisterFileSystem before available
Structure:
/**
* Must be enabled with FileSystemExtensions.RegisterFileSystem before available
*/
type FileSystemService {
File: FileSystemFileService,
}
type FileSystemFileService {
/**
* Opens a file, appends the specified string to the file, and then closes the file. If the file does not exist, this method creates a file, writes the specified string to the file, then closes the file.
*/
function AppendAllText(path: string, contents: string, encoding: Encoding): Void,
/**
* Copies an existing file to a new file. Overwriting a file of the same name is not allowed.
*/
function Copy(sourceFileName: string, destinationFileName: string, overwrite: bool): Void,
/**
* Creates or overwrites a file in the specified path.
*/
function Create(fileName: string): Void,
/**
* Deletes the specified file.
*/
function Delete(fileName: string): Void,
/**
* Determines whether the specified file exists.
*/
function Exists(fileName: string): bool,
/**
* Returns the creation date and time of the specified file or directory.
*/
function GetCreationTime(fileName: string): DateTime,
/**
* Returns the creation date and time, in coordinated universal time (UTC), of the specified file or directory.
*/
function GetCreationTimeUtc(fileName: string): DateTime,
/**
* Returns the date and time the specified file or directory was last accessed.
*/
function GetLastAccessTime(fileName: string): DateTime,
/**
* Returns the date and time, in coordinated universal time (UTC), that the specified file or directory was last accessed.
*/
function GetLastAccessTimeUtc(fileName: string): DateTime,
/**
* Returns the date and time the specified file or directory was last written to.
*/
function GetLastWriteTime(fileName: string): DateTime,
/**
* Returns the date and time, in coordinated universal time (UTC), that the specified file or directory was last written to.
*/
function GetLastWriteTimeUtc(fileName: string): DateTime,
/**
* Moves a specified file to a new location, providing the options to specify a new file name and to overwrite the destination file if it already exists.
*/
function Move(sourceFileName: string, destinationFileName: string): Void,
/**
* Opens a binary file, reads the contents of the file into a byte array, and then closes the file.
*/
function ReadAllBytes(fileName: string): byte[],
/**
* Opens a text file, reads all the text in the file, and then closes the file.
*/
function ReadAllText(fileName: string, encoding: Encoding): string,
/**
* Opens a file, reads all lines of the file with the specified encoding, and then closes the file.
*/
function ReadAllTextLines(fileName: string, encoding: Encoding): string[],
}Example:
{{$services.Formatters}}
Formatters is a IMorestachioFormatterService
Structure:
type IMorestachioFormatterService {
Constants: IDictionary<string, object>,
Services: ServiceCollection,
AllParametersAllDefaultValue: bool,
ValueConverter: IEnumerable<IFormatterValueConverter>,
}
type ServiceCollection {
}
type IFormatterValueConverter {
}Example:
{{$services.IServiceContainer}}
Structure:
type IServiceContainer {
}Example:
{{$services.ServiceCollection}}
Structure:
type ServiceCollection {
}Formatters are extensions for your data and can be invoked on the SourceObject with the given set of arguments
-
AbsfunctionAddfunctionDividefunctionEqualsfunctionGreaterOrEqualsfunctionGreaterThenfunctionIsNaNfunctionLessThenfunctionLogfunctionMaxfunctionMinfunctionModulofunctionMultiplyfunctionNegatefunctionParsefunctionPowfunctionRoundfunctionSamefunctionShiftLeftfunctionShiftRightfunctionSmallerOrEqualsfunctionSubtractfunctionToBytesfunctionUnEqualsfunction
-
AddfunctionAggregatefunctionsAllfunctionAnyfunctionCountfunctionFirstfunctionFirstOrDefaultfunctionGroupByfunctionInsertfunctionLastfunctionLastOrDefaultfunctionOrderByfunctionsRemovefunctionRemoveAtfunctionSelectfunctionSelectManyfunctionSinglefunctionSingleOrDefaultfunctionsSkipWhilefunctionTakeWhilefunctionThenByfunctionsToListfunctionWherefunctionWithfunction
-
AddfunctionDividefunctionEqualsfunctionFromDaysfunctionsFromHoursfunctionsFromMillisecondsfunctionsFromMinutesfunctionsFromSecondsfunctionsFromTicksfunctionsGreaterOrEqualsfunctionGreaterThenfunctionLessOrEqualsfunctionLessThenfunctionMultiplyfunctionNegatefunctionParseTimeSpanfunctionsParseTimeSpanExactfunctionsSubtractfunctionUnEqualsfunction
-
AppendfunctionsAsAsciifunctionAsUnicodefunctionAsUtf32functionAsUtf8functionCapitalizefunctionCapitalizeWordsfunctionContainsfunctionEndsWithfunctionFromBase64functionJoinfunctionPadLeftfunctionPadRightfunctionRemovefunctionsReplacefunctionSplitfunctionStartsWithfunctionSubstringfunctionsToBase64functionToLowerfunctionToUpperfunctionTrimfunctionTrimEndfunctionTrimStartfunctionTruncatefunction
-
AggregatefunctionAnyfunctionCompactfunctionConcatfunctionContainsfunctionCountfunctionDefaultIfEmptyfunctionDistinctfunctionElementAtfunctionElementAtOrDefaultfunctionExceptfunctionFirstfunctionFirstOrDefaultfunctionGroupByListfunctionIntersectfunctionLastfunctionLastOrDefaultfunctionMaxfunctionMinfunctionPartitionfunctionRangefunctionRepeatfunctionReversefunctionSequenceEqualfunctionSinglefunctionSkipfunctionTakefunctionUnionfunction
-
AggregatefunctionAllfunctionAnyfunctionsAveragefunctionCastfunctionCountfunctionFirstfunctionFirstOrDefaultfunctionGroupByfunctionGroupJoinfunctionJoinfunctionLastfunctionLastOrDefaultfunctionOrderByfunctionsSelectfunctionSelectManyfunctionSinglefunctionSingleOrDefaultfunctionsSkipWhilefunctionSumfunctionTakeWhilefunctionThenByfunctionWherefunction
Example: Inflect(Number count, string singular, string plural, bool includeCount)
FormatterName: Inflect
Arguments:
-
Number: count -
string: singular -
string: plural -
bool: includeCount
Returns: string
Description:
Returns either the singular or plural inflection of a word based on the given count
Must be Setup using the IMorestachioLocalizationService service
Example: Loc(string key, object[] arguments)
FormatterName: Loc
Arguments:
-
string: key -
[RestParameter]object[]: arguments
Returns: object
Description:
Translates the given key in the current Culture
Must be Setup using the IMorestachioLocalizationService service
Example: (string).Loc(object[] arguments)
FormatterName: Loc
Arguments:
-
[SourceObject]string: key -
[RestParameter]object[]: arguments
Returns: object
Description:
Translates the given key in the current Culture
Must be Setup using the IMorestachioLocalizationService service
Example: (IDictionary<string, object>).AsObject()
FormatterName: AsObject
Arguments:
-
[SourceObject]IDictionary<string, object>: value
Returns: object
Description:
Wraps an IDictionary as an object
Example: AsObject(IDictionary<string, object> value)
FormatterName: AsObject
Arguments:
-
IDictionary<string, object>: value
Returns: object
Description:
Wraps an IDictionary as an object
Example: (object).Call(string formatterName, object[] arguments)
FormatterName: Call
Arguments:
-
[SourceObject]object: source -
string: formatterName -
[RestParameter]object[]: arguments
Returns: Task<object>
Description:
Calls a formatter by dynamically providing name and arguments
Example: (IDictionary<T, TE>).Combine(IDictionary<T, TE> other)
FormatterName: Combine
Arguments:
-
[SourceObject]IDictionary<T, TE>: source -
IDictionary<T, TE>: other
Returns: IDictionary<T, TE>
Description:
Combines two objects together were the other one overwrites any value from the source in the new object
Example: (IFormattable).ToString(string argument)
FormatterName: ToString
Arguments:
-
[SourceObject]IFormattable: source -
string: argument
Returns: string
Description:
Formats a value according to the structure set by the argument
Example: (object).ToString()
FormatterName: ToString
Arguments:
-
[SourceObject]object: source
Returns: string
Description:
Formats the value according to the build in rules for that object
Example: (Type).TypeName()
FormatterName: TypeName
Arguments:
-
[SourceObject]Type: type
Returns: string
Description:
Formats a Type according to the structure set by the argument
Example: (object).Get(string propertyName)
FormatterName: Get
Arguments:
-
[SourceObject]object: source -
string: propertyName
Returns: object
Description:
Gets a specific property from an object or IDictionary
Example: new(FormatterParameterList values)
FormatterName: new
Arguments:
-
[RestParameter]FormatterParameterList: values
Returns: object
Description:
Creates a new object from given parameters with names. Example: {{new([Name]"Test", [Age] 57, [Gender] Genders.Male)}}
Example: (object).ToXml()
FormatterName: ToXml
Arguments:
-
[SourceObject]object: source
Returns: string
Example: (Number).Abs()
FormatterName: Abs
Arguments:
-
[SourceObject]Number: left
Returns: Number
Description:
Gets the Absolute value
Example: (Number).Add(Number right)
FormatterName: Add | Plus | +
Arguments:
-
[SourceObject]Number: left -
Number: right
Returns: Number
Description:
Adds two numbers
Example: (Number).Divide(Number right)
FormatterName: Divide | /
Arguments:
-
[SourceObject]Number: left -
Number: right
Returns: Number
Description:
Divides two numbers
Example: (Number).Equals(Number right)
FormatterName: Equals | ==
Arguments:
-
[SourceObject]Number: left -
Number: right
Returns: bool
Description:
Checks if the two numbers are equal to each other
Example: (Number).GreaterOrEquals(Number right)
FormatterName: GreaterOrEquals | >=
Arguments:
-
[SourceObject]Number: left -
Number: right
Returns: bool
Description:
Checks if the source number is bigger as the other number
Example: (Number).BiggerAs(Number right)
FormatterName: BiggerAs | GreaterThen | >
Arguments:
-
[SourceObject]Number: left -
Number: right
Returns: bool
Description:
Checks if the source number is bigger as the other number
Example: (Number).IsNaN()
FormatterName: IsNaN
Arguments:
-
[SourceObject]Number: left
Returns: bool
Description:
Gets if the current number object is not a number
Example: (Number).SmallerAs(Number right)
FormatterName: SmallerAs | SmallerThan | LessThen | <
Arguments:
-
[SourceObject]Number: left -
Number: right
Returns: bool
Description:
Checks if the source number is smaller as the other number
Example: (Number).Log(Number right)
FormatterName: Log
Arguments:
-
[SourceObject]Number: left -
Number: right
Returns: Number
Example: (Number).Max(Number right)
FormatterName: Max | <?
Arguments:
-
[SourceObject]Number: left -
Number: right
Returns: Number
Description:
Returns the bigger of the two numbers
Example: (Number).Min(Number right)
FormatterName: Min | >?
Arguments:
-
[SourceObject]Number: left -
Number: right
Returns: Number
Description:
Returns the smaller of the two numbers
Example: (Number).Modulo(Number right)
FormatterName: Modulo | %
Arguments:
-
[SourceObject]Number: left -
Number: right
Returns: Number
Description:
Modulo two numbers
Example: (Number).Multiply(Number right)
FormatterName: Multiply | *
Arguments:
-
[SourceObject]Number: left -
Number: right
Returns: Number
Description:
Multiplies two numbers
Example: (Number).Negate()
FormatterName: Negate
Arguments:
-
[SourceObject]Number: left
Returns: Number
Description:
Negates the current value
Example: ParseNumber(string text)
FormatterName: ParseNumber
Arguments:
-
string: text
Returns: Number
Description:
Parses a string into a number. Returns NaN if invalid
Example: (Number).Pow(Number right)
FormatterName: Pow | ^
Arguments:
-
[SourceObject]Number: left -
Number: right
Returns: Number
Description:
Gets this number power the times of the other number
Example: (Number).Round(Number right)
FormatterName: Round
Arguments:
-
[SourceObject]Number: left -
Number: right
Returns: Number
Description:
Rounds a double-precision floating-point value to a specified number of fractional digits.
Example: (Number).Same(Number right)
FormatterName: Same
Arguments:
-
[SourceObject]Number: left -
Number: right
Returns: bool
Description:
Checks if the two numbers are the same
Example: (Number).ShiftLeft(Number right)
FormatterName: ShiftLeft | <<
Arguments:
-
[SourceObject]Number: left -
Number: right
Returns: Number
Description:
Shift two numbers
Example: (Number).ShiftRight(Number right)
FormatterName: ShiftRight | >>
Arguments:
-
[SourceObject]Number: left -
Number: right
Returns: Number
Description:
Shift two numbers
Example: (Number).SmallerOrEquals(Number right)
FormatterName: SmallerOrEquals | <=
Arguments:
-
[SourceObject]Number: left -
Number: right
Returns: bool
Description:
Checks if the source number is smaller as the other number
Example: (Number).Subtract(Number right)
FormatterName: Subtract | Minus | -
Arguments:
-
[SourceObject]Number: left -
Number: right
Returns: Number
Description:
Subtracts two numbers
Example: (Number).ToBytes(Number? decimalPlaces)
FormatterName: ToBytes
Arguments:
-
[SourceObject]Number: value -
Number?``[Optional]: decimalPlaces
Returns: string
Description:
Format a number to it's equivalent in bytes.
Example: (Number).UnEquals(Number right)
FormatterName: UnEquals | !=
Arguments:
-
[SourceObject]Number: left -
Number: right
Returns: bool
Description:
Checks if the two numbers are equal to each other
Example: (DateTime).Add(TimeSpan timespan)
FormatterName: Add | +
Arguments:
-
[SourceObject]DateTime: dateTime -
TimeSpan: timespan
Returns: DateTime
Description:
Adds the TimeSpan to the given DateTime
Example: (DateTimeOffset).Add(TimeSpan timespan)
FormatterName: Add | +
Arguments:
-
[SourceObject]DateTimeOffset: dateTime -
TimeSpan: timespan
Returns: DateTimeOffset
Description:
Adds the TimeSpan to the given DateTime
Example: DateTimeNow()
FormatterName: DateTimeNow
Returns: DateTime
Description:
Gets a DateTime object representing the current time
Example: DateTimeOffsetNow()
FormatterName: DateTimeOffsetNow
Returns: DateTimeOffset
Description:
Gets a DateTime object representing the current time
Example: DaysInMonth(Number year, Number month)
FormatterName: DaysInMonth
Arguments:
-
Number: year -
Number: month
Returns: int
Description:
Gets the Days in a given Month of the year
Example: IsLeapYear(Number year)
FormatterName: IsLeapYear
Arguments:
-
Number: year
Returns: bool
Description:
Gets if the given year is a leap year
Example: (string).ToDateTime()
FormatterName: ToDateTime
Arguments:
-
[SourceObject]string: text
Returns: DateTime
Description:
Converts the string representation of a date and time to its DateTime equivalent.
Example: DateTime(string text)
FormatterName: DateTime
Arguments:
-
string: text
Returns: DateTime
Description:
Converts the string representation of a date and time to its DateTime equivalent.
Example: (string).ToDateTimeOffset()
FormatterName: ToDateTimeOffset
Arguments:
-
[SourceObject]string: text
Returns: DateTimeOffset
Description:
Converts the string representation of a date and time to its DateTime equivalent.
Example: DateTimeOffset(string text)
FormatterName: DateTimeOffset
Arguments:
-
string: text
Returns: DateTimeOffset
Description:
Converts the string representation of a date and time to its DateTime equivalent.
Example: (string).ToExactDateTime(string format)
FormatterName: ToExactDateTime
Arguments:
-
[SourceObject]string: text -
string: format
Returns: DateTime
Description:
Converts the string representation of a date and time to its DateTime equivalent using the specified format and culture-specific format information. The format of the string representation must match the specified format exactly.
Example: ExactDateTime(string text, string format)
FormatterName: ExactDateTime
Arguments:
-
string: text -
string: format
Returns: DateTime
Description:
Converts the string representation of a date and time to its DateTime equivalent using the specified format and culture-specific format information. The format of the string representation must match the specified format exactly.
Example: (string).ToExactDateTimeOffset(string format)
FormatterName: ToExactDateTimeOffset
Arguments:
-
[SourceObject]string: text -
string: format
Returns: DateTimeOffset
Description:
Converts the string representation of a date and time to its DateTime equivalent using the specified format and culture-specific format information. The format of the string representation must match the specified format exactly.
Example: ExactDateTimeOffset(string text, string format)
FormatterName: ExactDateTimeOffset
Arguments:
-
string: text -
string: format
Returns: DateTimeOffset
Description:
Converts the string representation of a date and time to its DateTime equivalent using the specified format and culture-specific format information. The format of the string representation must match the specified format exactly.
Example: (DateTimeOffset).WeekOfDate()
FormatterName: WeekOfDate
Arguments:
-
[SourceObject]DateTimeOffset: time
Returns: int
Description:
Gets the week of the given DateTime
Example: (DateTime).WeekOfDate()
FormatterName: WeekOfDate
Arguments:
-
[SourceObject]DateTime: time
Returns: int
Description:
Gets the week of the given DateTime
Example: (IList<T>).Add(object[] toBeAdded)
FormatterName: Add
Arguments:
-
[SourceObject]IList<T>: sourceCollection -
[RestParameter]object[]: toBeAdded
Returns: IList<T>
Description:
Adds the values to the SourceCollection
Example: (IEnumerable<T>).Aggregate(MorestachioTemplateExpression expression)
FormatterName: Aggregate
Arguments:
-
[SourceObject]IEnumerable<T>: items -
MorestachioTemplateExpression: expression
Returns: T
Description:
Counts all items that matches the predicate
Example: (IEnumerable<T>).ToArray()
FormatterName: ToArray
Arguments:
-
[SourceObject]IEnumerable<T>: items
Returns: T[]
Description:
Enumerates the list of items to a fixed size array
Example: (IEnumerable<T>).All(MorestachioTemplateExpression expression)
FormatterName: All
Arguments:
-
[SourceObject]IEnumerable<T>: items -
MorestachioTemplateExpression: expression
Returns: bool
Description:
returns if All elements in the collection matches the condition
Example: (IEnumerable<T>).Any(MorestachioTemplateExpression expression)
FormatterName: Any
Arguments:
-
[SourceObject]IEnumerable<T>: items -
MorestachioTemplateExpression: expression
Returns: bool
Description:
returns if Any elements in the collection matches the condition
Example: (IEnumerable<T>).Count(MorestachioTemplateExpression expression)
FormatterName: Count
Arguments:
-
[SourceObject]IEnumerable<T>: items -
MorestachioTemplateExpression: expression
Returns: int
Description:
Counts all items that matches the predicate
Example: (IEnumerable<T>).First(MorestachioTemplateExpression expression)
FormatterName: First
Arguments:
-
[SourceObject]IEnumerable<T>: items -
MorestachioTemplateExpression: expression
Returns: T
Description:
Selected the first item that matches the condition
Example: (IEnumerable<T>).FirstOrDefault(MorestachioTemplateExpression expression)
FormatterName: FirstOrDefault
Arguments:
-
[SourceObject]IEnumerable<T>: items -
MorestachioTemplateExpression: expression
Returns: T
Description:
Selected the first item that matches the condition
Example: (IEnumerable<T>).GroupBy(MorestachioTemplateExpression expression)
FormatterName: GroupBy
Arguments:
-
[SourceObject]IEnumerable<T>: items -
MorestachioTemplateExpression: expression
Returns: IEnumerable<IGrouping<TE, T>>
Description:
Groups a list
Example: (IList<T>).Insert(int index, object[] toBeInserted)
FormatterName: Insert
Arguments:
-
[SourceObject]IList<T>: sourceCollection -
int: index -
[RestParameter]object[]: toBeInserted
Returns: IList<T>
Description:
Inserts a value at the specified index in the SourceCollection.
Example: (IEnumerable<T>).Last(MorestachioTemplateExpression expression)
FormatterName: Last
Arguments:
-
[SourceObject]IEnumerable<T>: items -
MorestachioTemplateExpression: expression
Returns: T
Description:
Gets the Last item in the list that matches the predicate
Example: (IEnumerable<T>).Last(MorestachioTemplateExpression expression)
FormatterName: Last
Arguments:
-
[SourceObject]IEnumerable<T>: items -
MorestachioTemplateExpression: expression
Returns: T
Description:
Gets the Last item in the list that matches the predicate
Example: (IEnumerable<T>).OrderBy(MorestachioTemplateExpression expression)
FormatterName: OrderBy
Arguments:
-
[SourceObject]IEnumerable<T>: items -
MorestachioTemplateExpression: expression
Returns: IEnumerable<T>
Description:
Orders the list descending
Example: (IEnumerable<T>).OrderBy()
FormatterName: OrderBy
Arguments:
-
[SourceObject]IEnumerable<T>: items
Returns: IEnumerable<T>
Description:
Orders the list descending
Example: (IList<T>).Remove(object[] toBeRemoved)
FormatterName: Remove
Arguments:
-
[SourceObject]IList<T>: sourceCollection -
[RestParameter]object[]: toBeRemoved
Returns: IList<T>
Description:
Removes an element from the SourceCollection
Example: (IList<T>).RemoveAt(int index)
FormatterName: RemoveAt
Arguments:
-
[SourceObject]IList<T>: sourceCollection -
int: index
Returns: IList<T>
Description:
Removes an element at the specified index from the input list
Example: (IEnumerable<T>).Select(MorestachioTemplateExpression expression)
FormatterName: Select
Arguments:
-
[SourceObject]IEnumerable<T>: items -
MorestachioTemplateExpression: expression
Returns: IEnumerable<TE>
Description:
Selects items from the collection based on the predicate
Example: (IEnumerable<T>).SelectMany(MorestachioTemplateExpression expression)
FormatterName: SelectMany
Arguments:
-
[SourceObject]IEnumerable<T>: items -
MorestachioTemplateExpression: expression
Returns: IEnumerable<TE>
Description:
Selects a list of items from the collection based on the predicate and flattens them
Example: (IEnumerable<T>).Single(MorestachioTemplateExpression expression)
FormatterName: Single
Arguments:
-
[SourceObject]IEnumerable<T>: items -
MorestachioTemplateExpression: expression
Returns: T
Description:
Gets the only item in the list that matches the predicate
Example: (IEnumerable<T>).SingleOrDefault()
FormatterName: SingleOrDefault
Arguments:
-
[SourceObject]IEnumerable<T>: items
Returns: T
Description:
Gets the only item in the list that matches the predicate
Example: (IEnumerable<T>).SingleOrDefault(MorestachioTemplateExpression expression)
FormatterName: SingleOrDefault
Arguments:
-
[SourceObject]IEnumerable<T>: items -
MorestachioTemplateExpression: expression
Returns: T
Description:
Gets the only item in the list that matches the predicate
Example: (IEnumerable<T>).SkipWhile(MorestachioTemplateExpression expression)
FormatterName: SkipWhile
Arguments:
-
[SourceObject]IEnumerable<T>: items -
MorestachioTemplateExpression: expression
Returns: IEnumerable<T>
Description:
Skips items from the collection as long as the predicate is true
Example: (IEnumerable<T>).TakeWhile(MorestachioTemplateExpression expression)
FormatterName: TakeWhile
Arguments:
-
[SourceObject]IEnumerable<T>: items -
MorestachioTemplateExpression: expression
Returns: IEnumerable<T>
Description:
Takes items from the collection as long as the predicate is true
Example: (IOrderedEnumerable<T>).ThenBy()
FormatterName: ThenBy
Arguments:
-
[SourceObject]IOrderedEnumerable<T>: items
Returns: IEnumerable<T>
Description:
Orders the list descending
Example: (IOrderedEnumerable<T>).ThenBy(MorestachioTemplateExpression expression)
FormatterName: ThenBy
Arguments:
-
[SourceObject]IOrderedEnumerable<T>: items -
MorestachioTemplateExpression: expression
Returns: IEnumerable<T>
Description:
Orders the list descending
Example: ToList(object[] items)
FormatterName: ToList
Arguments:
-
[RestParameter]object[]: items
Returns: IList<T>
Description:
Gets any number of elements and returns a new list containing those elements
Example: (IEnumerable<T>).Where(MorestachioTemplateExpression expression)
FormatterName: Where
Arguments:
-
[SourceObject]IEnumerable<T>: items -
MorestachioTemplateExpression: expression
Returns: IEnumerable<T>
Description:
Filteres the collection based on the predicate
Example: With(object[] toBeAdded)
FormatterName: With
Arguments:
-
[RestParameter]object[]: toBeAdded
Returns: IList
Description:
Creates a new List object with the given values
Example: (TimeSpan).Add(TimeSpan timespan)
FormatterName: Add | +
Arguments:
-
[SourceObject]TimeSpan: timeSpan -
TimeSpan: timespan
Returns: TimeSpan
Description:
Adds the TimeSpan to the given TimeSpan
Example: (TimeSpan).Divide(Number factor)
FormatterName: Divide | /
Arguments:
-
[SourceObject]TimeSpan: timeSpan -
Number: factor
Returns: TimeSpan
Description:
Divides the TimeSpan to the given Number
Example: (TimeSpan).Equals(TimeSpan timespan)
FormatterName: Equals | ==
Arguments:
-
[SourceObject]TimeSpan: timeSpan -
TimeSpan: timespan
Returns: bool
Description:
Checks if the two TimeSpan are equal to each other
Example: (Number).TimeSpanFromDays()
FormatterName: TimeSpanFromDays
Arguments:
-
[SourceObject]Number: days
Returns: TimeSpan
Description:
Parses a number of Days into a TimeSpan
Example: TimeSpanFromDays(Number days)
FormatterName: TimeSpanFromDays
Arguments:
-
Number: days
Returns: TimeSpan
Description:
Parses a number of Days into a TimeSpan
Example: (Number).TimeSpanFromHours()
FormatterName: TimeSpanFromHours
Arguments:
-
[SourceObject]Number: days
Returns: TimeSpan
Description:
Parses a number of Hours into a TimeSpan
Example: TimeSpanFromHours(Number days)
FormatterName: TimeSpanFromHours
Arguments:
-
Number: days
Returns: TimeSpan
Description:
Parses a number of Hours into a TimeSpan
Example: (Number).TimeSpanFromMilliseconds()
FormatterName: TimeSpanFromMilliseconds
Arguments:
-
[SourceObject]Number: days
Returns: TimeSpan
Description:
Parses a number of Milliseconds into a TimeSpan
Example: TimeSpanFromMilliseconds(Number days)
FormatterName: TimeSpanFromMilliseconds
Arguments:
-
Number: days
Returns: TimeSpan
Description:
Parses a number of Milliseconds into a TimeSpan
Example: (Number).TimeSpanFromMinutes()
FormatterName: TimeSpanFromMinutes
Arguments:
-
[SourceObject]Number: days
Returns: TimeSpan
Description:
Parses a number of Minutes into a TimeSpan
Example: TimeSpanFromMinutes(Number days)
FormatterName: TimeSpanFromMinutes
Arguments:
-
Number: days
Returns: TimeSpan
Description:
Parses a number of Minutes into a TimeSpan
Example: (Number).TimeSpanFromSeconds()
FormatterName: TimeSpanFromSeconds
Arguments:
-
[SourceObject]Number: days
Returns: TimeSpan
Description:
Parses a number of Seconds into a TimeSpan
Example: TimeSpanFromSeconds(Number days)
FormatterName: TimeSpanFromSeconds
Arguments:
-
Number: days
Returns: TimeSpan
Description:
Parses a number of Seconds into a TimeSpan
Example: (Number).TimeSpanFromTicks()
FormatterName: TimeSpanFromTicks
Arguments:
-
[SourceObject]Number: days
Returns: TimeSpan
Description:
Parses a number of Ticks into a TimeSpan
Example: TimeSpanFromTicks(Number days)
FormatterName: TimeSpanFromTicks
Arguments:
-
Number: days
Returns: TimeSpan
Description:
Parses a number of Ticks into a TimeSpan
Example: (TimeSpan).GreaterOrEquals(TimeSpan timespan)
FormatterName: GreaterOrEquals | >=
Arguments:
-
[SourceObject]TimeSpan: timeSpan -
TimeSpan: timespan
Returns: bool
Description:
Checks if the source TimeSpan is bigger or equals as the other TimeSpan
Example: (TimeSpan).GreaterThen(TimeSpan timespan)
FormatterName: GreaterThen | >
Arguments:
-
[SourceObject]TimeSpan: timeSpan -
TimeSpan: timespan
Returns: bool
Description:
Checks if the source TimeSpan is bigger as the other TimeSpan
Example: (TimeSpan).LessOrEquals(TimeSpan timespan)
FormatterName: <= | LessOrEquals
Arguments:
-
[SourceObject]TimeSpan: timeSpan -
TimeSpan: timespan
Returns: bool
Description:
Checks if the source TimeSpan is bigger as the other TimeSpan
Example: (TimeSpan).LessThen(TimeSpan timespan)
FormatterName: LessThen | <
Arguments:
-
[SourceObject]TimeSpan: timeSpan -
TimeSpan: timespan
Returns: bool
Description:
Checks if the source TimeSpan is smaller as the other TimeSpan
Example: (TimeSpan).Multiply(Number factor)
FormatterName: Multiply | *
Arguments:
-
[SourceObject]TimeSpan: timeSpan -
Number: factor
Returns: TimeSpan
Description:
Multiplies the TimeSpan to the given Number
Example: (TimeSpan).Negate()
FormatterName: Negate
Arguments:
-
[SourceObject]TimeSpan: timeSpan
Returns: TimeSpan
Description:
Negate the value of an TimeSpan
Example: (string).ToTimeSpan()
FormatterName: ToTimeSpan
Arguments:
-
[SourceObject]string: timespan
Returns: TimeSpan
Description:
Parses a string into a TimeSpan
Example: TimeSpan(string timespan)
FormatterName: TimeSpan
Arguments:
-
string: timespan
Returns: TimeSpan
Description:
Parses a string into a TimeSpan
Example: (string).ToTimeSpanExact(string format)
FormatterName: ToTimeSpanExact
Arguments:
-
[SourceObject]string: timespan -
string: format
Returns: TimeSpan
Description:
Converts the string representation of a time interval to its TimeSpan equivalent by using the specified format and culture-specific format information.
Example: TimeSpanExact(string timespan, string format)
FormatterName: TimeSpanExact
Arguments:
-
string: timespan -
string: format
Returns: TimeSpan
Description:
Converts the string representation of a time interval to its TimeSpan equivalent by using the specified format and culture-specific format information.
Example: (TimeSpan).Subtract(TimeSpan timespan)
FormatterName: Subtract | -
Arguments:
-
[SourceObject]TimeSpan: timeSpan -
TimeSpan: timespan
Returns: TimeSpan
Description:
Subtracts the TimeSpan to the given TimeSpan
Example: (TimeSpan).UnEquals(TimeSpan timespan)
FormatterName: UnEquals | !=
Arguments:
-
[SourceObject]TimeSpan: timeSpan -
TimeSpan: timespan
Returns: bool
Description:
Checks if the two TimeSpan are not equal to each other
Example: (Worktime).Add(Worktime other)
FormatterName: Add
Arguments:
-
[SourceObject]Worktime: worktime -
Worktime: other
Returns: Worktime
Description:
Adds both worktimes together
Example: (Worktime).AddDays(Number number)
FormatterName: AddDays
Arguments:
-
[SourceObject]Worktime: worktime -
Number: number
Returns: Worktime
Description:
Adds the given amount of Days to the worktime
Example: (Worktime).AddHours(Number number)
FormatterName: AddHours
Arguments:
-
[SourceObject]Worktime: worktime -
Number: number
Returns: Worktime
Description:
Adds the given amount of Hours to the worktime
Example: (Worktime).AddMinutes(Number number)
FormatterName: AddMinutes
Arguments:
-
[SourceObject]Worktime: worktime -
Number: number
Returns: Worktime
Description:
Adds the given amount of Minutes to the worktime
Example: (Worktime).AddMonths(Number number, DateTime startingWith)
FormatterName: AddMonths
Arguments:
-
[SourceObject]Worktime: worktime -
Number: number -
DateTime: startingWith
Returns: Worktime
Description:
Adds the given amount of Months to the worktime. As all months have different days you have to specify which month to start with.
Example: (Worktime).AddSeconds(Number number)
FormatterName: AddSeconds
Arguments:
-
[SourceObject]Worktime: worktime -
Number: number
Returns: Worktime
Description:
Adds the given amount of Seconds to the worktime
Example: (Worktime).AddWeeks(Number number)
FormatterName: AddWeeks
Arguments:
-
[SourceObject]Worktime: worktime -
Number: number
Returns: Worktime
Description:
Adds the given amount of Weeks to the worktime
Example: Worktime()
FormatterName: Worktime
Returns: Worktime
Description:
Creates a new Worktime Object
Example: WorktimeFromTimespan(TimeSpan timespan)
FormatterName: WorktimeFromTimespan
Arguments:
-
TimeSpan: timespan
Returns: Worktime
Description:
Creates a new Worktime Object based on the Timespan
Example: (Money).Add(Money value)
FormatterName: Add | +
Arguments:
-
[SourceObject]Money: sourceValue -
Money: value
Returns: Money
Description:
Adds the value to a new money object and returns it
Example: (Worktime).GetMoney(double rate, MoneyChargeRate chargeRate)
FormatterName: GetMoney
Arguments:
-
[SourceObject]Worktime: worktime -
double: rate -
MoneyChargeRate: chargeRate
Returns: Money
Description:
Calculates the value of the worktime by taking the rate and chargerate
Example: (Worktime).GetMoney(double rate, MoneyChargeRate chargeRate, Currency currency)
FormatterName: GetMoney
Arguments:
-
[SourceObject]Worktime: worktime -
double: rate -
MoneyChargeRate: chargeRate -
Currency: currency
Returns: Money
Description:
Calculates the value of the worktime by taking the rate and chargerate
Example: (Money).GetTax(double value)
FormatterName: GetTax
Arguments:
-
[SourceObject]Money: worktime -
double: value
Returns: Money
Description:
Gets the amount of Tax for this money object
Example: Money(Number value)
FormatterName: Money
Arguments:
-
Number: value
Returns: Money
Description:
Creates a new Money Object
Example: Money(Number value, Currency currency)
FormatterName: Money
Arguments:
-
Number: value -
Currency: currency
Returns: Money
Description:
Creates a new Money Object
Example: ParseMoney(string text, CurrencyHandler handler)
FormatterName: ParseMoney
Arguments:
-
string: text -
CurrencyHandler``[Optional]: handler
Returns: Money
Description:
Parses a string to a money object
Example: (Money).Round()
FormatterName: Round
Arguments:
-
[SourceObject]Money: worktime
Returns: Money
Description:
Rounds the value using common commercial rules IEEE 754
Example: (Money).Substract(Money value)
FormatterName: - | Substract
Arguments:
-
[SourceObject]Money: sourceValue -
Money: value
Returns: Money
Description:
Substracts the value to a new money object and returns it
Example: (string).Append(string target)
FormatterName: + | Append
Arguments:
-
[SourceObject]string: source -
string: target
Returns: string
Description:
Concatenates two strings
Example: (object source) + (string target)
FormatterName: +
Arguments:
-
[SourceObject]object: source -
string: target
Returns: string
Description:
Concatenates two strings
Example: (string source) + (object target)
FormatterName: +
Arguments:
-
[SourceObject]string: source -
object: target
Returns: string
Description:
Concatenates two strings
Example: (string).AsAscii()
FormatterName: AsAscii
Arguments:
-
[SourceObject]string: source
Returns: byte[]
Description:
Decodes the string source as an ASCII encoded byte[]
Example: (string).AsUnicode()
FormatterName: AsUnicode
Arguments:
-
[SourceObject]string: source
Returns: byte[]
Description:
Decodes the string source as an Unicode encoded byte[]
Example: (string).AsUtf32()
FormatterName: AsUtf32
Arguments:
-
[SourceObject]string: source
Returns: byte[]
Description:
Decodes the string source as an UTF-32 encoded byte[]
Example: (string).AsUtf8()
FormatterName: AsUtf8
Arguments:
-
[SourceObject]string: source
Returns: byte[]
Description:
Decodes the string source as an UTF-8 encoded byte[]
Example: (string).Capitalize()
FormatterName: Capitalize
Arguments:
-
[SourceObject]string: source
Returns: string
Description:
Converts the first character of the passed string to a upper case character.
Example: (string).CapitalizeWords()
FormatterName: CapitalizeWords
Arguments:
-
[SourceObject]string: source
Returns: string
Description:
Converts the first character of each word in the passed string to a upper case character.
Example: (string).Contains(string target)
FormatterName: Contains
Arguments:
-
[SourceObject]string: source -
string: target
Returns: bool
Description:
Returns a boolean indicating whether the input string contains the specified string value.
Example: (string).EndsWith(string target)
FormatterName: EndsWith
Arguments:
-
[SourceObject]string: source -
string: target
Returns: bool
Description:
Returns a boolean indicating whether the input string ends with the specified string value.
Example: (string).FromBase64()
FormatterName: FromBase64
Arguments:
-
[SourceObject]string: source
Returns: string
Description:
Decodes a string from its Base64 representation the decoding is expected be the same as the template
Example: (IEnumerable<string>).Join(string seperator)
FormatterName: Join
Arguments:
-
[SourceObject]IEnumerable<string>: source -
string: seperator
Returns: string
Description:
Joins an Array of string together by using a seperator
Example: (string).PadLeft(int width)
FormatterName: PadLeft
Arguments:
-
[SourceObject]string: source -
int: width
Returns: string
Description:
Pads a string with leading spaces to a specified total length.
Example: (string).PadRight(int width)
FormatterName: PadRight
Arguments:
-
[SourceObject]string: source -
int: width
Returns: string
Description:
Pads a string with leading spaces to a specified total length.
Example: (string).Remove(int start, int count)
FormatterName: Remove
Arguments:
-
[SourceObject]string: source -
int: start -
int: count
Returns: string
Description:
Removes the range of substring from the string
Example: (string).Remove(string search)
FormatterName: Remove
Arguments:
-
[SourceObject]string: source -
string: search
Returns: string
Description:
Removes all occurrences of a substring from a string.
Example: (string).Replace(string search, string with)
FormatterName: Replace
Arguments:
-
[SourceObject]string: source -
string: search -
string: with
Returns: string
Description:
Replaces all occurrences of a substring from a string.
Example: (string).Split(object[] delimiters)
FormatterName: Split
Arguments:
-
[SourceObject]string: source -
[RestParameter]object[]: delimiters
Returns: string[]
Description:
Splits the string each time any delimiter is found
Example: (string).StartsWith(string target)
FormatterName: StartsWith
Arguments:
-
[SourceObject]string: source -
string: target
Returns: bool
Description:
Returns a boolean indicating whether the input string starts with the specified string value.
Example: (string).Substring(int start, int count)
FormatterName: Substring
Arguments:
-
[SourceObject]string: source -
int: start -
int: count
Returns: string
Description:
The slice returns a substring, starting at the specified index. An optional second parameter can be passed to specify the length of the substring. If no second parameter is given, a substring with the remaining characters will be returned.
Example: (string).Substring(int start)
FormatterName: Substring
Arguments:
-
[SourceObject]string: source -
int: start
Returns: string
Description:
The slice returns a substring, starting at the specified index. An optional second parameter can be passed to specify the length of the substring. If no second parameter is given, a substring with the remaining characters will be returned.
Example: (string).ToBase64()
FormatterName: ToBase64
Arguments:
-
[SourceObject]string: source
Returns: string
Description:
Encodes a string to its Base64 representation the encoding will be the same as the template
Example: (string).ToLower()
FormatterName: ToLower
Arguments:
-
[SourceObject]string: source
Returns: string
Description:
Converts the string to lower case.
Example: (string).ToUpper()
FormatterName: ToUpper
Arguments:
-
[SourceObject]string: source
Returns: string
Description:
Converts the string to upper case.
Example: (string).Trim()
FormatterName: Trim
Arguments:
-
[SourceObject]string: source
Returns: string
Description:
Trims all leading and tailing Whitespaces
Example: (string).TrimEnd()
FormatterName: TrimEnd
Arguments:
-
[SourceObject]string: source
Returns: string
Description:
Trims all tailing Whitespaces
Example: (string).TrimStart()
FormatterName: TrimStart
Arguments:
-
[SourceObject]string: source
Returns: string
Description:
Trims all leading Whitespaces
Example: (string).Truncate(int length, string ellipsis)
FormatterName: Truncate
Arguments:
-
[SourceObject]string: source -
int: length -
string``[Optional]: ellipsis
Returns: string
Description:
Truncates a string down to the number of characters passed as the first parameter. An ellipsis (...) is appended to the truncated string and is included in the character count
Example: (object).Equals(object target)
FormatterName: Equals | ==
Arguments:
-
[SourceObject]object: source -
object: target
Returns: bool
Description:
Checks if two objects are equal
Example: Equals(object source, object target)
FormatterName: Equals
Arguments:
-
object: source -
object: target
Returns: bool
Description:
Checks if two objects are equal
Example: (object source) != (object target)
FormatterName: !=
Arguments:
-
[SourceObject]object: source -
object: target
Returns: bool
Description:
Checks if two objects are not equal
Example: (object).ReferenceEquals(object target)
FormatterName: ReferenceEquals
Arguments:
-
[SourceObject]object: source -
object: target
Returns: bool
Description:
Checks if two objects are the same
Example: ReferenceEquals(object source, object target)
FormatterName: ReferenceEquals
Arguments:
-
object: source -
object: target
Returns: bool
Description:
Checks if two objects are the same
Example: (object).NullCoalescing(object right)
FormatterName: ?? | NullCoalescing
Arguments:
-
[SourceObject]object: left -
object: right
Returns: object
Description:
returns the value of its left-hand operand if it isn't null; otherwise, it evaluates the right-hand operand and returns its result
Example: NullCoalescing(object left, object right)
FormatterName: NullCoalescing
Arguments:
-
object: left -
object: right
Returns: object
Description:
returns the value of its left-hand operand if it isn't null; otherwise, it evaluates the right-hand operand and returns its result
Example: (bool).And(bool other)
FormatterName: And | &&
Arguments:
-
[SourceObject]bool: value -
bool: other
Returns: bool
Description:
Returns true if all values are true
Example: (bool).And(object[] values)
FormatterName: And
Arguments:
-
[SourceObject]bool: value -
[RestParameter]object[]: values
Returns: bool
Description:
Returns true if all values are true
Example: (bool).Negate()
FormatterName: Negate | Not | !
Arguments:
-
[SourceObject]bool: value
Returns: bool
Description:
Negates a Boolean value
Example: (bool).Or(bool other)
FormatterName: Or | ||
Arguments:
-
[SourceObject]bool: value -
bool: other
Returns: bool
Description:
Returns true any value is true
Example: (bool).Or(object[] values)
FormatterName: Or
Arguments:
-
[SourceObject]bool: value -
[RestParameter]object[]: values
Returns: bool
Description:
Returns true any value is true
Example: (string).ParseBool()
FormatterName: ParseBool
Arguments:
-
[SourceObject]string: value
Returns: bool
Description:
Parses a boolean from string by checking for the equality of ether '1', 'yes', 'true', 'valid'
Example: Log(string logLevel, string eventId, string message)
FormatterName: Log
Arguments:
-
string: logLevel -
string: eventId -
string: message
Returns: Void
Description:
Logs an Specific event
Must be first setup by setting the ParserOptions.Logger property
Example: LogCritical(string eventId, string message)
FormatterName: LogCritical
Arguments:
-
string: eventId -
string: message
Returns: Void
Description:
Logs an Specific event
Must be first setup by setting the ParserOptions.Logger property
Example: LogDebug(string eventId, string message)
FormatterName: LogDebug
Arguments:
-
string: eventId -
string: message
Returns: Void
Description:
Logs an Specific event
Must be first setup by setting the ParserOptions.Logger property
Example: LogDisable()
FormatterName: LogDisable
Returns: Void
Description:
Disables the logger
Must be first setup by setting the ParserOptions.Logger property
Example: LogEnable()
FormatterName: LogEnable
Returns: Void
Description:
Enables the logger
Must be first setup by setting the ParserOptions.Logger property
Example: LogError(string eventId, string message)
FormatterName: LogError
Arguments:
-
string: eventId -
string: message
Returns: Void
Description:
Logs an Specific event
Must be first setup by setting the ParserOptions.Logger property
Example: LogInfo(string eventId, string message)
FormatterName: LogInfo
Arguments:
-
string: eventId -
string: message
Returns: Void
Description:
Logs an Specific event
Must be first setup by setting the ParserOptions.Logger property
Example: LogTrace(string eventId, string message)
FormatterName: LogTrace
Arguments:
-
string: eventId -
string: message
Returns: Void
Description:
Logs an Specific event
Must be first setup by setting the ParserOptions.Logger property
Example: LogWarn(string eventId, string message)
FormatterName: LogWarn
Arguments:
-
string: eventId -
string: message
Returns: Void
Description:
Logs an Specific event
Must be first setup by setting the ParserOptions.Logger property
Example: (IEnumerable<T>).Aggregate(string delimiter)
FormatterName: Aggregate
Arguments:
-
[SourceObject]IEnumerable<T>: sourceCollection -
string: delimiter
Returns: string
Description:
Joins the element of a list separated by a delimiter string and return the concatenated string.
Example: (IEnumerable<T>).Any()
FormatterName: Any
Arguments:
-
[SourceObject]IEnumerable<T>: sourceCollection
Returns: bool
Description:
returns if there are any elements in the collection
Example: (IEnumerable<T>).Compact()
FormatterName: Compact
Arguments:
-
[SourceObject]IEnumerable<T>: sourceCollection
Returns: IEnumerable<T>
Description:
Removes any non-null values from the input list.
Example: (IEnumerable<T>).Concat(IEnumerable<T> targetCollection)
FormatterName: Concat
Arguments:
-
[SourceObject]IEnumerable<T>: sourceCollection -
IEnumerable<T>: targetCollection
Returns: IEnumerable
Description:
Concats two lists together
Example: (IEnumerable<T>).Contains(T arguments)
FormatterName: Contains
Arguments:
-
[SourceObject]IEnumerable<T>: sourceCollection -
T: arguments
Returns: bool
Description:
Searches in the list for that the argument
Example: (IEnumerable<T>).Count()
FormatterName: Count
Arguments:
-
[SourceObject]IEnumerable<T>: sourceCollection
Returns: int
Description:
Gets the count of the list
Example: (IEnumerable<T>).DefaultIfEmpty(T defaultValue)
FormatterName: DefaultIfEmpty
Arguments:
-
[SourceObject]IEnumerable<T>: sourceCollection -
T: defaultValue
Returns: IEnumerable<T>
Description:
If the source list is empty, the parameter will be returned instead
Example: (IEnumerable<T>).Distinct()
FormatterName: Distinct
Arguments:
-
[SourceObject]IEnumerable<T>: sourceCollection
Returns: IEnumerable
Description:
Filters duplicates from the list
Example: (IEnumerable<T>).ElementAt(int index)
FormatterName: ElementAt
Arguments:
-
[SourceObject]IEnumerable<T>: sourceCollection -
int: index
Returns: T
Description:
Gets the item in the list on the position
Example: (IEnumerable<T>).ElementAtOrDefault(int index)
FormatterName: ElementAtOrDefault
Arguments:
-
[SourceObject]IEnumerable<T>: sourceCollection -
int: index
Returns: T
Description:
Gets the item in the list on the position
Example: (IEnumerable<T>).Except(IEnumerable<T> targetCollection)
FormatterName: Except
Arguments:
-
[SourceObject]IEnumerable<T>: sourceCollection -
IEnumerable<T>: targetCollection
Returns: IEnumerable
Description:
Gets all items from the source list except for all items in the target list
Example: (IEnumerable<T>).First()
FormatterName: First
Arguments:
-
[SourceObject]IEnumerable<T>: sourceCollection
Returns: T
Description:
Selects the First item in the list
Example: (IEnumerable<T>).FirstOrDefault()
FormatterName: FirstOrDefault
Arguments:
-
[SourceObject]IEnumerable<T>: sourceCollection
Returns: T
Description:
Gets the first item in the list that matches the predicate
Example: (IGrouping<TKey, T>).FlatGroup()
FormatterName: FlatGroup
Arguments:
-
[SourceObject]IGrouping<TKey, T>: sourceCollection
Returns: IEnumerable<T>
Description:
Flattens the Group returned by group by
Example: (IEnumerable<T>).Intersect(IEnumerable<T> targetCollection)
FormatterName: Intersect
Arguments:
-
[SourceObject]IEnumerable<T>: sourceCollection -
IEnumerable<T>: targetCollection
Returns: IEnumerable
Description:
Gets the list of all duplicates from both lists
Example: (IEnumerable<T>).Last()
FormatterName: Last
Arguments:
-
[SourceObject]IEnumerable<T>: sourceCollection
Returns: T
Description:
Selects the Last item in the list
Example: (IEnumerable<T>).LastOrDefault()
FormatterName: LastOrDefault
Arguments:
-
[SourceObject]IEnumerable<T>: sourceCollection
Returns: T
Description:
Gets the Last item in the list that matches the predicate
Example: (IEnumerable<T>).Max()
FormatterName: Max
Arguments:
-
[SourceObject]IEnumerable<T>: sourceCollection
Returns: T
Description:
Called on a list of numbers it returns the biggest
Example: (IEnumerable<T>).Min()
FormatterName: Min
Arguments:
-
[SourceObject]IEnumerable<T>: sourceCollection
Returns: T
Description:
Called on a list of numbers it returns the smallest
Example: (IEnumerable<T>).Partition(Number size)
FormatterName: Partition
Arguments:
-
[SourceObject]IEnumerable<T>: source -
Number: size
Returns: IEnumerable<List<T>>
Description:
Splits the source into a list of lists equals the size of size
Example: (int).Range(int count)
FormatterName: Range
Arguments:
-
[SourceObject]int: start -
int: count
Returns: IEnumerable<int>
Description:
Generates a list of numbers
Example: (T).Repeat(int count)
FormatterName: Repeat
Arguments:
-
[SourceObject]T: element -
int: count
Returns: IEnumerable<T>
Description:
Creates a list of the given item
Example: (IEnumerable<T>).Reverse()
FormatterName: Reverse
Arguments:
-
[SourceObject]IEnumerable<T>: sourceCollection
Returns: IEnumerable
Description:
Reverses the order of all items in the list
Example: (IEnumerable<T>).SequenceEqual(IEnumerable<T> targetCollection)
FormatterName: SequenceEqual
Arguments:
-
[SourceObject]IEnumerable<T>: sourceCollection -
IEnumerable<T>: targetCollection
Returns: bool
Description:
Checks for all items of both lists for equality
Example: (IEnumerable<T>).Single()
FormatterName: Single
Arguments:
-
[SourceObject]IEnumerable<T>: sourceCollection
Returns: T
Description:
Selects the only item in the list
Example: (IEnumerable<T>).Skip(Number arguments)
FormatterName: Skip
Arguments:
-
[SourceObject]IEnumerable<T>: sourceCollection -
Number: arguments
Returns: IEnumerable<T>
Description:
Skips the amount of items in argument
Example: (IEnumerable<T>).Take(Number arguments)
FormatterName: Take
Arguments:
-
[SourceObject]IEnumerable<T>: sourceCollection -
Number: arguments
Returns: IEnumerable<T>
Description:
Takes the amount of items in argument
Example: (IEnumerable<T>).Union(IEnumerable<T> targetCollection)
FormatterName: Union
Arguments:
-
[SourceObject]IEnumerable<T>: sourceCollection -
IEnumerable<T>: targetCollection
Returns: IEnumerable
Description:
Creates a new list that contains all unqiue items from both lists
Example: (IEnumerable<T>).Aggregate(string function, string member)
FormatterName: Aggregate
Arguments:
-
[SourceObject]IEnumerable<T>: sourceCollection -
string: function -
string: member
Returns: object
Description:
Aggregate all items in the list
Must be added via Nuget package 'Morestachio.Linq' and added via 'contextObject.Formatters.AddFromType(typeof(DynamicLinq))'
Example: (IEnumerable<T>).All(string predicate, object[] arguments)
FormatterName: All
Arguments:
-
[SourceObject]IEnumerable<T>: sourceCollection -
string: predicate -
[RestParameter]object[]: arguments
Returns: bool
Description:
returns if All elements in the collection matches the condition
Must be added via Nuget package 'Morestachio.Linq' and added via 'contextObject.Formatters.AddFromType(typeof(DynamicLinq))'
Example: (IEnumerable<T>).Any(string predicate, object[] arguments)
FormatterName: Any
Arguments:
-
[SourceObject]IEnumerable<T>: sourceCollection -
string: predicate -
[RestParameter]object[]: arguments
Returns: bool
Description:
returns if Any elements in the collection matches the condition
Must be added via Nuget package 'Morestachio.Linq' and added via 'contextObject.Formatters.AddFromType(typeof(DynamicLinq))'
Example: (IEnumerable).Any()
FormatterName: Any | any
Arguments:
-
[SourceObject]IEnumerable: sourceCollection
Returns: bool
Description:
Returns ether true or false if the expression in the argument is fulfilled by any item
Must be added via Nuget package 'Morestachio.Linq' and added via 'contextObject.Formatters.AddFromType(typeof(DynamicLinq))'
Example: (IEnumerable<T>).Average(string predicate, object[] arguments)
FormatterName: Average
Arguments:
-
[SourceObject]IEnumerable<T>: sourceCollection -
string: predicate -
[RestParameter]object[]: arguments
Returns: double
Description:
returns the Average of all items in the collection
Must be added via Nuget package 'Morestachio.Linq' and added via 'contextObject.Formatters.AddFromType(typeof(DynamicLinq))'
Example: (IEnumerable<T>).Cast(string type)
FormatterName: Cast
Arguments:
-
[SourceObject]IEnumerable<T>: sourceCollection -
string: type
Returns: IQueryable
Description:
casts all elements in the collection into another type
Must be added via Nuget package 'Morestachio.Linq' and added via 'contextObject.Formatters.AddFromType(typeof(DynamicLinq))'
Example: (IEnumerable<T>).Count(string predicate, object[] arguments)
FormatterName: Count
Arguments:
-
[SourceObject]IEnumerable<T>: sourceCollection -
string: predicate -
[RestParameter]object[]: arguments
Returns: decimal
Description:
Counts all items that matches the predicate
Must be added via Nuget package 'Morestachio.Linq' and added via 'contextObject.Formatters.AddFromType(typeof(DynamicLinq))'
Example: (IEnumerable<T>).First(string predicate, object[] arguments)
FormatterName: First
Arguments:
-
[SourceObject]IEnumerable<T>: sourceCollection -
string: predicate -
[RestParameter]object[]: arguments
Returns: T
Description:
Gets the first item in the list that matches the predicate
Must be added via Nuget package 'Morestachio.Linq' and added via 'contextObject.Formatters.AddFromType(typeof(DynamicLinq))'
Example: (IEnumerable<T>).FirstOrDefault(string predicate, object[] arguments)
FormatterName: FirstOrDefault
Arguments:
-
[SourceObject]IEnumerable<T>: sourceCollection -
string: predicate -
[RestParameter]object[]: arguments
Returns: T
Description:
Gets the first item in the list that matches the predicate
Must be added via Nuget package 'Morestachio.Linq' and added via 'contextObject.Formatters.AddFromType(typeof(DynamicLinq))'
Example: (IEnumerable<T>).GroupBy(string predicate, object[] arguments)
FormatterName: GroupBy
Arguments:
-
[SourceObject]IEnumerable<T>: sourceCollection -
string: predicate -
[RestParameter]object[]: arguments
Returns: IEnumerable
Description:
Groups a list
Must be added via Nuget package 'Morestachio.Linq' and added via 'contextObject.Formatters.AddFromType(typeof(DynamicLinq))'
Example: (IEnumerable).GroupJoin(IEnumerable targetCollection, string outerKeySelector, string innerKeySelector, string resultSelector, object[] arguments)
FormatterName: GroupJoin
Arguments:
-
[SourceObject]IEnumerable: sourceCollection -
IEnumerable: targetCollection -
string: outerKeySelector -
string: innerKeySelector -
string: resultSelector -
[RestParameter]object[]: arguments
Returns: IEnumerable
Description:
Joins two collections together
Must be added via Nuget package 'Morestachio.Linq' and added via 'contextObject.Formatters.AddFromType(typeof(DynamicLinq))'
Example: (IEnumerable).Join(IEnumerable targetCollection, string outerKeySelector, string innerKeySelector, string resultSelector, object[] arguments)
FormatterName: Join
Arguments:
-
[SourceObject]IEnumerable: sourceCollection -
IEnumerable: targetCollection -
string: outerKeySelector -
string: innerKeySelector -
string: resultSelector -
[RestParameter]object[]: arguments
Returns: IEnumerable
Description:
Joins two collections together
Must be added via Nuget package 'Morestachio.Linq' and added via 'contextObject.Formatters.AddFromType(typeof(DynamicLinq))'
Example: (IEnumerable<T>).Last(string predicate, object[] arguments)
FormatterName: Last
Arguments:
-
[SourceObject]IEnumerable<T>: sourceCollection -
string: predicate -
[RestParameter]object[]: arguments
Returns: T
Description:
Gets the Last item in the list that matches the predicate
Must be added via Nuget package 'Morestachio.Linq' and added via 'contextObject.Formatters.AddFromType(typeof(DynamicLinq))'
Example: (IEnumerable<T>).LastOrDefault(string predicate, object[] arguments)
FormatterName: LastOrDefault
Arguments:
-
[SourceObject]IEnumerable<T>: sourceCollection -
string: predicate -
[RestParameter]object[]: arguments
Returns: T
Description:
Gets the Last item in the list that matches the predicate
Must be added via Nuget package 'Morestachio.Linq' and added via 'contextObject.Formatters.AddFromType(typeof(DynamicLinq))'
Example: (IEnumerable<T>).OrderBy(string predicate, object[] arguments)
FormatterName: OrderBy
Arguments:
-
[SourceObject]IEnumerable<T>: sourceCollection -
string: predicate -
[RestParameter]object[]: arguments
Returns: IEnumerable<T>
Description:
Orders the list descending
Must be added via Nuget package 'Morestachio.Linq' and added via 'contextObject.Formatters.AddFromType(typeof(DynamicLinq))'
Example: (IEnumerable<T>).OrderBy()
FormatterName: OrderBy
Arguments:
-
[SourceObject]IEnumerable<T>: sourceCollection
Returns: IEnumerable<T>
Description:
Orders the list descending
Must be added via Nuget package 'Morestachio.Linq' and added via 'contextObject.Formatters.AddFromType(typeof(DynamicLinq))'
Example: (IEnumerable<T>).Select(string predicate, object[] arguments)
FormatterName: Select
Arguments:
-
[SourceObject]IEnumerable<T>: sourceCollection -
string: predicate -
[RestParameter]object[]: arguments
Returns: IEnumerable
Description:
Selects items from the collection based on the predicate
Must be added via Nuget package 'Morestachio.Linq' and added via 'contextObject.Formatters.AddFromType(typeof(DynamicLinq))'
Example: (IEnumerable<T>).SelectMany(string predicate, object[] arguments)
FormatterName: SelectMany
Arguments:
-
[SourceObject]IEnumerable<T>: sourceCollection -
string: predicate -
[RestParameter]object[]: arguments
Returns: IEnumerable
Description:
Selects a list of items from the collection based on the predicate and flattens them
Must be added via Nuget package 'Morestachio.Linq' and added via 'contextObject.Formatters.AddFromType(typeof(DynamicLinq))'
Example: (IEnumerable<T>).Single(string predicate, object[] arguments)
FormatterName: Single
Arguments:
-
[SourceObject]IEnumerable<T>: sourceCollection -
string: predicate -
[RestParameter]object[]: arguments
Returns: T
Description:
Gets the only item in the list that matches the predicate
Must be added via Nuget package 'Morestachio.Linq' and added via 'contextObject.Formatters.AddFromType(typeof(DynamicLinq))'
Example: (IEnumerable<T>).SingleOrDefault()
FormatterName: SingleOrDefault
Arguments:
-
[SourceObject]IEnumerable<T>: sourceCollection
Returns: T
Description:
Gets the only item in the list that matches the predicate
Must be added via Nuget package 'Morestachio.Linq' and added via 'contextObject.Formatters.AddFromType(typeof(DynamicLinq))'
Example: (IEnumerable<T>).SingleOrDefault(string predicate, object[] arguments)
FormatterName: SingleOrDefault
Arguments:
-
[SourceObject]IEnumerable<T>: sourceCollection -
string: predicate -
[RestParameter]object[]: arguments
Returns: T
Description:
Gets the only item in the list that matches the predicate
Must be added via Nuget package 'Morestachio.Linq' and added via 'contextObject.Formatters.AddFromType(typeof(DynamicLinq))'
Example: (IEnumerable<T>).SkipWhile(string predicate, object[] arguments)
FormatterName: SkipWhile
Arguments:
-
[SourceObject]IEnumerable<T>: sourceCollection -
string: predicate -
[RestParameter]object[]: arguments
Returns: IEnumerable<T>
Description:
Skips items from the collection as long as the predicate is true
Must be added via Nuget package 'Morestachio.Linq' and added via 'contextObject.Formatters.AddFromType(typeof(DynamicLinq))'
Example: (IEnumerable<T>).sum()
FormatterName: sum | Sum
Arguments:
-
[SourceObject]IEnumerable<T>: sourceCollection
Returns: T
Description:
Aggreates the property in the argument and returns it
Must be added via Nuget package 'Morestachio.Linq' and added via 'contextObject.Formatters.AddFromType(typeof(DynamicLinq))'
Example: (IEnumerable<T>).TakeWhile(string predicate, object[] arguments)
FormatterName: TakeWhile
Arguments:
-
[SourceObject]IEnumerable<T>: sourceCollection -
string: predicate -
[RestParameter]object[]: arguments
Returns: IEnumerable<T>
Description:
Takes items from the collection as long as the predicate is true
Must be added via Nuget package 'Morestachio.Linq' and added via 'contextObject.Formatters.AddFromType(typeof(DynamicLinq))'
Example: (IOrderedQueryable<T>).ThenBy(string predicate, object[] arguments)
FormatterName: ThenBy
Arguments:
-
[SourceObject]IOrderedQueryable<T>: sourceCollection -
string: predicate -
[RestParameter]object[]: arguments
Returns: IEnumerable<T>
Description:
Orders an list previusly ordered with 'OrderBy'
Must be added via Nuget package 'Morestachio.Linq' and added via 'contextObject.Formatters.AddFromType(typeof(DynamicLinq))'
Example: (IEnumerable<T>).Where(string predicate, object[] arguments)
FormatterName: Where
Arguments:
-
[SourceObject]IEnumerable<T>: sourceCollection -
string: predicate -
[RestParameter]object[]: arguments
Returns: IEnumerable<T>
Description:
Filteres the collection based on the predicate. Accepts any number of additonal arguments
Must be added via Nuget package 'Morestachio.Linq' and added via 'contextObject.Formatters.AddFromType(typeof(DynamicLinq))'
Example: (Regex).IsMatch(string input)
FormatterName: IsMatch
Arguments:
-
[SourceObject]Regex: pattern -
string: input
Returns: bool
Description:
Searches the input string for one or more occurrences of the text supplied in the given pattern.
Example: (Regex).Match(string input)
FormatterName: Match
Arguments:
-
[SourceObject]Regex: pattern -
string: input
Returns: Match
Description:
Matches a regular expression with a string and returns the precise result as a RegexMatch object.
Example: (Regex).Matches(string input)
FormatterName: Matches
Arguments:
-
[SourceObject]Regex: pattern -
string: input
Returns: MatchCollection
Description:
Returns all the successful matches as if Match was called iteratively numerous times.
Example: (Match).Matches(string replacement)
FormatterName: Matches
Arguments:
-
[SourceObject]Match: match -
string: replacement
Returns: string
Description:
Returns the expansion of the passed replacement pattern. For example, if the replacement pattern is ?$1$2?, Result returns the concatenation of Group(1).ToString() and Group(2).ToString().
Example: (string).Regex()
FormatterName: Regex
Arguments:
-
[SourceObject]string: pattern
Returns: Regex
Description:
Creates a new Regex with the given pattern
Example: Regex(string pattern)
FormatterName: Regex
Arguments:
-
string: pattern
Returns: Regex
Description:
Creates a new Regex with the given pattern
Example: (Regex).Replace(string input, string replacement)
FormatterName: Replace
Arguments:
-
[SourceObject]Regex: pattern -
string: input -
string: replacement
Returns: string
Description:
Replaces all occurrences of the previously defined pattern with the replacement pattern, starting at the first character in the input string.
Example: (Regex).Split(string input)
FormatterName: Split
Arguments:
-
[SourceObject]Regex: pattern -
string: input
Returns: string[]
Description:
Splits the input string at the position defined by a previous pattern.
Example: Random()
FormatterName: Random
Returns: int
Description:
Gets a non-negative random number
Example: Random(int upperBounds)
FormatterName: Random
Arguments:
-
int: upperBounds
Returns: int
Description:
Gets a non-negative random number where the number is capped by upperBounds
Example: Random(int upperBounds, int lowerBounds)
FormatterName: Random
Arguments:
-
int: upperBounds -
int: lowerBounds
Returns: int
Description:
Gets a non-negative random number where the number is capped by upperBounds and lowerBounds
Example: (string).HtmlDecode()
FormatterName: HtmlDecode
Arguments:
-
[SourceObject]string: text
Returns: string
Description:
Converts a string that has been HTML-encoded for HTTP transmission into a decoded string.
Example: HtmlDecode(string text)
FormatterName: HtmlDecode
Arguments:
-
string: text
Returns: string
Description:
Converts a string that has been HTML-encoded for HTTP transmission into a decoded string.
Example: (string).HtmlEncode()
FormatterName: HtmlEncode
Arguments:
-
[SourceObject]string: text
Returns: string
Description:
Converts a string to an HTML-encoded string.
Example: HtmlEncode(string text)
FormatterName: HtmlEncode
Arguments:
-
string: text
Returns: string
Description:
Converts a string to an HTML-encoded string.
Example: (string).HtmlStrip()
FormatterName: HtmlStrip
Arguments:
-
[SourceObject]string: text
Returns: string
Description:
Removes any HTML tags from the input string
Example: HtmlStrip(string text)
FormatterName: HtmlStrip
Arguments:
-
string: text
Returns: string
Description:
Removes any HTML tags from the input string
Example: (string).UrlEncode()
FormatterName: UrlEncode
Arguments:
-
[SourceObject]string: text
Returns: string
Description:
Converts a string to its escaped representation.
Example: UrlEncode(string text)
FormatterName: UrlEncode
Arguments:
-
string: text
Returns: string
Description:
Converts a string to its escaped representation.
Example: (string).UrlEscape()
FormatterName: UrlEscape
Arguments:
-
[SourceObject]string: text
Returns: string
Description:
Converts a URI string to its escaped representation.
Example: UrlEscape(string text)
FormatterName: UrlEscape
Arguments:
-
string: text
Returns: string
Description:
Converts a URI string to its escaped representation.
Example: (int).GetEncoding()
FormatterName: GetEncoding
Arguments:
-
[SourceObject]int: codePage
Returns: Encoding
Description:
Returns the encoding associated with the specified code page identifier
Example: (string).GetEncoding()
FormatterName: GetEncoding
Arguments:
-
[SourceObject]string: name
Returns: Encoding
Description:
Returns the encoding associated with the specified code page name.