API Reference

Carrier class (Rant.Vocabulary.Querying)[link]

Namespace: Rant.Vocabulary.Querying

Inheritance: Object → Carrier

Represents information that can be used to synchronize query selections based on certain criteria.

public sealed class Carrier

Constructors[link]

Carrier()[link]

Creates an empty carrier.

public Carrier()

Methods[link]

AddComponent(CarrierComponentType, params string[])[link]

Adds a component of the specified type and name to the current instance.

public void AddComponent(CarrierComponentType type, params string[] values)

Parameters

  • type: The type of carrier to add.
  • values: The names to assign to the component type.

Equals(object)[link]

No Summary

public override bool Equals(object obj)

Parameters

  • obj: No Description

GetComponentsOfType(CarrierComponentType)[link]

Iterates through the current instances's components of the specified type.

public System.Collections.Generic.IEnumerable<string> GetComponentsOfType(CarrierComponentType type)

Parameters

  • type: The type of component to iterate through.

GetHashCode()[link]

No Summary

public override int GetHashCode()

GetTotalCount()[link]

Retreives the total amount of all components.

public int GetTotalCount()

Returns[link]

The total amount of all components.

GetType()[link]

No Summary

public override System.Type GetType()

GetTypeCount(CarrierComponentType)[link]

Returns how many of a certain carrier component type are assigned to the current instance.

public int GetTypeCount(CarrierComponentType type)

Parameters

  • type:

ToString()[link]

No Summary

public override string ToString()

CarrierComponentType enum (Rant.Vocabulary.Querying)[link]

Namespace: Rant.Vocabulary.Querying

Inheritance: Object → ValueType → Enum → CarrierComponentType

Defines carrier types for queries.

public enum CarrierComponentType

Fields[link]

Associative[link]

Classes must exactly match.

public const CarrierComponentType Associative = 3;

Dissociative[link]

Share no classes.

public const CarrierComponentType Dissociative = 1;

Divergent[link]

Have at least one different class.

public const CarrierComponentType Divergent = 5;

Match[link]

Select the same entry every time.

public const CarrierComponentType Match = 0;

MatchAssociative[link]

Classes must exactly match those of a match carrier entry.

public const CarrierComponentType MatchAssociative = 4;

MatchDissociative[link]

Share no classes with a match carrier entry.

public const CarrierComponentType MatchDissociative = 2;

MatchDivergent[link]

Have at least one different class than a match carrier entry.

public const CarrierComponentType MatchDivergent = 6;

MatchRelational[link]

Share at least one class with a match carrier entry.

public const CarrierComponentType MatchRelational = 8;

MatchUnique[link]

Choose an entry that is different from a match carrier entry.

public const CarrierComponentType MatchUnique = 10;

Relational[link]

Share at least one class.

public const CarrierComponentType Relational = 7;

Rhyme[link]

Choose terms that rhyme.

public const CarrierComponentType Rhyme = 11;

Unique[link]

Never choose the same entry twice.

public const CarrierComponentType Unique = 9;

Methods[link]

CompareTo(object)[link]

No Summary

public override int CompareTo(object target)

Parameters

  • target: No Description

Equals(object)[link]

No Summary

public override bool Equals(object obj)

Parameters

  • obj: No Description

GetHashCode()[link]

No Summary

public override int GetHashCode()

GetType()[link]

No Summary

public override System.Type GetType()

GetTypeCode()[link]

No Summary

public override System.TypeCode GetTypeCode()

HasFlag(Enum)[link]

No Summary

public override bool HasFlag(Enum flag)

Parameters

  • flag: No Description

ToString()[link]

No Summary

public override string ToString()

ToString(string)[link]

No Summary

public override string ToString(string format)

Parameters

  • format: No Description

ToString(IFormatProvider)[link]

Warning

This item is deprecated. The provider argument is not used. Please use ToString().

No Summary

public override string ToString(IFormatProvider provider)

Parameters

  • provider: No Description

ToString(string, IFormatProvider)[link]

Warning

This item is deprecated. The provider argument is not used. Please use ToString(String).

No Summary

public override string ToString(string format, IFormatProvider provider)

Parameters

  • format: No Description
  • provider: No Description

ChannelVisibility enum (Rant.Core.Output)[link]

Namespace: Rant.Core.Output

Inheritance: Object → ValueType → Enum → ChannelVisibility

Provides visibility settings for output channels.

public enum ChannelVisibility

Fields[link]

Internal[link]

Channel outputs only to itself and any parent channels also set to Internal.

public const ChannelVisibility Internal = 2;

Private[link]

Channel outputs only to itself.

public const ChannelVisibility Private = 1;

Public[link]

Channel outputs to itself and 'main'.

public const ChannelVisibility Public = 0;

Methods[link]

CompareTo(object)[link]

No Summary

public override int CompareTo(object target)

Parameters

  • target: No Description

Equals(object)[link]

No Summary

public override bool Equals(object obj)

Parameters

  • obj: No Description

GetHashCode()[link]

No Summary

public override int GetHashCode()

GetType()[link]

No Summary

public override System.Type GetType()

GetTypeCode()[link]

No Summary

public override System.TypeCode GetTypeCode()

HasFlag(Enum)[link]

No Summary

public override bool HasFlag(Enum flag)

Parameters

  • flag: No Description

ToString()[link]

No Summary

public override string ToString()

ToString(string)[link]

No Summary

public override string ToString(string format)

Parameters

  • format: No Description

ToString(IFormatProvider)[link]

Warning

This item is deprecated. The provider argument is not used. Please use ToString().

No Summary

public override string ToString(IFormatProvider provider)

Parameters

  • provider: No Description

ToString(string, IFormatProvider)[link]

Warning

This item is deprecated. The provider argument is not used. Please use ToString(String).

No Summary

public override string ToString(string format, IFormatProvider provider)

Parameters

  • format: No Description
  • provider: No Description

ClassFilterRule class (Rant.Vocabulary.Querying)[link]

Namespace: Rant.Vocabulary.Querying

Inheritance: Object → ClassFilterRule

Defines a query filter for a single dictionary entry class.

public sealed class ClassFilterRule

Constructors[link]

ClassFilterRule(string)[link]

Initializes a new ClassFilterRule that checks for a positive match to the specified class.

public ClassFilterRule(string className)

Parameters

  • className: The name of the class to search for.

ClassFilterRule(string, bool)[link]

Initializes a new ClassFilterRule that checks for a positive or negative match to the specified class.

public ClassFilterRule(string className, bool shouldMatch)

Parameters

  • className: The name of the class to search for.
  • shouldMatch: Determines whether the filter item expects a positive or negative match for the class.

Properties[link]

Class[link]

The name of the class to search for.

public string Class
{
    get;
    set;
}

ShouldMatch[link]

Determines whether the filter item expects a positive or negative match for the class.

public bool ShouldMatch
{
    get;
    set;
}

Methods[link]

Equals(object)[link]

No Summary

public override bool Equals(object obj)

Parameters

  • obj: No Description

GetHashCode()[link]

No Summary

public override int GetHashCode()

GetType()[link]

No Summary

public override System.Type GetType()

ToString()[link]

No Summary

public override string ToString()

EnglishNumberVerbalizer class (Rant.Formats)[link]

Namespace: Rant.Formats

Inheritance: Object → NumberVerbalizer → EnglishNumberVerbalizer

Represents a number verbalizer for English (US).

public sealed class EnglishNumberVerbalizer : Rant.Formats.NumberVerbalizer

Constructors[link]

EnglishNumberVerbalizer()[link]

No Summary

public EnglishNumberVerbalizer()

Methods[link]

Equals(object)[link]

No Summary

public override bool Equals(object obj)

Parameters

  • obj: No Description

GetHashCode()[link]

No Summary

public override int GetHashCode()

GetType()[link]

No Summary

public override System.Type GetType()

ToString()[link]

No Summary

public override string ToString()

Verbalize(long)[link]

Verbalizes the specified value.

public virtual string Verbalize(long number)

Parameters

  • number: The number to verbalize.

EnglishPluralizer class (Rant.Formats)[link]

Namespace: Rant.Formats

Inheritance: Object → Pluralizer → EnglishPluralizer

Pluralizer for English nouns.

public sealed class EnglishPluralizer : Rant.Formats.Pluralizer

Constructors[link]

EnglishPluralizer()[link]

No Summary

public EnglishPluralizer()

Methods[link]

Equals(object)[link]

No Summary

public override bool Equals(object obj)

Parameters

  • obj: No Description

GetHashCode()[link]

No Summary

public override int GetHashCode()

GetType()[link]

No Summary

public override System.Type GetType()

Pluralize(string)[link]

Determines the plural form of the specified English noun.

public virtual string Pluralize(string input)

Parameters

  • input: The singular form of the noun to pluralize.

ToString()[link]

No Summary

public override string ToString()

GermanNumberVerbalizer class (Rant.Formats)[link]

Namespace: Rant.Formats

Inheritance: Object → NumberVerbalizer → GermanNumberVerbalizer

Represents a number verbalizer for Standard German.

public sealed class GermanNumberVerbalizer : Rant.Formats.NumberVerbalizer

Constructors[link]

GermanNumberVerbalizer()[link]

No Summary

public GermanNumberVerbalizer()

Methods[link]

Equals(object)[link]

No Summary

public override bool Equals(object obj)

Parameters

  • obj: No Description

GetHashCode()[link]

No Summary

public override int GetHashCode()

GetType()[link]

No Summary

public override System.Type GetType()

ToString()[link]

No Summary

public override string ToString()

Verbalize(long)[link]

Verbalizes the specified value.

public virtual string Verbalize(long number)

Parameters

  • number: The number to verbalize.

IRantFunction interface (Rant.Metadata)[link]

Namespace: Rant.Metadata

Inheritance: Object → IRantFunction

Provides access to metadata for a Rant function overload.

public interface IRantFunction

Properties[link]

Description[link]

Gets the description for the function overload.

public abstract virtual string Description
{
    get;
}

HasParamArray[link]

Indicates whether the last parameter accepts multiple values.

public abstract virtual bool HasParamArray
{
    get;
}

Name[link]

Gets the name of the function.

public abstract virtual string Name
{
    get;
}

ParamCount[link]

Gets the number of parameters accepted by the function overload.

public abstract virtual int ParamCount
{
    get;
}

Methods[link]

GetParameters()[link]

Enumerates the parameters for the function overload.

public abstract virtual System.Collections.Generic.IEnumerable<Rant.Metadata.IRantParameter> GetParameters()

IRantFunctionGroup interface (Rant.Metadata)[link]

Namespace: Rant.Metadata

Inheritance: Object → IRantFunctionGroup

Provides access to metadata for a group of overloads for a specific Rant function.

public interface IRantFunctionGroup

Properties[link]

Name[link]

Gets the name of the function.

public abstract virtual string Name
{
    get;
}

Overloads[link]

Gets the available overloads for the function.

public abstract virtual IEnumerable<Rant.Metadata.IRantFunction> Overloads
{
    get;
}

IRantModeValue interface (Rant.Metadata)[link]

