# Yarn Namespace

## Summary

Contains classes for working with compiled Yarn programs.

## Classes

| Name                                                                                           | Description                                                                                                                                                                                                        |
| ---------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| [ConstantTypeProperty](https://docs.yarnspinner.dev/api/csharp/yarn/yarn.constanttypeproperty) | Represents a property that belongs to a type and contains a read-only value.                                                                                                                                       |
| [Dialogue](https://docs.yarnspinner.dev/api/csharp/yarn/yarn.dialogue)                         | Co-ordinates the execution of Yarn programs.                                                                                                                                                                       |
| [DialogueException](https://docs.yarnspinner.dev/api/csharp/yarn/yarn.dialogueexception)       | An exception that is thrown by [Dialogue](https://docs.yarnspinner.dev/api/csharp/yarn/yarn.dialogue) when there is an error in executing a [Program](https://docs.yarnspinner.dev/api/csharp/yarn/yarn.program) . |
| [EnumBase](https://docs.yarnspinner.dev/api/csharp/yarn/yarn.enumbase)                         | The base type for all enumeration types.                                                                                                                                                                           |
| [EnumType](https://docs.yarnspinner.dev/api/csharp/yarn/yarn.enumtype)                         | A type that represents enumerations.                                                                                                                                                                               |
| [FunctionType](https://docs.yarnspinner.dev/api/csharp/yarn/yarn.functiontype)                 | A type that represents a function.                                                                                                                                                                                 |
| [Header](https://docs.yarnspinner.dev/api/csharp/yarn/yarn.header)                             |                                                                                                                                                                                                                    |
| [Library](https://docs.yarnspinner.dev/api/csharp/yarn/yarn.library)                           | A collection of functions that can be called from Yarn programs.                                                                                                                                                   |
| [MemoryVariableStore](https://docs.yarnspinner.dev/api/csharp/yarn/yarn.memoryvariablestore)   | A simple concrete implementation of [IVariableStorage](https://docs.yarnspinner.dev/api/csharp/yarn/yarn.ivariablestorage) that keeps all variables in memory.                                                     |
| [Node](https://docs.yarnspinner.dev/api/csharp/yarn/yarn.node)                                 | A node of Yarn script, contained within a [Program](https://docs.yarnspinner.dev/api/csharp/yarn/yarn.program) , and containing `Yarn.Instruction` s.                                                              |
| [Program](https://docs.yarnspinner.dev/api/csharp/yarn/yarn.program)                           | A compiled Yarn program.                                                                                                                                                                                           |
| [TypeBase](https://docs.yarnspinner.dev/api/csharp/yarn/yarn.typebase)                         | Provides the base class for all concrete types.                                                                                                                                                                    |
| [Types](https://docs.yarnspinner.dev/api/csharp/yarn/yarn.types)                               | Contains the built-in types available in the Yarn language.                                                                                                                                                        |

## Delegates

| Name                                                                                                 | Description                                                                                                                                                 |
| ---------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [CommandHandler](https://docs.yarnspinner.dev/api/csharp/yarn/yarn.commandhandler)                   | Represents the method that is called when the Dialogue delivers a [Command](https://docs.yarnspinner.dev/api/csharp/yarn/yarn.command) .                    |
| [DialogueCompleteHandler](https://docs.yarnspinner.dev/api/csharp/yarn/yarn.dialoguecompletehandler) | Represents the method that is called when the dialogue has reached its end, and no more code remains to be run.                                             |
| [LineHandler](https://docs.yarnspinner.dev/api/csharp/yarn/yarn.linehandler)                         | Represents the method that is called when the Dialogue delivers a [Line](https://docs.yarnspinner.dev/api/csharp/yarn/yarn.line) .                          |
| [Logger](https://docs.yarnspinner.dev/api/csharp/yarn/yarn.logger)                                   | Represents a method that receives diagnostic messages and error information from a [Dialogue](https://docs.yarnspinner.dev/api/csharp/yarn/yarn.dialogue) . |
| [NodeCompleteHandler](https://docs.yarnspinner.dev/api/csharp/yarn/yarn.nodecompletehandler)         | Represents the method that is called when the Dialogue reaches the end of a node.                                                                           |
| [NodeStartHandler](https://docs.yarnspinner.dev/api/csharp/yarn/yarn.nodestarthandler)               | Represents the method that is called when the Dialogue begins executing a node.                                                                             |
| [OptionsHandler](https://docs.yarnspinner.dev/api/csharp/yarn/yarn.optionshandler)                   | Represents the method that is called when the Dialogue delivers an [OptionSet](https://docs.yarnspinner.dev/api/csharp/yarn/yarn.optionset) .               |
| [PrepareForLinesHandler](https://docs.yarnspinner.dev/api/csharp/yarn/yarn.prepareforlineshandler)   | Represents the method that is called when the dialogue anticipates that it will deliver lines.                                                              |

## Enums

| Name                                                                           | Description                                                                                                                                                                                                                                                                        |
| ------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [VariableKind](https://docs.yarnspinner.dev/api/csharp/yarn/yarn.variablekind) | Represents different kinds of variables that can be fetched from a [Dialogue](https://docs.yarnspinner.dev/api/csharp/yarn/yarn.dialogue) using [TryGetValue\<T>(string,T?)](https://docs.yarnspinner.dev/api/csharp/yarn/yarn.ivariableaccess/yarn.ivariableaccess.trygetvalue) . |

## Interfaces

| Name                                                                                                 | Description                                                                                                                                           |
| ---------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
| [IMarkupParser](https://docs.yarnspinner.dev/api/csharp/yarn/yarn.imarkupparser)                     | Contains methods for parsing raw text into a [MarkupParseResult](https://docs.yarnspinner.dev/api/csharp/yarn.markup/yarn.markup.markupparseresult) . |
| [ISmartVariableEvaluator](https://docs.yarnspinner.dev/api/csharp/yarn/yarn.ismartvariableevaluator) | Contains methods for evaluating the value of smart variables                                                                                          |
| [IType](https://docs.yarnspinner.dev/api/csharp/yarn/yarn.itype)                                     | Defines properties that describe a type in the Yarn language.                                                                                         |
| [ITypeMember](https://docs.yarnspinner.dev/api/csharp/yarn/yarn.itypemember)                         | Provides properties used to work with members of a type.                                                                                              |
| [IVariableAccess](https://docs.yarnspinner.dev/api/csharp/yarn/yarn.ivariableaccess)                 | Provides a mechanism for retrieving values.                                                                                                           |
| [IVariableStorage](https://docs.yarnspinner.dev/api/csharp/yarn/yarn.ivariablestorage)               | Provides a mechanism for storing values.                                                                                                              |
| [IYarnValue](https://docs.yarnspinner.dev/api/csharp/yarn/yarn.iyarnvalue)                           | Represents a read-only value in the Yarn Spinner virtual machine.                                                                                     |

## Namespaces

| Name                                                                   | Description                                                                               |
| ---------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- |
| [Yarn.Compiler](https://docs.yarnspinner.dev/api/csharp/yarn.compiler) | Contains classes for compiling Yarn code.                                                 |
| [Yarn.Markup](https://docs.yarnspinner.dev/api/csharp/yarn.markup)     | Contains classes for working with markup in Yarn lines.                                   |
| [Yarn.Saliency](https://docs.yarnspinner.dev/api/csharp/yarn.saliency) | Contains classes for choosing the most relevant content out of a set of possible options. |
| [Yarn.Unity](https://docs.yarnspinner.dev/api/csharp/yarn.unity)       | Contains classes for working with Yarn Spinner in the Unity game engine.                  |
| [Yarn.Utility](https://docs.yarnspinner.dev/api/csharp/yarn.utility)   | Contains utility classes used by Yarn Spinner.                                            |

## Structs

| Name                                                                     | Description                                                                                                                                                                                               |
| ------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [Command](https://docs.yarnspinner.dev/api/csharp/yarn/yarn.command)     | A command, sent from the [Dialogue](https://docs.yarnspinner.dev/api/csharp/yarn/yarn.dialogue) to the game.                                                                                              |
| [Line](https://docs.yarnspinner.dev/api/csharp/yarn/yarn.line)           | A line of dialogue, sent from the [Dialogue](https://docs.yarnspinner.dev/api/csharp/yarn/yarn.dialogue) to the game.                                                                                     |
| [OptionSet](https://docs.yarnspinner.dev/api/csharp/yarn/yarn.optionset) | A set of [Option](https://docs.yarnspinner.dev/api/csharp/yarn/yarn.optionset/yarn.optionset.option) s, sent from the [Dialogue](https://docs.yarnspinner.dev/api/csharp/yarn/yarn.dialogue) to the game. |