Namespace: Rant.Metadata

Inheritance: Object → IRantModeValue

Provides information on Rant's mode values, like number formats and synchronizer types.

public interface IRantModeValue

Properties[link]

Description[link]

Gets the description for the value.

public abstract virtual string Description
{
    get;
}

Name[link]

Gets the name of the value.

public abstract virtual string Name
{
    get;
}

IRantParameter interface (Rant.Metadata)[link]

Namespace: Rant.Metadata

Inheritance: Object → IRantParameter

Provides access to metadata for a Rant function parameter.

public interface IRantParameter

Properties[link]

Description[link]

Gets the description for the parameter.

public abstract virtual string Description
{
    get;
}

IsParams[link]

Indicates whether the parameter accepts multiple values.

public abstract virtual bool IsParams
{
    get;
}

Name[link]

Gets the name of the parameter.

public abstract virtual string Name
{
    get;
}

RantType[link]

Gets the data type accepted by the parameter.

public abstract virtual RantFunctionParameterType RantType
{
    get;
}

Methods[link]

GetEnumValues()[link]

Enumerates all possible values for flag and mode parameters.

public abstract virtual System.Collections.Generic.IEnumerable<Rant.Metadata.IRantModeValue> GetEnumValues()

NumberVerbalizer class (Rant.Formats)[link]

Namespace: Rant.Formats

Inheritance: Object → NumberVerbalizer

The base class for all number verbalizers.

public abstract class NumberVerbalizer

Methods[link]

Equals(object)[link]

No Summary

public override bool Equals(object obj)

Parameters

  • obj: No Description

Finalize()[link]

No Summary

protected override void Finalize()

GetHashCode()[link]

No Summary

public override int GetHashCode()

GetType()[link]

No Summary

public override System.Type GetType()

MemberwiseClone()[link]

No Summary

protected override object MemberwiseClone()

ToString()[link]

No Summary

public override string ToString()

Verbalize(long)[link]

Verbalizes the specified value.

public abstract virtual string Verbalize(long number)

Parameters

  • number: The number to verbalize.

Pluralizer class (Rant.Formats)[link]

Namespace: Rant.Formats

Inheritance: Object → Pluralizer

The base class for pluralizers, which infer the plural form of a given noun.

public abstract class Pluralizer

Methods[link]

Equals(object)[link]

No Summary

public override bool Equals(object obj)

Parameters

  • obj: No Description

Finalize()[link]

No Summary

protected override void Finalize()

GetHashCode()[link]

No Summary

public override int GetHashCode()

GetType()[link]

No Summary

public override System.Type GetType()

MemberwiseClone()[link]

No Summary

protected override object MemberwiseClone()

Pluralize(string)[link]

Converts the specified input noun to a plural version.

public abstract virtual string Pluralize(string input)

Parameters

  • input: The noun to convert.

ToString()[link]

No Summary

public override string ToString()

QuotationMarks class (Rant.Formats)[link]

Namespace: Rant.Formats

Inheritance: Object → QuotationMarks

Represents a configuration for quotation marks.

public sealed class QuotationMarks

Constructors[link]

QuotationMarks()[link]

Initializes a new instance of the QuotationFormat class with the default configuration.

public QuotationMarks()

QuotationMarks(char, char, char, char)[link]

Initializes a new instance of the QuotationFormat class with the specified quotation marks.

public QuotationMarks(char openPrimary, char closePrimary, char openSecondary, char closeSecondary)

Parameters

  • openPrimary: The opening primary quote.
  • closePrimary: The closing primary quote.
  • openSecondary: The opening secondary quote.
  • closeSecondary: The closing secondary quote.

Properties[link]

ClosingPrimary[link]

The closing primary quotation mark.

public char ClosingPrimary
{
    get;
}

ClosingSecondary[link]

The closing secondary quotation mark.

public char ClosingSecondary
{
    get;
}

OpeningPrimary[link]

The opening primary quotation mark.

public char OpeningPrimary
{
    get;
}

OpeningSecondary[link]

The opening secondary quotation mark.

public char OpeningSecondary
{
    get;
}

Methods[link]

Equals(object)[link]

No Summary

public override bool Equals(object obj)

Parameters

  • obj: No Description

GetHashCode()[link]

No Summary

public override int GetHashCode()

GetType()[link]

No Summary

public override System.Type GetType()

ToString()[link]

Returns a string representation of the configuration.

public virtual string ToString()

RantArgAttribute class (Rant)[link]

Namespace: Rant

Inheritance: Object → Attribute → RantArgAttribute

Attribute used to change the name of an argument pulled from a field or property.

public sealed class RantArgAttribute : System.Attribute, System.Runtime.InteropServices._Attribute

Constructors[link]

RantArgAttribute(string)[link]

Creates a new RantArgAttribute with the specified name.

public RantArgAttribute(string name)

Parameters

  • name: The new name to assign to the argument.

Properties[link]

Name[link]

The new name to assign to the argument.

public string Name
{
    get;
}

TypeId[link]

No Summary

public override object TypeId
{
    get;
}

Methods[link]

Equals(object)[link]

No Summary

public override bool Equals(object obj)

Parameters

  • obj: No Description

GetHashCode()[link]

No Summary

public override int GetHashCode()

GetType()[link]

No Summary

public override System.Type GetType()

IsDefaultAttribute()[link]

No Summary

public override bool IsDefaultAttribute()

Match(object)[link]

No Summary

public override bool Match(object obj)

Parameters

  • obj: No Description

ToString()[link]

No Summary

public override string ToString()

RantCompilerException class (Rant)[link]

Namespace: Rant

Inheritance: Object → Exception → RantCompilerException

Represents an error raised by Rant during pattern compilation.

public sealed class RantCompilerException : System.Exception, System.Runtime.Serialization.ISerializable, System.Runtime.InteropServices._Exception

Properties[link]

Data[link]

No Summary

public override IDictionary Data
{
    get;
}

ErrorCount[link]

Gets the number of errors returned by the compiler.

public int ErrorCount
{
    get;
}

No Summary

public override string HelpLink
{
    get;
    set;
}

HResult[link]

No Summary

public override int HResult
{
    get;
    protected set;
}

InnerException[link]

No Summary

public override Exception InnerException
{
    get;
}

InternalError[link]

Indicates whether the exception is the result of an internal engine error.

public bool InternalError
{
    get;
}

Message[link]

No Summary

public override string Message
{
    get;
}

Source[link]

No Summary

public override string Source
{
    get;
    set;
}

SourceName[link]

The name of the source pattern on which the error occurred.

public string SourceName
{
    get;
}

StackTrace[link]

No Summary

public override string StackTrace
{
    get;
}

TargetSite[link]

No Summary

public override MethodBase TargetSite
{
    get;
}

Methods[link]

Equals(object)[link]

No Summary

public override bool Equals(object obj)

Parameters

  • obj: No Description

GetBaseException()[link]

No Summary

public override System.Exception GetBaseException()

GetErrors()[link]

Enumerates the errors collected from the compiler.

public System.Collections.Generic.IEnumerable<Rant.RantCompilerMessage> GetErrors()

GetHashCode()[link]

No Summary

public override int GetHashCode()

GetObjectData(SerializationInfo, StreamingContext)[link]

No Summary

public override void GetObjectData(SerializationInfo info, StreamingContext context)

Parameters

  • info: No Description
  • context: No Description

GetType()[link]

No Summary

public override System.Type GetType()

GetType()[link]

No Summary

public override System.Type GetType()

ToString()[link]

No Summary

public override string ToString()

RantCompilerMessage class (Rant)[link]

Namespace: Rant

Inheritance: Object → RantCompilerMessage

Represents a message emitted by the Rant compiler while performing a job.

public sealed class RantCompilerMessage

Properties[link]

Column[link]

The column on which the message was generated.

public int Column
{
    get;
}

Index[link]

The character index on which the message was generated.

public int Index
{
    get;
}

Length[link]

The length, in characters, of the code snippet to which the message pertains.

public int Length
{
    get;
}

Line[link]

The line on which the message was generated.

public int Line
{
    get;
}

Message[link]

The message text.

public string Message
{
    get;
}

Source[link]

The source path of the pattern being compiled when the message was generated.

public string Source
{
    get;
}

Type[link]

The type of message.

public RantCompilerMessageType Type
{
    get;
}

Methods[link]

Equals(object)[link]

No Summary

public override bool Equals(object obj)

Parameters

  • obj: No Description

GetHashCode()[link]

No Summary

public override int GetHashCode()

GetType()[link]

No Summary

public override System.Type GetType()

ToString()[link]

Generates a string representation of the message.

public virtual string ToString()

RantCompilerMessageType enum (Rant)[link]

Namespace: Rant

Inheritance: Object → ValueType → Enum → RantCompilerMessageType

Defines message types used by the Rant compiler.

public enum RantCompilerMessageType

Fields[link]

Error[link]

Indicates a problem that made compilation impossible, usually a syntax error.

public const RantCompilerMessageType Error = 1;

Warning[link]

Indicates a problem that did not interfere with compilation.

public const RantCompilerMessageType Warning = 0;

Methods[link]

CompareTo(object)[link]

No Summary

public override int CompareTo(object target)

Parameters

  • target: No Description

Equals(object)[link]

No Summary

public override bool Equals(object obj)

Parameters

  • obj: No Description

GetHashCode()[link]

No Summary

public override int GetHashCode()

GetType()[link]

No Summary

public override System.Type GetType()

GetTypeCode()[link]

No Summary

public override System.TypeCode GetTypeCode()

HasFlag(Enum)[link]

No Summary

public override bool HasFlag(Enum flag)

Parameters

  • flag: No Description

ToString()[link]

No Summary

public override string ToString()

ToString(string)[link]

No Summary

public override string ToString(string format)

Parameters

  • format: No Description

ToString(IFormatProvider)[link]

Warning

This item is deprecated. The provider argument is not used. Please use ToString().

No Summary

public override string ToString(IFormatProvider provider)

Parameters

  • provider: No Description

ToString(string, IFormatProvider)[link]

Warning

This item is deprecated. The provider argument is not used. Please use ToString(String).

No Summary

public override string ToString(string format, IFormatProvider provider)

Parameters

  • format: No Description
  • provider: No Description

RantDependencyResolver class (Rant.Resources)[link]

Namespace: Rant.Resources

Inheritance: Object → RantDependencyResolver

Default class for package depdendency resolving.

public class RantDependencyResolver

Constructors[link]

RantDependencyResolver()[link]

No Summary

public RantDependencyResolver()

Methods[link]

Equals(object)[link]

No Summary

public override bool Equals(object obj)

Parameters

  • obj: No Description

Finalize()[link]

No Summary

protected override void Finalize()

GetHashCode()[link]

No Summary

public override int GetHashCode()

GetType()[link]

No Summary

public override System.Type GetType()

MemberwiseClone()[link]

No Summary

protected override object MemberwiseClone()

ToString()[link]

No Summary

public override string ToString()

TryResolvePackage(RantPackageDependency, out RantPackage&)[link]

No Summary

public virtual bool TryResolvePackage(RantPackageDependency depdendency, out RantPackage& package)

Parameters

  • depdendency: No Description
  • package: No Description

RantDictionary class (Rant.Vocabulary)[link]

Namespace: Rant.Vocabulary

Inheritance: Object → RantDictionary

Represents a dictionary that can be loaded and queried by Rant.

public sealed class RantDictionary

Constructors[link]

RantDictionary()[link]

Initializes a new instance of the class with no tables.

public RantDictionary()

RantDictionary(IEnumerable)[link]

Initializes a new instance of the class with the specified set of tables.

public RantDictionary(IEnumerable<Rant.Vocabulary.RantDictionaryTable> tables)

Parameters

  • tables: The tables to store in the dictionary.

Properties[link]

EnableWeighting[link]

Determines whether tables will favor weighted distribution, if available. Weighted distribution has a significantl impact on performance.

public bool EnableWeighting
{
    get;
    set;
}

IncludedHiddenClasses[link]

Gets all currently exposed hidden classes.

public IEnumerable<string> IncludedHiddenClasses
{
    get;
}

Indexers[link]

this[string name][link]

Gets the table with the specified name.

public RantDictionaryTable this[string name]
{
    get;
}

Methods[link]

AddTable(RantDictionaryTable)[link]

Adds a new object to the dictionary.

public void AddTable(RantDictionaryTable table)

Parameters

  • table: The table to add.

ClassExposed(string)[link]

Determines whether the specified class has been manually exposed (overriding hidden status).

public bool ClassExposed(string className)

Parameters

  • className: The name of the class to check.

Equals(object)[link]

No Summary

public override bool Equals(object obj)

Parameters

  • obj: No Description

ExcludeHiddenClass(string)[link]

Unexposes a hidden class from query results.

public void ExcludeHiddenClass(string hiddenClassName)

Parameters

  • hiddenClassName: The name of the hidden class to unexpose.

GetHashCode()[link]

No Summary

public override int GetHashCode()

GetTables()[link]

Enumerates the tables contained in the current RantDictionary instance.

public System.Collections.Generic.IEnumerable<Rant.Vocabulary.RantDictionaryTable> GetTables()

GetType()[link]

No Summary

public override System.Type GetType()

IncludeHiddenClass(string)[link]

Exposes a hidden class to query results.

public void IncludeHiddenClass(string hiddenClassName)

Parameters

  • hiddenClassName: The name of the hidden class to expose.

ToString()[link]

No Summary

public override string ToString()

RantDictionaryEntry class (Rant.Vocabulary)[link]

Namespace: Rant.Vocabulary

Inheritance: Object → RantDictionaryEntry

Stores information about a dictionary entry.

public sealed class RantDictionaryEntry

Constructors[link]

RantDictionaryEntry(RantDictionaryTerm[])[link]

Creates a new instance of the object from the specified term array.

public RantDictionaryEntry(RantDictionaryTerm[] terms)

Parameters

  • terms: The terms in the entry.

RantDictionaryEntry(string[], IEnumerable, float)[link]

Creates a new object from the specified term array, classes, and weight.

public RantDictionaryEntry(string[] terms, IEnumerable<string> classes, float weight = 1f)

Parameters

  • terms: The terms in the entry.
  • classes: The classes associated with the entry.
  • weight: The weight of the entry.

RantDictionaryEntry(IEnumerable, IEnumerable, float)[link]

Creates a new object from the specified term collection, classes, and weight.

public RantDictionaryEntry(IEnumerable<Rant.Vocabulary.RantDictionaryTerm> terms, IEnumerable<string> classes, float weight = 1f)

Parameters

  • terms: The terms in the entry.
  • classes: The classes associated with the entry.
  • weight: The weight of the entry.

Properties[link]

ClassCount[link]

Gets the number of classes in the current entry.

public int ClassCount
{
    get;
}

HasClasses[link]

Returns whether or not the entry has classes.

public bool HasClasses
{
    get;
}

TermCount[link]

Gets the number of terms stored in the current entry.

public int TermCount
{
    get;
}

Weight[link]

Gets the weight value of the entry.

public float Weight
{
    get;
    set;
}

Indexers[link]

this[int index][link]

Gets or sets the term at the specified index.

public RantDictionaryTerm this[int index]
{
    get;
    set;
}

Methods[link]

AddClass(string, bool)[link]

Adds the specified class to the current entry.

public void AddClass(string className, bool optional = False)

Parameters

  • className: The name of the class.
  • optional: Specifies whether the class is optional in carrier associations.

ContainsClass(string)[link]

Returns a boolean valie indicating whether the current entry contains the specified class.

public bool ContainsClass(string className)

Parameters

  • className: The class to search for.

ContainsMetadataKey(string)[link]

Determines if the entry contains metadata attached to the specified key.

public bool ContainsMetadataKey(string key)

Parameters

  • key: The key to search for.

Equals(object)[link]

No Summary

public override bool Equals(object obj)

Parameters

  • obj: No Description

GetClasses()[link]

Returns a collection of classes assigned to the current entry.

public System.Collections.Generic.IEnumerable<string> GetClasses()

GetHashCode()[link]

No Summary

public override int GetHashCode()

GetMetadata(string)[link]

Locates and returns the metadata value associated with the specified key. Returns Null if not found.

public object GetMetadata(string key)

Parameters

  • key: The key of the metadata to retrieve.

GetMetadataKeys()[link]

Enumerates all the metadata keys contained in the entry.

public System.Collections.Generic.IEnumerable<string> GetMetadataKeys()

GetOptionalClasses()[link]

Returns a collection of the optional classes assigned to the current entry.

public System.Collections.Generic.IEnumerable<string> GetOptionalClasses()

GetRequiredClasses()[link]

Returns a collection of required (non-optional) classes assigned to the current entry.

public System.Collections.Generic.IEnumerable<string> GetRequiredClasses()

GetTerms()[link]

Enumerates the terms stored in the current entry.

public System.Collections.Generic.IEnumerable<Rant.Vocabulary.RantDictionaryTerm> GetTerms()

GetType()[link]

No Summary

public override System.Type GetType()

RemoveClass(string)[link]

Removes the class with the specified name from the current entry.

public void RemoveClass(string className)

Parameters

  • className: The name of the class to remove.

RemoveMetadata(string)[link]

Removes the metadata with the specified key from the entry.

public bool RemoveMetadata(string key)

Parameters

  • key: The key of the metadata entry to remove.

SetMetadata(string, object)[link]

Sets a metadata value under the specified key in the entry.

public void SetMetadata(string key, object value)

Parameters

  • key: The key to store the data under.
  • value: The value to store.

ToString()[link]

Returns a string representation of the current instance.

public virtual string ToString()

RantDictionaryTable class (Rant.Vocabulary)[link]

Namespace: Rant.Vocabulary

Inheritance: Object → RantResource → RantDictionaryTable

Represents a named collection of dictionary entries.

public sealed class RantDictionaryTable : Rant.Resources.RantResource

Constructors[link]

RantDictionaryTable(string, int, HashSet)[link]

Initializes a new instance of the RantDictionaryTable class with the specified name and term count.

public RantDictionaryTable(string name, int termsPerEntry, HashSet<string> hidden = null)

Parameters

  • name: The name of the table.
  • termsPerEntry: The number of terms to store in each entry.
  • hidden: Collection of hidden classes.

Properties[link]

CacheNeedsRebuild[link]

Indicates whether the cache needs to be rebuilt.

public bool CacheNeedsRebuild
{
    get;
}

EnableWeighting[link]

Determines whether weights are enabled on this table.

public bool EnableWeighting
{
    get;
    set;
}

EntryCount[link]

Gets the number of entries stored in the table.

public int EntryCount
{
    get;
}

HiddenClasses[link]

Gets the hidden classes of the table.

public IEnumerable<string> HiddenClasses
{
    get;
}

Language[link]

Gets the language code associated with the table (not yet used).

public string Language
{
    get;
    set;
}

Name[link]

Gets the name of the table.

public string Name
{
    get;
    set;
}

TermsPerEntry[link]

Gets the number of terms required for entries contained in the current table.

public int TermsPerEntry
{
    get;
    set;
}

Indexers[link]

this[int index][link]

Gets the entry at the specified index in the current object.

public RantDictionaryEntry this[int index]
{
    get;
}

Methods[link]

AddEntry(RantDictionaryEntry)[link]

Adds the specified entry to the table.

public bool AddEntry(RantDictionaryEntry entry)

Parameters

  • entry: The entry to add to the table.

Returns[link]

True if successfully added; otherwise, False.

AddSubtype(string, int)[link]

Adds a subtype of the specified name to the table. If a subtype with the name already exists, it will be overwritten. Subtypes are case insensitive. If the name is not a valid identifier string, it will not be accepted.

public bool AddSubtype(string subtypeName, int index)

Parameters

  • subtypeName: The name of the subtype to add.
  • index: The term index to associate with the name.

Returns[link]

FALSE if the name was not a valid identifier or the index was out of range. TRUE if the operation was successful.

ContainsClass(string)[link]

Returns a boolean value indicating whether the current instance contains one or more entries containing the specified class name.

public bool ContainsClass(string clName)

Parameters

  • clName: The class name to search for.

ContainsEntry(RantDictionaryEntry)[link]

Checks if the table contains the specified entry.

public bool ContainsEntry(RantDictionaryEntry entry)

Parameters

  • entry: The entry to search for.

Returns[link]

True if found, False if not.

Equals(object)[link]

No Summary

public override bool Equals(object obj)

Parameters

  • obj: No Description

FromStream(string, Stream)[link]

Loads a table from the specified stream.

public static Rant.Vocabulary.RantDictionaryTable FromStream(string origin, Stream stream)

Parameters

  • origin: The origin of the stream. This will typically be a file path or package name.
  • stream: The stream to load the table from.

GetClasses()[link]

Searches entries in the current table and enumerates every single distinct class found.

public System.Collections.Generic.IEnumerable<string> GetClasses()

GetEntries()[link]

Enumerates the entries stored in the table.

public System.Collections.Generic.IEnumerable<Rant.Vocabulary.RantDictionaryEntry> GetEntries()

GetHashCode()[link]

No Summary

public override int GetHashCode()

GetSubtypeIndex(string)[link]

Retrieves the term index assigned to the specified subtype. If the subtype is not found, the method will return -1. If the subtype is a null, whitespace, or an empty string, the method will return 0.

public int GetSubtypeIndex(string subtype)

Parameters

  • subtype: The subtype to look up.

GetSubtypes()[link]

Enumerates the subtypes contained in the current table.

public System.Collections.Generic.IEnumerable<string> GetSubtypes()

GetSubtypesForIndex(int)[link]

Enumerates the subtypes associated with the specified term index.

public System.Collections.Generic.IEnumerable<string> GetSubtypesForIndex(int index)

Parameters

  • index: The index to get subtypes for.

GetType()[link]

No Summary

public override System.Type GetType()

HideClass(string)[link]

Hides the specified class.

public bool HideClass(string className)

Parameters

  • className: The name of the class to hide.

IsClassHidden(string)[link]

Determines whether the specified class is hidden by the table.

public bool IsClassHidden(string className)

Parameters

  • className: The name of the class to check.

Merge(RantDictionaryTable)[link]

Adds another table's entries to the current table, given that they share the same name and term count.

public bool Merge(RantDictionaryTable other)

Parameters

  • other: The table whose entries will be added to the current instance.

Returns[link]

True if merge succeeded; otherwise, False.

RebuildCache()[link]

Optimizes the table. Call this after writing items to the table or removing items from a table. If you're writing or removing multiple items, call this after all the actions have been performed.

public void RebuildCache()

RemoveEntry(RantDictionaryEntry)[link]

Removes the specified entry from the table.

public bool RemoveEntry(RantDictionaryEntry entry)

Parameters

  • entry: The entry to remove from the table.

Returns[link]

True if successfully removed; otherwise, False.

RemoveSubtype(string)[link]

Removes the specified subtype from the table, if it exists. Subtypes are case insensitive.

public bool RemoveSubtype(string subtypeName)

Parameters

  • subtypeName: The name of the subtype to remove.

Returns[link]

TRUE if the subtype was found and removed. FALSE if the subtype was not found.

ToString()[link]

No Summary

public override string ToString()

UnhideClass(string)[link]

Unhides the specified class.

public bool UnhideClass(string className)

Parameters

  • className: The name of the class to unhide.

RantDictionaryTerm class (Rant.Vocabulary)[link]

Namespace: Rant.Vocabulary

Inheritance: Object → RantDictionaryTerm

Represents a single term of a dictionary entry.

public sealed class RantDictionaryTerm

Constructors[link]

RantDictionaryTerm(string, int)[link]

Intializes a new instance of the class with the specified value string.

public RantDictionaryTerm(string value, int splitIndex = -1)

Parameters

  • value: The value of the term.
  • splitIndex: The split index of the term value. Specify -1 for no split.

RantDictionaryTerm(string, string)[link]

Intializes a new instance of the class with the specified value and pronunciation strings.

public RantDictionaryTerm(string value, string pronunciation)

Parameters

  • value: The value of the term.
  • pronunciation: The pronunciation of the term value.

RantDictionaryTerm(string, string, int, int)[link]

Intializes a new instance of the class with the specified value, pronunciation, and split indices.

public RantDictionaryTerm(string value, string pronunciation, int valueSplitIndex, int pronSplitIndex)

Parameters

  • value: The value of the term.
  • pronunciation: The pronunciation of the term value.
  • valueSplitIndex: The split index of the term value. Specify -1 for no split.
  • pronSplitIndex: The split index of the term pronunciation string. Specify -1 for no split. Must be positive if the value is split and pronunciation data is present.

Properties[link]

IsSplit[link]

Determines whether the term is a split word.

public bool IsSplit
{
    get;
}

LeftSide[link]

Gets the term value substring on the left side of the split.

public string LeftSide
{
    get;
}

Pronunciation[link]

The pronunciation of the term.

public string Pronunciation
{
    get;
    set;
}

PronunciationSplitIndex[link]

Gets the split index of the term pronunciation string.

public int PronunciationSplitIndex
{
    get;
    set;
}

RightSide[link]

Gets the term value substring on the right side of the split.

public string RightSide
{
    get;
}

SyllableCount[link]

The number of syllables in the pronunciation string.

public int SyllableCount
{
    get;
}

Syllables[link]

An array containing the individual syllables of the pronunciation string.

public string[] Syllables
{
    get;
}

Value[link]

The value string of the term.

public string Value
{
    get;
    set;
}

ValueSplitIndex[link]

Gets the split index of the term value.

public int ValueSplitIndex
{
    get;
    set;
}

Methods[link]

Equals(object)[link]

No Summary

public override bool Equals(object obj)

Parameters

  • obj: No Description

GetHashCode()[link]

No Summary

public override int GetHashCode()

GetType()[link]

No Summary

public override System.Type GetType()

ToString()[link]

No Summary

public override string ToString()

RantEngine class (Rant)[link]

Namespace: Rant

Inheritance: Object → RantEngine

The central class of the Rant engine that allows the execution of patterns.

public sealed class RantEngine

Constructors[link]

RantEngine()[link]

Creates a new RantEngine object without a dictionary.

public RantEngine()

RantEngine(RantDictionary)[link]

Creates a new RantEngine object with the specified vocabulary.

public RantEngine(RantDictionary dictionary)

Parameters

  • dictionary: The vocabulary to load in this instance.

Properties[link]

DependencyResolver[link]

Gets or sets the depdendency resolver used for packages.

public RantDependencyResolver DependencyResolver
{
    get;
    set;
}

Dictionary[link]

The vocabulary associated with this instance.

public RantDictionary Dictionary
{
    get;
    set;
}

Format[link]

The current formatting settings for the engine.

public RantFormat Format
{
    get;
    set;
}

MaxStackSize[link]

Gets or sets the maximum stack size allowed for a pattern.

public static int MaxStackSize
{
    get;
    set;
}

PreserveCarrierState[link]

Specifies whether to preserve carrier states between patterns.

public bool PreserveCarrierState
{
    get;
    set;
}

Indexers[link]

this[string name][link]

Accesses global variables.

public RantObject this[string name]
{
    get;
    set;
}

Fields[link]

Flags[link]

The currently set flags.

public readonly HashSet<string> Flags;

Methods[link]

Do(string, int, double, RantProgramArgs)[link]

Warning

This item is deprecated. Use an overload of Do() that accepts a RantProgram instead of a string.

Compiles the specified string into a pattern, executes it, and returns the resulting output.

public Rant.RantOutput Do(string input, int charLimit = 0, double timeout = -1d, RantProgramArgs args = null)

Parameters

  • input: The input string to execute.
  • charLimit: The maximum number of characters that can be printed. An exception will be thrown if the limit is exceeded. Set to zero or below for unlimited characters.
  • timeout: The maximum number of seconds that the pattern will execute for.
  • args: The arguments to pass to the pattern.

Do(RantProgram, int, double, RantProgramArgs)[link]

Executes the specified pattern and returns the resulting output.

public Rant.RantOutput Do(RantProgram input, int charLimit = 0, double timeout = -1d, RantProgramArgs args = null)

Parameters

  • input: The pattern to execute.
  • charLimit: The maximum number of characters that can be printed. An exception will be thrown if the limit is exceeded. Set to zero or below for unlimited characters.
  • timeout: The maximum number of seconds that the pattern will execute for.
  • args: The arguments to pass to the pattern.

Do(string, long, int, double, RantProgramArgs)[link]

Warning

This item is deprecated. Use an overload of Do() that accepts a RantProgram instead of a string.

Compiles the specified string into a pattern, executes it using a custom seed, and returns the resulting output.

public Rant.RantOutput Do(string input, long seed, int charLimit = 0, double timeout = -1d, RantProgramArgs args = null)

Parameters

  • input: The input string to execute.
  • seed: The seed to generate output with.
  • charLimit: The maximum number of characters that can be printed. An exception will be thrown if the limit is exceeded. Set to zero or below for unlimited characters.
  • timeout: The maximum number of seconds that the pattern will execute for.
  • args: The arguments to pass to the pattern.

Do(string, RNG, int, double, RantProgramArgs)[link]

Warning

This item is deprecated. Use an overload of Do() that accepts a RantProgram instead of a string.

Compiles the specified string into a pattern, executes it using a custom RNG, and returns the resulting output.

public Rant.RantOutput Do(string input, RNG rng, int charLimit = 0, double timeout = -1d, RantProgramArgs args = null)

Parameters

  • input: The input string to execute.
  • rng: The random number generator to use when generating output.
  • charLimit: The maximum number of characters that can be printed. An exception will be thrown if the limit is exceeded. Set to zero or below for unlimited characters.
  • timeout: The maximum number of seconds that the pattern will execute for.
  • args: The arguments to pass to the pattern.

Do(RantProgram, long, int, double, RantProgramArgs)[link]

Executes the specified pattern using a custom seed and returns the resulting output.

public Rant.RantOutput Do(RantProgram input, long seed, int charLimit = 0, double timeout = -1d, RantProgramArgs args = null)

Parameters

  • input: The pattern to execute.
  • seed: The seed to generate output with.
  • charLimit: The maximum number of characters that can be printed. An exception will be thrown if the limit is exceeded. Set to zero or below for unlimited characters.
  • timeout: The maximum number of seconds that the pattern will execute for.
  • args: The arguments to pass to the pattern.

Do(RantProgram, RNG, int, double, RantProgramArgs)[link]

Executes the specified pattern using a custom random number generator and returns the resulting output.

public Rant.RantOutput Do(RantProgram input, RNG rng, int charLimit = 0, double timeout = -1d, RantProgramArgs args = null)

Parameters

  • input: The pattern to execute.
  • rng: The random number generator to use when generating output.
  • charLimit: The maximum number of characters that can be printed. An exception will be thrown if the limit is exceeded. Set to zero or below for unlimited characters.
  • timeout: The maximum number of seconds that the pattern will execute for.
  • args: The arguments to pass to the pattern.

DoFile(string, int, double, RantProgramArgs)[link]

Warning

This item is deprecated. Use an overload of Do() that accepts a RantProgram instead of a string.

Loads the file located at the specified path and executes it, returning the resulting output.

public Rant.RantOutput DoFile(string path, int charLimit = 0, double timeout = -1d, RantProgramArgs args = null)

Parameters

  • path: The path to the file to execute.
  • charLimit: The maximum number of characters that can be printed. An exception will be thrown if the limit is exceeded. Set to zero or below for unlimited characters.
  • timeout: The maximum number of seconds that the pattern will execute for.
  • args: The arguments to pass to the pattern.

DoFile(string, long, int, double, RantProgramArgs)[link]

Loads the file located at the specified path and executes it using a custom seed, returning the resulting output.

public Rant.RantOutput DoFile(string path, long seed, int charLimit = 0, double timeout = -1d, RantProgramArgs args = null)

Parameters

  • path: The path to the file to execute.
  • seed: The seed to generate output with.
  • charLimit: The maximum number of characters that can be printed. An exception will be thrown if the limit is exceeded. Set to zero or below for unlimited characters.
  • timeout: The maximum number of seconds that the pattern will execute for.
  • args: The arguments to pass to the pattern.

DoFile(string, RNG, int, double, RantProgramArgs)[link]

Loads the file located at the specified path and executes it using a custom seed, returning the resulting output.

public Rant.RantOutput DoFile(string path, RNG rng, int charLimit = 0, double timeout = -1d, RantProgramArgs args = null)

Parameters

  • path: The path to the file to execute.
  • rng: The random number generator to use when generating output.
  • charLimit: The maximum number of characters that can be printed. An exception will be thrown if the limit is exceeded. Set to zero or below for unlimited characters.
  • timeout: The maximum number of seconds that the pattern will execute for.
  • args: The arguments to pass to the pattern.

DoName(string, int, double, RantProgramArgs)[link]

Executes a pattern that has been loaded from a package and returns the resulting output.

public Rant.RantOutput DoName(string patternName, int charLimit = 0, double timeout = -1d, RantProgramArgs args = null)

Parameters

  • patternName: The name of the pattern to execute.
  • charLimit: The maximum number of characters that can be printed. An exception will be thrown if the limit is exceeded. Set to zero or below for unlimited characters.
  • timeout: The maximum number of seconds that the pattern will execute for.
  • args: The arguments to pass to the pattern.

DoName(string, long, int, double, RantProgramArgs)[link]

Executes a pattern that has been loaded from a package and returns the resulting output.

public Rant.RantOutput DoName(string patternName, long seed, int charLimit = 0, double timeout = -1d, RantProgramArgs args = null)

Parameters

  • patternName: The name of the pattern to execute.
  • seed: The seed to generate output with.
  • charLimit: The maximum number of characters that can be printed. An exception will be thrown if the limit is exceeded. Set to zero or below for unlimited characters.
  • timeout: The maximum number of seconds that the pattern will execute for.
  • args: The arguments to pass to the pattern.

DoName(string, RNG, int, double, RantProgramArgs)[link]

Executes a pattern that has been loaded from a package using a custom random number generator and returns the resulting output.

public Rant.RantOutput DoName(string patternName, RNG rng, int charLimit = 0, double timeout = -1d, RantProgramArgs args = null)

Parameters

  • patternName: The name of the pattern to execute.
  • rng: The random number generator to use when generating output.
  • charLimit: The maximum number of characters that can be printed. An exception will be thrown if the limit is exceeded. Set to zero or below for unlimited characters.
  • timeout: The maximum number of seconds that the pattern will execute for.
  • args: The arguments to pass to the pattern.

DoSerial(RantProgram, int, double, RantProgramArgs)[link]

Executes the specified pattern and returns a series of outputs.

public System.Collections.Generic.IEnumerable<Rant.RantOutput> DoSerial(RantProgram input, int charLimit = 0, double timeout = -1d, RantProgramArgs args = null)

Parameters

  • input: The pattern to execute.
  • charLimit: The maximum number of characters that can be printed. An exception will be thrown if the limit is exceeded. Set to zero or below for unlimited characters.
  • timeout: The maximum number of seconds that the pattern will execute for.
  • args: The arguments to pass to the pattern.

DoSerial(string, int, double, RantProgramArgs)[link]

Warning

This item is deprecated. Use an overload of DoSerial() that accepts a RantProgram instead of a string.

Executes the specified pattern and returns a series of outputs.

public System.Collections.Generic.IEnumerable<Rant.RantOutput> DoSerial(string input, int charLimit = 0, double timeout = -1d, RantProgramArgs args = null)

Parameters

  • input: The pattern to execute.
  • charLimit: The maximum number of characters that can be printed. An exception will be thrown if the limit is exceeded. Set to zero or below for unlimited characters.
  • timeout: The maximum number of seconds that the pattern will execute for.
  • args: The arguments to pass to the pattern.

DoSerial(RantProgram, long, int, double, RantProgramArgs)[link]

Executes the specified pattern and returns a series of outputs.

public System.Collections.Generic.IEnumerable<Rant.RantOutput> DoSerial(RantProgram input, long seed, int charLimit = 0, double timeout = -1d, RantProgramArgs args = null)

Parameters

  • input: The patten to execute.
  • seed: The seed to generate output with.
  • charLimit: The maximum number of characters that can be printed. An exception will be thrown if the limit is exceeded. Set to zero or below for unlimited characters.
  • timeout: The maximum number of seconds that the pattern will execute for.
  • args: The arguments to pass to the pattern.

DoSerial(RantProgram, RNG, int, double, RantProgramArgs)[link]

Executes the specified pattern and returns a series of outputs.

public System.Collections.Generic.IEnumerable<Rant.RantOutput> DoSerial(RantProgram input, RNG rng, int charLimit = 0, double timeout = -1d, RantProgramArgs args = null)

Parameters

  • input: The pattero to execute.
  • rng: The random number generator to use when generating output.
  • charLimit: The maximum number of characters that can be printed. An exception will be thrown if the limit is exceeded. Set to zero or below for unlimited characters.
  • timeout: The maximum number of seconds that the pattern will execute for.
  • args: The arguments to pass to the pattern.

DoSerial(string, long, int, double, RantProgramArgs)[link]

Warning

This item is deprecated. Use an overload of DoSerial() that accepts a RantProgram instead of a string.

Executes the specified pattern and returns a series of outputs.

public System.Collections.Generic.IEnumerable<Rant.RantOutput> DoSerial(string input, long seed, int charLimit = 0, double timeout = -1d, RantProgramArgs args = null)

Parameters

  • input: The pattern to execute.
  • seed: The seed to generate output with.
  • charLimit: The maximum number of characters that can be printed. An exception will be thrown if the limit is exceeded. Set to zero or below for unlimited characters.
  • timeout: The maximum number of seconds that the pattern will execute for.
  • args: The arguments to pass to the pattern.

DoSerial(string, RNG, int, double, RantProgramArgs)[link]

Warning

This item is deprecated. Use an overload of DoSerial() that accepts a RantProgram instead of a string.

Executes the specified pattern and returns a series of outputs.

public System.Collections.Generic.IEnumerable<Rant.RantOutput> DoSerial(string input, RNG rng, int charLimit = 0, double timeout = -1d, RantProgramArgs args = null)

Parameters

  • input: The pattern to execute.
  • rng: The random number generator to use when generating output.
  • charLimit: The maximum number of characters that can be printed. An exception will be thrown if the limit is exceeded. Set to zero or below for unlimited characters.
  • timeout: The maximum number of seconds that the pattern will execute for.
  • args: The arguments to pass to the pattern.

Equals(object)[link]

No Summary

public override bool Equals(object obj)

Parameters

  • obj: No Description

GetHashCode()[link]

No Summary

public override int GetHashCode()

GetLoadedPackages()[link]

Enumerates all packages loaded by this engine instance.

public System.Collections.Generic.IEnumerable<Rant.Resources.RantPackage> GetLoadedPackages()

GetLoadedProgramNames()[link]

Enumerates the names of all loaded programs available in this engine instance.

public System.Collections.Generic.IEnumerable<string> GetLoadedProgramNames()

GetType()[link]

No Summary

public override System.Type GetType()

LoadPackage(RantPackage)[link]

Loads the specified package into the engine.

public void LoadPackage(RantPackage package)

Parameters

  • package: The package to load.

LoadPackage(string)[link]

Loads the package at the specified file path into the engine.

public void LoadPackage(string path)

Parameters

  • path: The path to the package to load.

ProgramNameLoaded(string)[link]

Returns a boolean value indicating whether a program by the specified name has been loaded from a package.

public bool ProgramNameLoaded(string patternName)

Parameters

  • patternName: The name of the program to check.

ResetCarrierState()[link]

Deletes all state data in the engine's persisted carrier state, if available.

public void ResetCarrierState()

ToString()[link]

No Summary

public override string ToString()

RantFormat class (Rant.Formats)[link]

Namespace: Rant.Formats

Inheritance: Object → RantFormat

Describes language-specific formatting instructions for localizing interpreter output.

public sealed class RantFormat

Constructors[link]

RantFormat()[link]

Creates a new RantFormat instance with default values.

public RantFormat()

RantFormat(CultureInfo, WritingSystem, IEnumerable, Pluralizer, NumberVerbalizer)[link]

Creates a new RantFormat instance with the specified configuration data.

public RantFormat(CultureInfo culture, WritingSystem writingSystem, IEnumerable<string> titleCaseExclusions, Pluralizer pluralizer, NumberVerbalizer numVerbalizer)

Parameters

  • culture: The culture to associate with the format.
  • writingSystem: The writing system to use.
  • titleCaseExclusions: A collection of words to exclude from title case capitalization.
  • pluralizer: The pluralizer to use.
  • numVerbalizer: The number verbalizer to use.

Properties[link]

Culture[link]

The culture to format output strings with.

public CultureInfo Culture
{
    get;
}

NumberVerbalizer[link]

The number verbalizer for the current format.

public NumberVerbalizer NumberVerbalizer
{
    get;
}

Pluralizer[link]

The pluralizer used by the [plural] function to infer plural nouns.

public Pluralizer Pluralizer
{
    get;
}

WritingSystem[link]

The writing system for the current format.

public WritingSystem WritingSystem
{
    get;
}

Fields[link]

English[link]

English formatting.

public static readonly RantFormat English;

German[link]

German formatting.

public static readonly RantFormat German;

Methods[link]

Equals(object)[link]

No Summary

public override bool Equals(object obj)

Parameters

  • obj: No Description

GetHashCode()[link]

No Summary

public override int GetHashCode()

GetType()[link]

No Summary

public override System.Type GetType()

ToString()[link]

No Summary

public override string ToString()

RantFunctionParameterType enum (Rant.Core.Framework)[link]

Namespace: Rant.Core.Framework

Inheritance: Object → ValueType → Enum → RantFunctionParameterType

Defines parameter types for Rant functions.

public enum RantFunctionParameterType

Fields[link]

Boolean[link]

Parameter is a boolean.

public const RantFunctionParameterType Boolean = 6;

Flags[link]

Parameter uses combinable flags.

public const RantFunctionParameterType Flags = 4;

Mode[link]

Parameter describes a mode, which is one of a specific set of allowed values.

public const RantFunctionParameterType Mode = 3;

Number[link]

Parameter is numeric.

public const RantFunctionParameterType Number = 2;

Pattern[link]

Parameter is a lazily evaluated pattern.

public const RantFunctionParameterType Pattern = 1;

RantObject[link]

Parameter is a RantObject.

public const RantFunctionParameterType RantObject = 5;

String[link]

Parameter is a static string.

public const RantFunctionParameterType String = 0;

Methods[link]

CompareTo(object)[link]

No Summary

public override int CompareTo(object target)

Parameters

  • target: No Description

Equals(object)[link]

No Summary

public override bool Equals(object obj)

Parameters

  • obj: No Description

GetHashCode()[link]

No Summary

public override int GetHashCode()

GetType()[link]

No Summary

public override System.Type GetType()

GetTypeCode()[link]

No Summary

public override System.TypeCode GetTypeCode()

HasFlag(Enum)[link]

No Summary

public override bool HasFlag(Enum flag)

Parameters

  • flag: No Description

ToString()[link]

No Summary

public override string ToString()

ToString(string)[link]

No Summary

public override string ToString(string format)

Parameters

  • format: No Description

ToString(IFormatProvider)[link]

Warning

This item is deprecated. The provider argument is not used. Please use ToString().

No Summary

public override string ToString(IFormatProvider provider)

Parameters

  • provider: No Description

ToString(string, IFormatProvider)[link]

Warning

This item is deprecated. The provider argument is not used. Please use ToString(String).

No Summary

public override string ToString(string format, IFormatProvider provider)

Parameters

  • format: No Description
  • provider: No Description

RantInternalException class (Rant)[link]

Namespace: Rant

Inheritance: Object → Exception → RantInternalException

Represents an error that has been caused by a problem inside the Rant engine. This typically indicates the presence of a bug.

public sealed class RantInternalException : System.Exception, System.Runtime.Serialization.ISerializable, System.Runtime.InteropServices._Exception

Properties[link]

Data[link]

No Summary

public override IDictionary Data
{
    get;
}

No Summary

public override string HelpLink
{
    get;
    set;
}

HResult[link]

No Summary

public override int HResult
{
    get;
    protected set;
}

InnerException[link]

No Summary

public override Exception InnerException
{
    get;
}

Message[link]

No Summary

public override string Message
{
    get;
}

Source[link]

No Summary

public override string Source
{
    get;
    set;
}

StackTrace[link]

No Summary

public override string StackTrace
{
    get;
}

TargetSite[link]

No Summary

public override MethodBase TargetSite
{
    get;
}

Methods[link]

Equals(object)[link]

No Summary

public override bool Equals(object obj)

Parameters

  • obj: No Description

GetBaseException()[link]

No Summary

public override System.Exception GetBaseException()

GetHashCode()[link]

No Summary

public override int GetHashCode()

GetObjectData(SerializationInfo, StreamingContext)[link]

No Summary

public override void GetObjectData(SerializationInfo info, StreamingContext context)

Parameters

  • info: No Description
  • context: No Description

GetType()[link]

No Summary

public override System.Type GetType()

GetType()[link]

No Summary

public override System.Type GetType()

ToString()[link]

No Summary

public override string ToString()

RantObject class (Rant.Core.ObjectModel)[link]

Namespace: Rant.Core.ObjectModel

Inheritance: Object → RantObject

Represents a Rant variable.

public sealed class RantObject

Constructors[link]

RantObject()[link]

Creates a null object.

public RantObject()

RantObject(object)[link]

Initializes a new instance of the class from the specified object.

public RantObject(object o)

Parameters

  • o: The object to store in the instance.

RantObject(RantObjectType)[link]

Creates a new RantObject with the specified object type and a default value.

public RantObject(RantObjectType type)

Parameters

  • type: The type of object to create.

Properties[link]

Length[link]

Gets the length of the object. For strings, this is the character count. For lists, this is the item count. For all other types, -1 is returned.

public int Length
{
    get;
}

Type[link]

The type of the object.

public RantObjectType Type
{
    get;
    set;
}

Value[link]

The value of the object.

public object Value
{
    get;
}

Indexers[link]

this[int index][link]

Gets or sets the object at the specified index in the object. Only works with list objects.

public RantObject this[int index]
{
    get;
    set;
}

Fields[link]

False[link]

False

public static readonly RantObject False;

Null[link]

Null

public static readonly RantObject Null;

True[link]

True

public static readonly RantObject True;

Methods[link]

Clone()[link]

Returns another RantObject instance with the exact same value as the current instance.

public Rant.Core.ObjectModel.RantObject Clone()

ConvertTo(RantObjectType)[link]

Converts the current object to a RantObject of the specified type and returns it.

public Rant.Core.ObjectModel.RantObject ConvertTo(RantObjectType targetType)

Parameters

  • targetType: The object type to convert to.

Equals(object)[link]

No Summary

public override bool Equals(object obj)

Parameters

  • obj: No Description

GetHashCode()[link]

No Summary

public override int GetHashCode()

GetType()[link]

No Summary

public override System.Type GetType()

ToString()[link]

Returns a string representation of the current RantObject.

public virtual string ToString()

RantObjectType enum (Rant.Core.ObjectModel)[link]

Namespace: Rant.Core.ObjectModel

Inheritance: Object → ValueType → Enum → RantObjectType

Defines object types used by Rant.

public enum RantObjectType

Fields[link]

Action[link]

Represents a VM action.

public const RantObjectType Action = 4;

Boolean[link]

Represents a boolean value.

public const RantObjectType Boolean = 2;

List[link]

Represents a resizable set of values.

public const RantObjectType List = 3;

Null[link]

Represents a lack of a value.

public const RantObjectType Null = 6;

Number[link]

Represents a decimal number.

public const RantObjectType Number = 0;

String[link]

Represents a series of Unicode characters.

public const RantObjectType String = 1;

Subroutine[link]

Represents a subroutine.

public const RantObjectType Subroutine = 5;

Undefined[link]

Represents a lack of any variable at all.

public const RantObjectType Undefined = 7;

Methods[link]

CompareTo(object)[link]

No Summary

public override int CompareTo(object target)

Parameters

  • target: No Description

Equals(object)[link]

No Summary

public override bool Equals(object obj)

Parameters

  • obj: No Description

GetHashCode()[link]

No Summary

public override int GetHashCode()

GetType()[link]

No Summary

public override System.Type GetType()

GetTypeCode()[link]

No Summary

public override System.TypeCode GetTypeCode()

HasFlag(Enum)[link]

No Summary

public override bool HasFlag(Enum flag)

Parameters

  • flag: No Description

ToString()[link]

No Summary

public override string ToString()

ToString(string)[link]

No Summary

public override string ToString(string format)

Parameters

  • format: No Description

ToString(IFormatProvider)[link]

Warning

This item is deprecated. The provider argument is not used. Please use ToString().

No Summary

public override string ToString(IFormatProvider provider)

Parameters

  • provider: No Description

ToString(string, IFormatProvider)[link]

Warning

This item is deprecated. The provider argument is not used. Please use ToString(String).

No Summary

public override string ToString(string format, IFormatProvider provider)

Parameters

  • format: No Description
  • provider: No Description

RantOutput class (Rant)[link]

Namespace: Rant

Inheritance: Object → RantOutput

Represents a collection of strings generated by a pattern.

public sealed class RantOutput : System.Collections.Generic.IEnumerable<Rant.RantOutputEntry>, System.Collections.IEnumerable

Properties[link]

BaseGeneration[link]

The generation at which the RNG was initially set before the pattern was run.

public long BaseGeneration
{
    get;
}

Main[link]

The main output string.

public string Main
{
    get;
}

Seed[link]

The seed used to generate the output.

public long Seed
{
    get;
}

Indexers[link]

this[string channel][link]

Gets the output of the channel with the specified name.

public string this[string channel]
{
    get;
}

this[params string[] channels][link]

Gets an array containing the values of the specified channels, in the order they appear.

public string[] this[params string[] channels]
{
    get;
}

Methods[link]

Equals(object)[link]

No Summary

public override bool Equals(object obj)

Parameters

  • obj: No Description

GetEnumerator()[link]

Returns an enumerator that iterates through the outputs in the collection.

public virtual System.Collections.Generic.IEnumerator<Rant.RantOutputEntry> GetEnumerator()

GetHashCode()[link]

No Summary

public override int GetHashCode()

GetType()[link]

No Summary

public override System.Type GetType()

ToString()[link]

Returns the output from the "main" channel.

public virtual string ToString()

RantOutputEntry class (Rant)[link]

Namespace: Rant

Inheritance: Object → RantOutputEntry

Represents the output of a single channel.

public sealed class RantOutputEntry

Properties[link]

Name[link]

Gets the name of the channel.

public string Name
{
    get;
}

Value[link]

Gets the value of the channel.

public string Value
{
    get;
}

Visiblity[link]

The visibility of the channel that created the output entry.

public ChannelVisibility Visiblity
{
    get;
}

Methods[link]

Equals(object)[link]

No Summary

public override bool Equals(object obj)

Parameters

  • obj: No Description

GetHashCode()[link]

No Summary

public override int GetHashCode()

GetType()[link]

No Summary

public override System.Type GetType()

ToString()[link]

No Summary

public override string ToString()

RantPackage class (Rant.Resources)[link]

Namespace: Rant.Resources

Inheritance: Object → RantPackage

Represents a collection of patterns and tables that can be exported to an archive file.

public sealed class RantPackage

Constructors[link]

RantPackage()[link]

No Summary

public RantPackage()

Properties[link]

Authors[link]

The authors of the package.

public string[] Authors
{
    get;
    set;
}

Description[link]

The description for the package.

public string Description
{
    get;
    set;
}

ID[link]

The ID of the package.

public string ID
{
    get;
    set;
}

Tags[link]

The tags associated with the package.

public string[] Tags
{
    get;
    set;
}

Title[link]

The display name of the package.

public string Title
{
    get;
    set;
}

Version[link]

The package version.

public RantPackageVersion Version
{
    get;
    set;
}

Methods[link]

AddDependency(RantPackageDependency)[link]

Adds the specified dependency to the package.

public void AddDependency(RantPackageDependency dependency)

Parameters

  • dependency: The dependency to add.

AddDependency(string, string)[link]

Adds the specified dependency to the package.

public void AddDependency(string id, string version)

Parameters

  • id: The ID of the package.
  • version: The package version to target.

AddResource(RantResource)[link]

Adds the specified resource to the package.

public bool AddResource(RantResource resource)

Parameters

  • resource: The resource to add.

ClearDependencies()[link]

Removes all dependencies from the package.

public void ClearDependencies()

ContainsResource(RantResource)[link]

Determines whether the package contains the specified resource.

public bool ContainsResource(RantResource resource)

Parameters

  • resource: The resource to search for.

DependsOn(RantPackageDependency)[link]

Determines whether the package has the specified dependency.

public bool DependsOn(RantPackageDependency dependency)

Parameters

  • dependency: The dependency to check for.

DependsOn(string, string)[link]

Determines whether the package depends on the specified package.

public bool DependsOn(string id, string version)

Parameters

  • id: The ID of the package to check for.
  • version: The version of the package to check for.

Equals(object)[link]

No Summary

public override bool Equals(object obj)

Parameters

  • obj: No Description

GetDependencies()[link]

Enumerates the package's dependencies.

public System.Collections.Generic.IEnumerable<Rant.Resources.RantPackageDependency> GetDependencies()

GetHashCode()[link]

No Summary

public virtual int GetHashCode()

GetResources()[link]

Enumerates all resources in the package.

public System.Collections.Generic.IEnumerable<Rant.Resources.RantResource> GetResources()

GetResources\<TResource>()[link]

Enumerates all resources in the package.

public System.Collections.Generic.IEnumerable<TResource> GetResources<TResource>()

Type Parameters

  • TResource: (No Description)

GetType()[link]

No Summary

public override System.Type GetType()

Load(string)[link]

Loads a package from the specified path and returns it as a RantPackage object.

public static Rant.Resources.RantPackage Load(string path)

Parameters

  • path: The path to the package file to load.

Load(Stream)[link]

Loads a package from the specified stream and returns it as a RantPackage object.

public static Rant.Resources.RantPackage Load(Stream source)

Parameters

  • source: The stream to load the package data from.

RemoveDependency(RantPackageDependency)[link]

Removes the specified dependency from the package.

public bool RemoveDependency(RantPackageDependency dependency)

Parameters

  • dependency: The dependency to remove.

RemoveDependency(string, string)[link]

Removes the specified dependency from the package.

public bool RemoveDependency(string id, string version)

Parameters

  • id: The ID of the dependency to remove.
  • version: The version of the dependency to remove.

RemoveResource(RantResource)[link]

Removes the specified resource from the package.

public bool RemoveResource(RantResource resource)

Parameters

  • resource: The resource to remove.

Save(string, bool)[link]

Saves the package to the specified file path.

public void Save(string path, bool compress = True)

Parameters

  • path: The path to the file to create.
  • compress: Specifies whether to compress the package contents.

ToString()[link]

Returns a string containing the title and version of the package.

public virtual string ToString()

RantPackageDependency class (Rant.Resources)[link]

Namespace: Rant.Resources

Inheritance: Object → RantPackageDependency

Represents a dependency for a Rant package.

public sealed class RantPackageDependency

Constructors[link]

RantPackageDependency(string, string)[link]

Initializes a new RantPackageDependency object.

public RantPackageDependency(string id, string version)

Parameters

  • id: The ID of the package.
  • version: The targeted version of the package.

RantPackageDependency(string, RantPackageVersion)[link]

Initializes a new RantPackageDependency object.

public RantPackageDependency(string id, RantPackageVersion version)

Parameters

  • id: The ID of the package.
  • version: The targeted version of the package.

Properties[link]

AllowNewer[link]

Specifies whether the dependency will accept a package newer than the one given.

public bool AllowNewer
{
    get;
    set;
}

ID[link]

The ID of the package.

public string ID
{
    get;
    set;
}

Version[link]

The targeted version of the package.

public RantPackageVersion Version
{
    get;
    set;
}

Methods[link]

CheckVersion(RantPackageVersion)[link]

Checks if the specified version is compatible with the current dependency.

public bool CheckVersion(RantPackageVersion version)

Parameters

  • version: The version to check.

Create(RantPackage)[link]

Creates a dependency for the specified package.

public static Rant.Resources.RantPackageDependency Create(RantPackage package)

Parameters

  • package: The package to create the dependency for.

Equals(object)[link]

Determines whether the current RantPackageDependency is shares an ID with the specified object.

public virtual bool Equals(object obj)

Parameters

  • obj: The object to compare to.

GetHashCode()[link]

Gets the hash code for the instance.

public virtual int GetHashCode()

GetType()[link]

No Summary

public override System.Type GetType()

ToString()[link]

Returns a string representation of the current dependency.

public virtual string ToString()

RantPackageVersion class (Rant.Resources)[link]

Namespace: Rant.Resources

Inheritance: Object → RantPackageVersion

Represents a version number for a Rant package.

public sealed class RantPackageVersion

Constructors[link]

RantPackageVersion(int, int, int)[link]

Initializes a new RantPackageVersion instance with the specified values.

public RantPackageVersion(int major, int minor, int revision)

Parameters

  • major: The major version.
  • minor: The minor version.
  • revision: The revision number.

RantPackageVersion()[link]

Initializes a new RantPackageVersion instance with all values set to zero.

public RantPackageVersion()

Properties[link]

Major[link]

The major version.

public int Major
{
    get;
    set;
}

Minor[link]

The minor version.

public int Minor
{
    get;
    set;
}

Revision[link]

The revision number.

public int Revision
{
    get;
    set;
}

Methods[link]

Equals(object)[link]

Determines whether the current version is equal to the specified object.

public virtual bool Equals(object obj)

Parameters

  • obj: The object to compare to.

GetHashCode()[link]

No Summary

public virtual int GetHashCode()

GetType()[link]

No Summary

public override System.Type GetType()

Parse(string)[link]

Attempts to parse a version string and returns the equivalent RantPackageVersion.

public static Rant.Resources.RantPackageVersion Parse(string version)

Parameters

  • version: The version string to parse.

ToString()[link]

Returns a string representation of the current version.

public virtual string ToString()

TryParse(string, out RantPackageVersion&)[link]

No Summary

public static bool TryParse(string version, out RantPackageVersion& result)

Parameters

  • version: No Description
  • result: No Description

RantProgram class (Rant)[link]

Namespace: Rant

Inheritance: Object → RantResource → RantProgram

Represents a compiled pattern that can be executed by the engine. It is recommended to use this class when running the same pattern multiple times.

public sealed class RantProgram : Rant.Resources.RantResource

Properties[link]

Code[link]

The pattern from which the program was compiled.

public string Code
{
    get;
}

Name[link]

Gets or sets the name of the source code.

public string Name
{
    get;
    set;
}

Type[link]

Describes the origin of the program.

public RantProgramOrigin Type
{
    get;
}

Methods[link]

CompileFile(string)[link]

Loads the file located at the specified path and compiles a program from its contents.

public static Rant.RantProgram CompileFile(string path)

Parameters

  • path: The path to the file to load.

CompileString(string)[link]

Compiles a program from the specified pattern.

public static Rant.RantProgram CompileString(string code)

Parameters

  • code: The pattern to compile.

CompileString(string, string)[link]

Compiles a program from a pattern with the specified name.

public static Rant.RantProgram CompileString(string name, string code)

Parameters

  • name: The name to give the source.
  • code: The pattern to compile.

Equals(object)[link]

No Summary

public override bool Equals(object obj)

Parameters

  • obj: No Description

GetHashCode()[link]

No Summary

public override int GetHashCode()

GetType()[link]

No Summary

public override System.Type GetType()

LoadFile(string)[link]

Loads a compiled Rant program from the file at the specified path.

public static Rant.RantProgram LoadFile(string path)

Parameters

  • path: The path to load the program from.

LoadStream(string, Stream)[link]

Loads a compiled Rant program from the specified stream.

public static Rant.RantProgram LoadStream(string programName, Stream stream)

Parameters

  • programName: The name to give to the program.
  • stream: The stream to load the program from.

SaveToFile(string)[link]

Saves the compiled program to the file at the specified path.

public void SaveToFile(string path)

Parameters

  • path: The path to save the program to.

SaveToStream(Stream)[link]

Saves the compiled program to the specified stream.

public void SaveToStream(Stream stream)

Parameters

  • stream: The stream to save the program to.

ToString()[link]

Returns a string describing the pattern.

public virtual string ToString()

RantProgramArgs class (Rant)[link]

Namespace: Rant

Inheritance: Object → RantProgramArgs

Represents a set of arguments that can be passed to a pattern.

public sealed class RantProgramArgs

Constructors[link]

RantProgramArgs()[link]

Create a new, empty RantPatternArgs instance.

public RantProgramArgs()

Indexers[link]

this[string key][link]

Gets or sets an argument of the specified name.

public string this[string key]
{
    get;
    set;
}

Methods[link]

Clear()[link]

Clears all values.

public void Clear()

Contains(string)[link]

Determines whether an argument by the specified name exists in the current list.

public bool Contains(string key)

Parameters

  • key: The name of the argument to search for.

CreateFrom(object)[link]

Creates a RantPatternArgs instance from the specified object. Works with anonymous types!

public static Rant.RantProgramArgs CreateFrom(object value)

Parameters

  • value: The object to create an argument set from.

Equals(object)[link]

No Summary

public override bool Equals(object obj)

Parameters

  • obj: No Description

GetHashCode()[link]

No Summary

public override int GetHashCode()

GetType()[link]

No Summary

public override System.Type GetType()

Remove(string)[link]

Removes the specified argument.

public bool Remove(string key)

Parameters

  • key: The name of the argument to remove.

ToString()[link]

No Summary

public override string ToString()

RantProgramOrigin enum (Rant)[link]

Namespace: Rant

Inheritance: Object → ValueType → Enum → RantProgramOrigin

Indicates the manner in which a referenced code source was created.

public enum RantProgramOrigin

Fields[link]

File[link]

Source was loaded from a file.

public const RantProgramOrigin File = 0;

String[link]

Source was loaded from a string.

public const RantProgramOrigin String = 1;

Methods[link]

CompareTo(object)[link]

No Summary

public override int CompareTo(object target)

Parameters

  • target: No Description

Equals(object)[link]

No Summary

public override bool Equals(object obj)

Parameters

  • obj: No Description

GetHashCode()[link]

No Summary

public override int GetHashCode()

GetType()[link]

No Summary

public override System.Type GetType()

GetTypeCode()[link]

No Summary

public override System.TypeCode GetTypeCode()

HasFlag(Enum)[link]

No Summary

public override bool HasFlag(Enum flag)

Parameters

  • flag: No Description

ToString()[link]

No Summary

public override string ToString()

ToString(string)[link]

No Summary

public override string ToString(string format)

Parameters

  • format: No Description

ToString(IFormatProvider)[link]

Warning

This item is deprecated. The provider argument is not used. Please use ToString().

No Summary

public override string ToString(IFormatProvider provider)

Parameters

  • provider: No Description

ToString(string, IFormatProvider)[link]

Warning

This item is deprecated. The provider argument is not used. Please use ToString(String).

No Summary

public override string ToString(string format, IFormatProvider provider)

Parameters

  • format: No Description
  • provider: No Description

RantResource class (Rant.Resources)[link]

Namespace: Rant.Resources

Inheritance: Object → RantResource

The base class for Rant resources that can be included in a package.

public abstract class RantResource

Methods[link]

Equals(object)[link]

No Summary

public override bool Equals(object obj)

Parameters

  • obj: No Description

Finalize()[link]

No Summary

protected override void Finalize()

GetHashCode()[link]

No Summary

public override int GetHashCode()

GetType()[link]

No Summary

public override System.Type GetType()

MemberwiseClone()[link]

No Summary

protected override object MemberwiseClone()

ToString()[link]

No Summary

public override string ToString()

RantRuntimeException class (Rant)[link]

Namespace: Rant

Inheritance: Object → Exception → RantRuntimeException

Represents a runtime error raised by the Rant engine.

public sealed class RantRuntimeException : System.Exception, System.Runtime.Serialization.ISerializable, System.Runtime.InteropServices._Exception

Properties[link]

Code[link]

The source of the error.

public string Code
{
    get;
}

Column[link]

The column on which the error occurred.

public int Column
{
    get;
}

Data[link]

No Summary

public override IDictionary Data
{
    get;
}

No Summary

public override string HelpLink
{
    get;
    set;
}

HResult[link]

No Summary

public override int HResult
{
    get;
    protected set;
}

Index[link]

The character index on which the error occurred.

public int Index
{
    get;
}

InnerException[link]

No Summary

public override Exception InnerException
{
    get;
}

Line[link]

The line on which the error occurred.

public int Line
{
    get;
}

Message[link]

No Summary

public override string Message
{
    get;
}

RantStackTrace[link]

The stack trace from the pattern.

public string RantStackTrace
{
    get;
}

Source[link]

No Summary

public override string Source
{
    get;
    set;
}

StackTrace[link]

No Summary

public override string StackTrace
{
    get;
}

TargetSite[link]

No Summary

public override MethodBase TargetSite
{
    get;
}

Methods[link]

Equals(object)[link]

No Summary

public override bool Equals(object obj)

Parameters

  • obj: No Description

GetBaseException()[link]

No Summary

public override System.Exception GetBaseException()

GetHashCode()[link]

No Summary

public override int GetHashCode()

GetObjectData(SerializationInfo, StreamingContext)[link]

No Summary

public override void GetObjectData(SerializationInfo info, StreamingContext context)

Parameters

  • info: No Description
  • context: No Description

GetType()[link]

No Summary

public override System.Type GetType()

GetType()[link]

No Summary

public override System.Type GetType()

ToString()[link]

Returns a string representation of the runtime error, including the message and stack trace.

public virtual string ToString()

RantTableLoadException class (Rant.Vocabulary)[link]

Namespace: Rant.Vocabulary

Inheritance: Object → Exception → RantTableLoadException

Thrown when Rant encounters an error while loading a dictionary table.

public sealed class RantTableLoadException : System.Exception, System.Runtime.Serialization.ISerializable, System.Runtime.InteropServices._Exception

Properties[link]

Column[link]

Gets the column on which the error occurred.

public int Column
{
    get;
}

Data[link]

No Summary

public override IDictionary Data
{
    get;
}

No Summary

public override string HelpLink
{
    get;
    set;
}

HResult[link]

No Summary

public override int HResult
{
    get;
    protected set;
}

InnerException[link]

No Summary

public override Exception InnerException
{
    get;
}

Line[link]

Gets the line number on which the error occurred.

public int Line
{
    get;
}

Message[link]

No Summary

public override string Message
{
    get;
}

Origin[link]

Gets a string describing where the table was loaded from. For tables loaded from disk, this will be the file path.

public string Origin
{
    get;
}

Source[link]

No Summary

public override string Source
{
    get;
    set;
}

StackTrace[link]

No Summary

public override string StackTrace
{
    get;
}

TargetSite[link]

No Summary

public override MethodBase TargetSite
{
    get;
}

Methods[link]

Equals(object)[link]

No Summary

public override bool Equals(object obj)

Parameters

  • obj: No Description

GetBaseException()[link]

No Summary

public override System.Exception GetBaseException()

GetHashCode()[link]

No Summary

public override int GetHashCode()

GetObjectData(SerializationInfo, StreamingContext)[link]

No Summary

public override void GetObjectData(SerializationInfo info, StreamingContext context)

Parameters

  • info: No Description
  • context: No Description

GetType()[link]

No Summary

public override System.Type GetType()

GetType()[link]

No Summary

public override System.Type GetType()

ToString()[link]

No Summary

public override string ToString()

RantUtils class (Rant)[link]

Namespace: Rant

Inheritance: Object → RantUtils

Contains miscellaneous utility methods that provide information about the Rant engine.

public static class RantUtils

Methods[link]

Equals(object)[link]

No Summary

public override bool Equals(object obj)

Parameters

  • obj: No Description

FunctionExists(string)[link]

Determines whether a function with the specified name is defined in the current engine version.

public static bool FunctionExists(string functionName)

Parameters

  • functionName: The name of the function to search for. Argument is not case-sensitive.

GetFunction(string)[link]

Returns the function with the specified name. The return value will be null if the function is not found.

public static Rant.Metadata.IRantFunctionGroup GetFunction(string functionName)

Parameters

  • functionName: The name of the function to retrieve.

GetFunctionAliases(string)[link]

Enumerates the aliases assigned to the specified function name.

public static System.Collections.Generic.IEnumerable<string> GetFunctionAliases(string functionName)

Parameters

  • functionName: The function name to retrieve aliases for.

GetFunctionDescription(string, int)[link]

Returns the description for the function with the specified name.

public static string GetFunctionDescription(string functionName, int argc)

Parameters

  • functionName: The name of the function to get the description for.
  • argc: The number of arguments in the overload to get the description for.

GetFunctionNames()[link]

Enumerates the names of all available Rant functions.

public static System.Collections.Generic.IEnumerable<string> GetFunctionNames()

GetFunctionNamesAndAliases()[link]

Enumerates all function names and their aliases.

public static System.Collections.Generic.IEnumerable<string> GetFunctionNamesAndAliases()

GetFunctions()[link]

Enumerates the available functions.

public static System.Collections.Generic.IEnumerable<Rant.Metadata.IRantFunctionGroup> GetFunctions()

GetHashCode()[link]

No Summary

public override int GetHashCode()

GetType()[link]

No Summary

public override System.Type GetType()

ToString()[link]

No Summary

public override string ToString()

RNG class (Rant)[link]

Namespace: Rant

Inheritance: Object → RNG

Represents a non-linear random number generator.

public class RNG

Constructors[link]

RNG(long)[link]

Creates a new RNG instance with the specified seed.

public RNG(long seed)

Parameters

  • seed: The seed for the generator.

RNG(long, long)[link]

Creates a new RNG instance with the specified seed and generation.

public RNG(long seed, long generation)

Parameters

  • seed: The seed for the generator.
  • generation: The generation to start at.

RNG()[link]

Creates a new RNG instance seeded with the system tick count.

public RNG()

Properties[link]

BaseSeed[link]

The root seed.

public long BaseSeed
{
    get;
    set;
}

Depth[link]

The current branching depth of the generator.

public int Depth
{
    get;
}

Generation[link]

The current generation.

public long Generation
{
    get;
    set;
}

Seed[link]

The seed of the top branch.

public long Seed
{
    get;
    set;
}

Indexers[link]

this[int g][link]

Calculates the raw 64-bit value for a given generation.

public long this[int g]
{
    get;
}

Methods[link]

Branch(long)[link]

Creates a new branch based off the current seed and the specified seed.

public Rant.RNG Branch(long seed)

Parameters

  • seed: The seed to create the branch with.

Equals(object)[link]

No Summary

public override bool Equals(object obj)

Parameters

  • obj: No Description

Finalize()[link]

No Summary

protected override void Finalize()

GetHashCode()[link]

No Summary

public override int GetHashCode()

GetRaw(long, long)[link]

Calculates the raw 64-bit value for a given seed/generation pair.

public static long GetRaw(long s, long g)

Parameters

  • s: The seed.
  • g: The generation.

GetType()[link]

No Summary

public override System.Type GetType()

MemberwiseClone()[link]

No Summary

protected override object MemberwiseClone()

Merge()[link]

Removes the topmost branch and resumes generation on the next one down.

public Rant.RNG Merge()

Next()[link]

Calculates a 32-bit, non-negative integer from the next generation and increases the current generation by 1.

public int Next()

Next(int)[link]

Calculates a 32-bit integer between 0 and a specified upper bound for the current generation and increases the current generation by 1.

public int Next(int max)

Parameters

  • max: The exclusive maximum value.

Next(int, int)[link]

Calculates a 32-bit integer between the specified minimum and maximum values for the current generation, and increases the current generation by 1.

public int Next(int min, int max)

Parameters

  • min: The inclusive minimum value.
  • max: The exclusive maximum value.

NextBoolean()[link]

Returns a random boolean value and advances the generation by 1.

public bool NextBoolean()

NextDouble()[link]

Returns a double-precision floating point number between 0 and 1, and advances the generation by 1.

public double NextDouble()

NextDouble(double)[link]

Returns a double-precision floating point number between 0 and the specified maximum value, and advances the generation by 1.

public double NextDouble(double max)

Parameters

  • max: (No Description)

NextDouble(double, double)[link]

Returns a double-precision floating point number between the specified minimum and maximum values, and advances the generation by 1.

public double NextDouble(double min, double max)

Parameters

  • min: (No Description)
  • max: (No Description)

NextRaw()[link]

Calculates the raw 64-bit value for the next generation, and increases the current generation by 1.

public long NextRaw()

Peek()[link]

Calculates a 32-bit, non-negative integer for the current generation.

public int Peek()

Peek(int)[link]

Calculates a 32-bit integer between 0 and a specified upper bound for the current generation.

public int Peek(int max)

Parameters

  • max: The exclusive maximum value.

Peek(int, int)[link]

Calculates a 32-bit integer between the specified minimum and maximum values for the current generation.

public int Peek(int min, int max)

Parameters

  • min: The inclusive minimum value.
  • max: The exclusive maximum value.

PeekAt(long)[link]

Calculates the 32-bitnon-negative integer for the specified generation.

public int PeekAt(long generation)

Parameters

  • generation: The generation to peek at.

PeekAt(long, int)[link]

Calculates a 32-bit integer between 0 and a specified upper bound for the specified generation.

public int PeekAt(long generation, int max)

Parameters

  • generation: The generation whose value to calculate.
  • max: The exclusive maximum value.

PeekAt(int, int, int)[link]

Calculates a 32-bit integer between the specified minimum and maximum values for the specified generation.

public int PeekAt(int generation, int min, int max)

Parameters

  • generation: The generation whose value to calculate.
  • min: The inclusive minimum value.
  • max: The exclusive maximum value.

Prev()[link]

Calculates a 32-bit, non-negative integer from the previous generation and decreases the current generation by 1.

public int Prev()

Prev(int)[link]

Calculates a 32-bit integer between 0 and a specified upper bound from the previous generation and decreases the current generation by 1.

public int Prev(int max)

Parameters

  • max: The exclusive maximum value.

Prev(int, int)[link]

Calculates a 32-bit integer between the specified minimum and maximum values for the previous generation, and decreases the current generation by 1.

public int Prev(int min, int max)

Parameters

  • min: The inclusive minimum value.
  • max: The exclusive maximum value.

PrevRaw()[link]

Calculates the raw 64-bit value for the previous generation, and decreases the current generation by 1.

public long PrevRaw()

Reset()[link]

Sets the current generation to zero.

public void Reset()

Reset(long)[link]

Sets the seed to the specified value and the current generation to zero.

public void Reset(long newSeed)

Parameters

  • newSeed: The new seed to apply to the generator.

ToString()[link]

No Summary

public override string ToString()

WritingSystem class (Rant.Formats)[link]

Namespace: Rant.Formats

Inheritance: Object → WritingSystem

Represents configuration settings for a language's writing system.

public sealed class WritingSystem

Constructors[link]

WritingSystem(IEnumerable, string, QuotationMarks)[link]

Creates a new writing system with the specified configuration.

public WritingSystem(IEnumerable<char> alphabet, string space, QuotationMarks quotations)

Parameters

  • alphabet: The alphabet to use.
  • space: The standard space to use.
  • quotations: The quotation marks to use.

WritingSystem()[link]

Creates a new writing system with the default configuration.

public WritingSystem()

Properties[link]

Quotations[link]

The quotation marks used by the format.

public QuotationMarks Quotations
{
    get;
}

Space[link]

The standard space used by series and phrasals.

public string Space
{
    get;
}

Methods[link]

Equals(object)[link]

No Summary

public override bool Equals(object obj)

Parameters

  • obj: No Description

GetAlphabet()[link]

The alphabet used by the format.

public System.Collections.Generic.IEnumerable<char> GetAlphabet()

GetHashCode()[link]

No Summary

public override int GetHashCode()

GetType()[link]

No Summary

public override System.Type GetType()

ToString()[link]

No Summary

public override string ToString()

Comments